﻿/* ============================================================
   Книгомер — дизайн-система
   Слои: reset → tokens → layout → components → pages → adaptive
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, dl, dd, dt, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ---------- tokens ---------- */
:root {
  --bg: #0b0d10;
  --bg-elevated: #10141a;
  --surface: #141920;
  --surface-2: #1a212b;
  --surface-3: #222a36;
  --line: #252d38;
  --line-soft: #1d242e;
  --text: #eef1f5;
  --text-soft: #cdd4de;
  --muted: #96a1b0;
  --faint: #6a7584;
  --accent: #f6b73c;
  --accent-strong: #ffc95c;
  --accent-ink: #241a06;
  --violet: #9d7bff;
  --blue: #6ea8fe;
  --green: #4ade80;
  --red: #f87171;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .25);
  --shadow: 0 18px 40px rgba(0, 0, 0, .38);
  --shadow-cover: 0 18px 30px rgba(0, 0, 0, .45);
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sidebar: 252px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-elevated: #fbf9f4;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --surface-3: #eae4d7;
  --line: #ded7c8;
  --line-soft: #e9e3d6;
  --text: #1c1a16;
  --text-soft: #3c372f;
  --muted: #6e6658;
  --faint: #7c7364;
  --accent: #b8791a;
  --accent-strong: #9a6410;
  --accent-ink: #fffaf0;
  --violet: #6d4ad1;
  --blue: #2f6fd0;
  --shadow-sm: 0 4px 12px rgba(60, 50, 30, .08);
  --shadow: 0 20px 44px rgba(60, 50, 30, .12);
  --shadow-cover: 0 16px 26px rgba(60, 50, 30, .18);
}

/* ---------- base ---------- */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(246, 183, 60, .10), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(157, 123, 255, .08), transparent 55%);
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(184, 121, 26, .08), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(109, 74, 209, .05), transparent 55%);
}

::selection { background: rgba(246, 183, 60, .28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(28px, 3.1vw, 42px); }
h2 { font-size: clamp(20px, 2vw, 26px); }
h3 { font-size: 18px; }
p { max-width: 72ch; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.dot-sep { color: var(--faint); margin: 0 6px; }
.fineprint { font-size: 12px; color: var(--faint); margin-top: 10px; }
.link-more { color: var(--muted); font-size: 13px; white-space: nowrap; transition: color .15s; }
.link-more:hover { color: var(--accent); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* ---------- layout ---------- */
.app { position: relative; display: flex; min-height: 100vh; z-index: 1; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 38px 70px; }
.section { margin-top: 34px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section__head h2 { margin: 0; }
.section__head h2 a:hover { color: var(--accent); }
.two-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 34px; margin-top: 34px; }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: var(--sidebar); flex: 0 0 var(--sidebar);
  height: 100vh; overflow-y: auto;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line-soft);
  background: rgba(12, 15, 19, .72);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 20px;
  z-index: 40;
}
[data-theme="light"] .sidebar { background: rgba(251, 249, 244, .8); }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 6px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 23px; font-weight: 700;
  color: #1b1305;
  background: linear-gradient(145deg, #ffd479, #e9a31f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px rgba(246, 183, 60, .25);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 17px; letter-spacing: -.01em; }
.brand__text small { font-size: 10px; color: var(--faint); letter-spacing: .04em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--surface); color: var(--text); }
.nav__link.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav__icon { width: 26px; text-align: center; color: var(--faint); font-size: 21px; line-height: 1; }
.nav__link.is-active .nav__icon { color: var(--accent); }
.nav__section { display: flex; flex-direction: column; gap: 2px; }
.nav__caption { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav__count { margin-left: auto; font-size: 11px; color: var(--faint); background: var(--surface); padding: 1px 7px; border-radius: 20px; }
.nav__link--shelf { font-size: 13.5px; }

.sidebar-cta { background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.sidebar-cta strong { font-size: 14px; }
.sidebar-cta p { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; line-height: 1.45; }
.sidebar-cta__login { display: block; text-align: center; font-size: 12px; color: var(--muted); margin-top: 9px; }
.sidebar-cta__login:hover { color: var(--accent); }

.genre-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.genre-link {
  font-size: 12px; color: var(--muted); padding: 4px 9px;
  border: 1px solid var(--line-soft); border-radius: 20px;
  transition: .15s;
}
.genre-link:hover { color: var(--accent); border-color: rgba(246, 183, 60, .35); }
.sidebar__bottom { margin-top: auto; font-size: 10.5px; color: var(--faint); padding: 8px 8px 0; display: flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 35;
  display: flex; align-items: center; gap: 18px;
  padding: 13px 38px;
  background: rgba(11, 13, 16, .82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
[data-theme="light"] .topbar { background: rgba(246, 243, 236, .86); }
.search { position: relative; flex: 1; min-width: 0; max-width: 600px; display: flex; align-items: center; }
.search__icon { position: absolute; left: 14px; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--text-soft); }
.search__input {
  width: 100%; height: 40px; padding: 0 14px 0 44px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search__input::placeholder { color: var(--faint); }
.search__input:focus { border-color: rgba(246, 183, 60, .55); box-shadow: 0 0 0 3px rgba(246, 183, 60, .12); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--muted); font-size: 16px; transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--surface-3); }
.theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__sun { display: inline; }
[data-theme="light"] .theme-toggle__moon { display: none; }
.badge--accent { background: var(--accent); color: var(--accent-ink); }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }

.user-menu { position: relative; }
.user-menu__summary { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.user-menu__name { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__popover {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60;
}
.user-menu[open] .user-menu__popover { display: block; }
.user-menu__popover a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-soft); }
.user-menu__popover a:hover { background: var(--surface-2); color: var(--text); }

/* ---------- avatars ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: linear-gradient(140deg, var(--surface-3), var(--surface)); color: var(--text-soft); font-size: 14px; font-weight: 700; flex: 0 0 auto; border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 96px; height: 96px; font-size: 30px; }

/* ---------- buttons / chips / badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; font-size: 14px; font-weight: 600;
  line-height: 1; text-align: center;
  transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(246, 183, 60, .22); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--text-soft); }
.btn--ghost:hover { border-color: var(--surface-3); color: var(--text); background: var(--surface-2); }
.btn--sm { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12.5px;
  transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--surface-3); }
.chip.is-active, .chip--active { background: rgba(246, 183, 60, .12); border-color: rgba(246, 183, 60, .45); color: var(--accent); }
.chip--sm { padding: 3px 9px; font-size: 11px; }
.chip--accent { background: rgba(246, 183, 60, .14); color: var(--accent); border-color: rgba(246, 183, 60, .35); }
.chip--danger { background: rgba(248, 113, 113, .1); color: var(--red); border-color: rgba(248, 113, 113, .3); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.badge--accent { background: var(--accent); color: var(--accent-ink); }
.badge--ghost { background: transparent; border: 1px solid var(--line); }
.badge--status { background: rgba(74, 222, 128, .12); color: var(--green); }

.source-note { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.source-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-size: 12.5px; color: var(--muted); padding: 4px 9px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line-soft); }
.tag--world { color: var(--blue); border-color: rgba(110, 168, 254, .3); }
.badge--adult { background: rgba(248, 113, 113, .14); color: var(--red); border: 1px solid rgba(248, 113, 113, .3); }
.genre-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.genre-tree__group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.genre-tree__root { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.genre-tree__root .muted { margin-left: auto; font-size: 12px; }
.genre-tree__children { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-tree__children .chip { font-size: 11.5px; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; align-items: center; }
.news-filters input, .news-filters select { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elevated); color: var(--text); padding: 0 10px; }
.news-filters input[type="search"] { flex: 1 1 240px; }
.news-filters select { flex: 0 1 190px; }
.news-filters .filters__reset { display: inline-flex; align-items: center; min-height: 38px; padding: 0 4px; }
@media (max-width: 720px) { .news-filters select { flex: 1 1 100%; } }
.tag:hover { color: var(--accent); }

.shelf-panel { transition: opacity .18s var(--ease); }
.shelf-panel.is-loading { opacity: .45; pointer-events: none; }

.admin-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px 13px; border: 1px dashed var(--line); border-radius: 10px; font-size: 12.5px; }
.admin-quick a { color: var(--accent); border-bottom: 1px solid rgba(246, 183, 60, .4); }

.request-list { display: flex; flex-direction: column; gap: 10px; }
.request-item { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.request-item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.request-item p { margin-top: 5px; font-size: 12.5px; }

.membership-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.membership { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.membership a, a.membership { color: var(--text); }
a.membership:hover { border-color: rgba(246, 183, 60, .4); }
.membership .muted { font-size: 12px; }

/* Профиль: прокрутка остаётся, но её полоса не занимает место у заголовков. */
html.profile-page, html.profile-page body,
html.profile-page .app, html.profile-page .shell, html.profile-page .main,
html.profile-page .sidebar { scrollbar-width: none; -ms-overflow-style: none; }
html.profile-page::-webkit-scrollbar, html.profile-page body::-webkit-scrollbar,
html.profile-page .app::-webkit-scrollbar, html.profile-page .shell::-webkit-scrollbar,
html.profile-page .main::-webkit-scrollbar, html.profile-page .sidebar::-webkit-scrollbar {
  width: 0; height: 0; display: none;
}

/* Профиль: фиксированная оболочка, прокручивается только контент. */
@media (min-width: 721px) {
  html.profile-page, html.profile-page body { height: 100%; overflow: hidden; }
  html.profile-page .app { height: 100vh; overflow: hidden; }
  html.profile-page .shell { height: 100vh; overflow: hidden; scrollbar-width: none; }
  html.profile-page .main { flex: 0 0 auto; min-height: 0; overflow: visible; }
  html.profile-page .sidebar { overflow-y: auto; scrollbar-width: none; }
  html.profile-page * { scrollbar-width: none !important; -ms-overflow-style: none !important; }
  html.profile-page *::-webkit-scrollbar {
    width: 0 !important; height: 0 !important; display: none !important;
  }
}

/* ---------- messages / toasts ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.message { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid var(--line); background: var(--surface); }
.message--success { border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); color: #b7f7cd; }
.message--error { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .08); color: #ffc9c9; }
.message--info { border-color: rgba(110, 168, 254, .35); background: rgba(110, 168, 254, .08); }
[data-theme="light"] .message--success { color: #166534; }
[data-theme="light"] .message--error { color: #991b1b; }
[data-theme="light"] .message--info { color: #1e40af; }
.toasts { position: fixed; right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); animation: toast-in .2s var(--ease); }
.toast--error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- page head / breadcrumbs ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--faint); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--accent); }
.anchor-nav { position: sticky; top: 67px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; margin: 18px 0 8px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(var(--bg) 70%, transparent); }
.anchor-nav a { padding: 7px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.anchor-nav a:hover { background: var(--surface); color: var(--text); }
.anchor-nav span { font-size: 11px; color: var(--faint); }

/* Якорные разделы не должны уходить под липкую шапку и навигацию. */
html { scroll-padding-top: 0; }
.book-main section[id], .book-main section[id] > .section__head,
.book-main [id="about"], .book-main [id="editions"],
.book-main [id="reviews"], .book-main [id="comments"] { scroll-margin-top: 120px; }

@media (max-width: 900px) {
  .book-main section[id], .book-main [id="about"], .book-main [id="editions"],
  .book-main [id="reviews"], .book-main [id="comments"] { scroll-margin-top: 100px; }
}

.report-link { align-self: flex-start; margin-top: 4px; font-size: 12px; color: var(--faint); border-bottom: 1px dotted var(--line-soft); }
.report-link:hover { color: var(--accent); }
.report-layout { max-width: 720px; margin: 20px auto 0; }
.report-panel { padding: 26px; }
.report-panel h1 { margin: 6px 0 10px; }
.report-work { display: flex; flex-direction: column; gap: 3px; margin: 18px 0; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.report-work a { font-family: var(--font-serif); font-size: 18px; font-weight: 700; }
.report-work span { font-size: 12px; color: var(--muted); }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- covers / book grid ---------- */
.cover { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; background: var(--surface-2); }
.cover--fallback { display: grid; place-items: center; background: linear-gradient(150deg, var(--surface-3), var(--surface)); font-family: var(--font-serif); font-size: 42px; color: var(--muted); }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 26px 18px; }
.shelf-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shelf-card .book-card { flex: 1; }
.shelf-status-menu { position: relative; }
.shelf-status-toggle { width: 100%; justify-content: center; gap: 5px; }
.shelf-status-toggle__chevron { display: block; flex: 0 0 10px; width: 10px; height: 7px; opacity: .7; }
.shelf-status-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 34px rgba(0,0,0,.42); }
.shelf-status-list[hidden] { display: none !important; }
.shelf-status-list button { width: 100%; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--text-soft); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; }
.shelf-status-list button:hover, .shelf-status-list button:focus-visible { background: var(--surface-2); color: var(--text); }
.shelf-status-list button[data-shelf-status-option="none"] { color: var(--text-soft); background: transparent; border-top: 0; margin-top: 0; padding-top: 8px; }
.book-grid--wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.book-card { min-width: 0; }
.book-card__cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-cover); transition: transform .25s var(--ease), box-shadow .25s; }
.book-card__cover::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.book-card__cover:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 24px 40px rgba(0, 0, 0, .5); }
.book-card__badge { position: absolute; left: 8px; top: 8px; background: rgba(11, 13, 16, .82); color: var(--accent); font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(6px); }
.book-card__rating-badge { position: absolute; top: -1px; right: -1px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 7px 11px; border-radius: 0 13px 0 9px; background: rgba(9, 11, 14, .88); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1; }
.book-card__rating-badge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border-top: 1px solid #0b0d10; border-right: 1px solid #0b0d10; pointer-events: none; }
.book-card__rating-star { color: var(--accent); font-size: 13px; line-height: 1; }
.book-card__body { padding: 10px 2px 0; }
.book-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-serif); font-size: 15px; line-height: 1.3; font-weight: 700; }
.book-card__title:hover { color: var(--accent); }
.book-card__author { margin-top: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card__meta { margin-top: 5px; display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--faint); }
.book-card__reason { margin-top: 7px; font-size: 11px; color: var(--accent); background: rgba(246, 183, 60, .08); border: 1px solid rgba(246, 183, 60, .18); padding: 4px 7px; border-radius: 6px; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--text-soft); }
.rating__star { color: var(--accent); font-size: 11px; }
.rec-card { display: flex; flex-direction: column; }
.rec-card__actions { display: flex; gap: 10px; margin-top: 6px; }
.feedback-btn { font-size: 11px; color: var(--faint); }
.feedback-btn:hover { color: var(--red); }
.vote-row { display: inline-flex; align-items: center; gap: 5px; }
.vote-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.vote-btn:hover { border-color: var(--accent); color: var(--text); }
.vote-btn.is-active { border-color: var(--accent); color: var(--accent); background: rgba(246, 183, 60, .08); }
.vote-btn.is-active[data-value="-1"] { border-color: var(--red); color: var(--red); background: rgba(248, 113, 113, .08); }
.reputation { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 5px; font-size: 10.5px; line-height: 1.3; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.reputation--review { color: var(--violet); }
.reputation--comment { color: var(--blue); }
.profile-reputation { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.comment__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.text-btn { background: none; border: 0; padding: 0; font-size: 12px; color: var(--faint); }
.text-btn:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px;
  padding: 46px 48px; border: 1px solid var(--line); border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(157, 123, 255, .18), transparent 65%),
    radial-gradient(700px 400px at 0% 100%, rgba(246, 183, 60, .13), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--bg-elevated));
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 22px 22px; opacity: .35; pointer-events: none; }
.hero__content { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(32px, 4.2vw, 54px); line-height: 1.06; max-width: 13ch; margin-bottom: 16px; }
.hero__lead { color: var(--muted); font-size: 16px; max-width: 46ch; }
.hero__search { display: flex; gap: 8px; margin: 24px 0 22px; max-width: 460px; }
.hero__search input { flex: 1; height: 46px; border-radius: 11px; border: 1px solid var(--line); background: rgba(11, 13, 16, .45); padding: 0 16px; color: var(--text); outline: none; }
.hero__search input::placeholder { color: var(--faint); }
.hero__search input:focus { border-color: rgba(246, 183, 60, .6); }
[data-theme="light"] .hero__search input { background: #fff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .book-card__reason { background: #fdf4e1; border-color: #e8d2a3; color: #7a4d05; }
.hero__stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 20px; }
.hero__stats span { font-size: 11.5px; color: var(--faint); }
.hero__covers { position: relative; display: flex; align-items: center; justify-content: flex-start; min-height: 420px; margin-left: 20px; }
@media (max-width: 1300px) { .hero__covers { margin-left: 10px; } }
.hero__cover { position: relative; flex: 0 0 auto; width: 225px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-cover); transition: transform .4s var(--ease), opacity .35s var(--ease); }
.hero__cover--1 { transform: rotate(-7deg) translateY(14px); z-index: 1; }
.hero__cover--2 { margin-left: -28px; width: 245px; transform: rotate(2deg) translateY(-8px); z-index: 3; }
.hero__cover--3 { margin-left: -30px; width: 225px; transform: rotate(7deg) translateY(12px); z-index: 2; }
.hero__covers:hover .hero__cover--1 { transform: rotate(-10deg) translateY(8px); }
.hero__covers:hover .hero__cover--2 { transform: rotate(0deg) translateY(-14px); }
.hero__covers:hover .hero__cover--3 { transform: rotate(10deg) translateY(6px); }

.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 6px 0 2px; }
.welcome h1 { font-family: var(--font-serif); }

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.section__links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.genre-tile { position: relative; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(150deg, var(--surface-2), var(--surface)); overflow: hidden; transition: .2s var(--ease); }
.genre-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .85; }
.genre-tile:hover { transform: translateY(-2px); border-color: var(--surface-3); }
.genre-tile__name { display: block; font-weight: 700; font-size: 14.5px; }
.genre-tile__count { font-size: 11px; color: var(--faint); margin-top: 3px; display: block; }

/* ---------- continue reading ---------- */
.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.continue-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .15s; }
.continue-card:hover { border-color: var(--surface-3); background: var(--surface-2); }
.continue-card__cover { width: 56px; flex: 0 0 56px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; }
.continue-card__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.continue-card__body strong { font-family: var(--font-serif); font-size: 14px; line-height: 1.25; }
.continue-card__body small { font-size: 11px; color: var(--muted); }
.progress { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: auto; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 4px; }

/* ---------- home columns / feed ---------- */
.home-columns { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; margin-top: 34px; }
.home-columns__aside { min-width: 0; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.feed-item:last-child { border-bottom: 0; }
.feed-item__avatar { flex: 0 0 auto; }
.feed-item__body { min-width: 0; flex: 1; }
.feed-item__text { font-size: 13.5px; color: var(--text-soft); }
.feed-item__text a { color: var(--text); font-weight: 600; }
.feed-item__text a:hover { color: var(--accent); }
.feed-item__text .muted { font-weight: 400; }
.feed-item__work { font-family: var(--font-serif); }
.feed-item__meta { font-size: 11px; color: var(--faint); margin-top: 2px; }
.feed-item__cover { width: 38px; height: 57px; border-radius: 5px; overflow: hidden; flex: 0 0 auto; }
.feed-item__cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel__head h2 { font-size: 16px; }

/* ---------- news ---------- */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-list--compact { gap: 4px; }
.news-card { display: flex; gap: 12px; padding: 11px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); transition: .15s; }
.news-card:hover { border-color: var(--surface-3); background: var(--surface-2); }
.news-card__media { width: 92px; flex: 0 0 92px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1d1405; background: linear-gradient(145deg, #ffd479, #d99a1c); }
.news-card__placeholder--award { background: linear-gradient(145deg, #c4b5fd, #7c5cd6); color: #fff; }
.news-card__placeholder--adaptation { background: linear-gradient(145deg, #93c5fd, #3b6fbf); color: #fff; }
.news-card__placeholder--event { background: linear-gradient(145deg, #86efac, #2e8b57); color: #06210f; }
.news-card__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.news-card__body .chip { align-self: flex-start; }
.news-card__title { font-size: 13.5px; line-height: 1.35; font-weight: 600; }
.news-card__excerpt { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__meta { font-size: 10.5px; color: var(--faint); margin-top: auto; }
.news-list--compact .news-card { padding: 8px; border-color: transparent; background: transparent; }
.news-list--compact .news-card__media { width: 54px; flex-basis: 54px; }
.news-list--compact .news-card__placeholder { font-size: 0; }
.news-list--compact .news-card__placeholder::after { content: "◆"; font-size: 15px; }
.news-list--compact .news-card__excerpt { display: none; }

.news-list--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.news-list--grid .news-card { flex-direction: row; align-items: flex-start; }
.news-list--grid .news-card__media { width: 108px; flex: 0 0 108px; aspect-ratio: 2 / 3; }
.news-list--grid .news-card__body { gap: 4px; }
.news-list--grid .news-card__title { font-size: 15px; }
.news-list--grid .news-card__excerpt { -webkit-line-clamp: 3; }
.news-list--grid .news-card__meta { margin-top: 4px; }

/* ---------- book detail ---------- */
.book-hero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 38px; align-items: start; }
.book-hero__cover { aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 26px 50px rgba(0, 0, 0, .5); }
.book-hero__under { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.book-hero__info h1 { font-family: var(--font-serif); font-size: clamp(30px, 3.6vw, 46px); margin: 4px 0 6px; }
.book-hero__original { color: var(--faint); font-size: 13px; font-style: italic; margin-bottom: 10px; }
.book-hero__authors { font-size: 16px; color: var(--text-soft); }
.book-hero__authors a { border-bottom: 1px solid var(--line); }
.book-hero__authors a:hover { color: var(--accent); border-color: var(--accent); }
.book-hero__rating { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; font-size: 12px; line-height: 1; }
.rating-block { display: flex; align-items: center; gap: 4px; line-height: 1; }
.rating-block__value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rating-block__scale { font-size: 12px; color: var(--faint); line-height: 1; }
.rating-block__count { font-size: 11px; color: var(--faint); margin-left: 6px; line-height: 1; }
.rating-block--empty .rating-block__value { font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.rating-block--empty .rating-block__scale { font-size: 11px; }
.rating-block--empty .rating-block__count { font-size: 11px; }
.book-hero__rating > .muted, .book-hero__rating .dot-sep { line-height: 1; }
.book-hero__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.book-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; margin-top: 2px; }
.status-control { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.status-control__btn { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 8px; transition: .15s; }
.status-control__btn:hover { color: var(--text); background: var(--surface-2); }
.status-control__btn.is-active { background: var(--accent); color: var(--accent-ink); }
.read-count { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.read-count[hidden] { display: none !important; }
.read-count__label { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.read-count__btn { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text-soft); font-size: 16px; line-height: 1; }
.read-count__btn:hover:not(:disabled) { border-color: var(--accent); background: rgba(246, 183, 60, .12); color: var(--accent); }
.read-count__btn:disabled { opacity: .35; cursor: not-allowed; }
.read-count__value { min-width: 2ch; color: var(--text); font-weight: 700; text-align: center; }
.rating-control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.rating-control__label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.rating-control__dots { display: flex; gap: 2px; }
.rating-dot { width: 25px; height: 25px; border-radius: 6px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--faint); font-size: 10.5px; }
.rating-dot:hover { border-color: var(--accent); color: var(--accent); }
.rating-dot.is-active { background: rgba(246, 183, 60, .16); border-color: var(--accent); color: var(--accent); }
.rating-clear { border: 0; background: none; font-size: 11px; color: var(--faint); }
.rating-login { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--accent); }
.book-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.book-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.book-facts dd { font-size: 13px; margin-top: 2px; }
.book-facts a:hover { color: var(--accent); }

.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 10px; }
.book-aside { position: sticky; top: 128px; align-self: start; }
@media (min-width: 1101px) { .book-aside--with-cycle { margin-top: 18px; } }
.cycle-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(140deg, var(--surface-2), var(--surface)); margin-top: 18px; }
.cycle-banner__title { display: block; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.cycle-banner__title:hover { color: var(--accent); }

.prose { color: var(--text-soft); font-size: 15.5px; line-height: 1.55; }
.prose p { max-width: none; }
.prose p + p { margin-top: 10px; }

.editions { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.edition-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 180px 200px; gap: 14px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.edition-row:last-child { border-bottom: 0; }
.edition-row__thumb { width: 38px; height: 54px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.edition-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edition-row__main strong { display: block; font-size: 13.5px; }
.edition-row__main span { font-size: 11.5px; color: var(--muted); }
.edition-row__meta { font-size: 11px; display: flex; flex-direction: column; gap: 4px; }
.edition-row__buy { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.buy-link { font-size: 12px; color: var(--accent); border-bottom: 1px dashed rgba(246, 183, 60, .35); }
.buy-link:hover { color: var(--accent-strong); }
.fragment-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid rgba(110, 168, 254, .25); background: rgba(110, 168, 254, .06); }
.fragment-box p { font-size: 12px; margin-top: 3px; }

.editor { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 16px; margin-bottom: 18px; }
.editor summary { padding: 13px 0; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.editor .form { padding-bottom: 16px; }
.reviews { display: flex; flex-direction: column; gap: 18px; }
.review { padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.review__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.review__author { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.review__date { font-size: 11px; color: var(--faint); }
.review__rating { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); background: rgba(246, 183, 60, .1); padding: 2px 8px; border-radius: 6px; }
.review__title { font-family: var(--font-serif); font-size: 19px; margin: 10px 0 6px; }
.review__text { color: var(--text-soft); font-size: 14.5px; }
.review__text.is-spoiler { filter: blur(6px); user-select: none; transition: filter .3s; }
.review__text.is-spoiler.is-open { filter: none; user-select: auto; }
.spoiler-toggle { margin: 8px 0; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 7px; padding: 5px 10px; font-size: 11.5px; }
.review__foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.like-btn { background: none; border: 0; color: var(--faint); font-size: 12.5px; padding: 0; }
.like-btn:hover, .like-btn.is-liked { color: var(--red); }
.comments { display: flex; flex-direction: column; gap: 13px; margin-bottom: 16px; }
.comment { display: flex; gap: 10px; }
.comment__head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; }
.comment__head .muted { font-size: 10.5px; font-weight: 400; }
.comment__text { font-size: 13.5px; color: var(--text-soft); margin-top: 2px; }
.comment__text.is-spoiler { filter: blur(4px); }
.comment-form { margin-top: 12px; }
.comment-form__meta { display: flex; justify-content: flex-end; }
.comment-form .comment-form__submit { align-self: center; }
.login-note { font-size: 13px; color: var(--muted); padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.login-note a { color: var(--accent); }

.store-list { display: flex; flex-direction: column; gap: 6px; }
.store-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); font-size: 13px; }
.store-link:hover { background: var(--surface-3); }
.store-link strong { color: var(--accent); }
.mini-list { display: flex; flex-direction: column; gap: 9px; }
.mini-book { display: flex; gap: 10px; align-items: center; }
.mini-book__cover { width: 38px; flex: 0 0 38px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; }
.mini-book__body { min-width: 0; }
.mini-book__body strong { display: block; font-family: var(--font-serif); font-size: 12.5px; line-height: 1.25; }
.mini-book__body small { font-size: 10.5px; color: var(--faint); }

/* ---------- author ---------- */
.author-hero { display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px; gap: 26px; align-items: start; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(150deg, var(--surface-2), var(--surface)); }
.author-hero__photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-serif); font-size: 38px; color: var(--muted); box-shadow: var(--shadow-sm); }
.author-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.author-hero__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.author-hero h1 { font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 44px); }
.author-hero__meta { font-size: 12px; color: var(--faint); margin-top: 4px; }
.author-hero__bio { color: var(--text-soft); margin-top: 10px; max-width: 62ch; }
.bio-more summary { color: var(--accent); font-size: 12px; margin-top: 6px; }
.bio-more p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.author-hero__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.author-hero__actions .muted { font-size: 12px; }
.author-hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.author-hero__stats div { padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.author-hero__stats dt { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.author-hero__stats dd { font-size: 19px; font-weight: 700; margin-top: 2px; }

.work-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.work-row { display: grid; grid-template-columns: 34px 42px minmax(0, 1fr) auto auto; gap: 13px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); transition: background .15s; }
.work-row:last-child { border-bottom: 0; }
.work-row:hover { background: var(--surface-2); }
.work-row__num { font-size: 12px; color: var(--faint); text-align: center; }
.work-row__cover { width: 42px; aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; }
.work-row__body strong { display: block; font-family: var(--font-serif); font-size: 14.5px; line-height: 1.25; }
.work-row__body small { font-size: 11px; color: var(--muted); }
.work-row__rating { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.author-grid--compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.author-card { display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); transition: .15s; }
.author-card:hover { border-color: var(--surface-3); background: var(--surface-2); }
.author-card__photo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-serif); font-size: 18px; color: var(--muted); }
.author-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.author-card__body { display: flex; flex-direction: column; min-width: 0; }
.author-card__body strong { font-size: 13.5px; }
.author-card__body small { font-size: 11px; color: var(--muted); }
.author-card__body em { font-style: normal; font-size: 10.5px; color: var(--faint); margin-top: 2px; }

.letters { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0 20px; }
.letter { min-width: 28px; text-align: center; padding: 4px 6px; border-radius: 7px; font-size: 12px; color: var(--muted); }
.letter:hover { background: var(--surface); color: var(--text); }
.letter.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.collection-hero { display: flex; justify-content: space-between; gap: 28px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: radial-gradient(600px 300px at 100% 0%, rgba(157, 123, 255, .14), transparent 65%), linear-gradient(150deg, var(--surface-2), var(--surface)); }
.collection-hero h1 { font-family: var(--font-serif); margin-bottom: 6px; }
.collection-hero__author { font-size: 14px; color: var(--muted); }
.collection-hero__author a { color: var(--accent); }
.collection-hero__desc { color: var(--text-soft); margin-top: 10px; max-width: 70ch; }
.progress-card { min-width: 210px; align-self: center; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.progress-card__label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.progress-card strong { font-size: 24px; }
.progress-card small { font-size: 11px; color: var(--muted); }

/* ---------- profile ---------- */
.profile-hero { display: grid; grid-template-columns: 110px minmax(0, 1fr) 380px; gap: 26px; align-items: center; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(150deg, var(--surface-2), var(--surface)); }
.profile-hero__avatar { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-serif); font-size: 30px; color: var(--muted); }
.profile-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-hero h1 { font-family: var(--font-serif); }
.profile-hero__username { font-size: 12px; color: var(--faint); }
.profile-hero__bio { color: var(--text-soft); margin-top: 8px; }
.profile-hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.profile-stats div { padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.profile-stats div:last-child { grid-column: span 2; }
.profile-stats dt { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.profile-stats dd { font-size: 19px; font-weight: 700; }
.profile-genres { margin-top: 14px; }

.tabs { display: flex; gap: 4px; margin: 26px 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-color: var(--accent); }
.tab span { font-size: 11px; color: var(--faint); margin-left: 4px; }
.locked { text-align: center; padding: 46px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.locked__icon { font-size: 30px; color: var(--faint); }
.locked h2 { font-size: 20px; margin: 8px 0 6px; }
.locked p { color: var(--muted); max-width: 48ch; margin: 0 auto; }

.review-cards { display: flex; flex-direction: column; gap: 9px; }
.review-card { padding: 13px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.review-card:hover { border-color: var(--surface-3); }
.review-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-card__head strong { font-family: var(--font-serif); font-size: 14px; }
.review-card__rating { font-size: 11px; color: var(--accent); }
.review-card__title { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.review-card p { font-size: 12.5px; color: var(--faint); }
.friend-list { display: flex; flex-wrap: wrap; gap: 9px; }
.friend { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 12.5px; }
.friend:hover { border-color: var(--surface-3); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field__hint { font-size: 11px; color: var(--faint); }
.field__hint ul { margin: 4px 0 0 16px; }
.field__error { font-size: 11px; color: var(--red); }
.field input, .field select, .field textarea, .form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"], .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elevated);
  padding: 10px 12px; color: var(--text); outline: none; font-size: 14px;
}
.field input[type="checkbox"], .field input[type="radio"] {
  width: auto; padding: 0; accent-color: var(--accent);
}
.field input[type="file"] { padding: 8px; }
.field input:focus, .field select:focus, .field textarea:focus, .form textarea:focus { border-color: rgba(246, 183, 60, .55); }
.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); }
.checkbox input { margin-top: 3px; }
.checkbox--field { align-items: center; gap: 7px; color: var(--text-soft); font-size: 13px; padding: 2px 0; }
.checkbox--field input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.checkbox a { color: var(--accent); }
.inline-search { display: flex; gap: 7px; }
.inline-search input { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 12px; color: var(--text); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.settings-note strong { font-size: 12px; }
.settings-note p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 620px; border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; }
.auth__art { position: relative; padding: 38px; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(500px 300px at 80% 10%, rgba(157, 123, 255, .3), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(246, 183, 60, .22), transparent 60%), linear-gradient(150deg, #1a2130, #0d1015); overflow: hidden; color: #f4f6fa; }
.auth__art h2 { font-family: var(--font-serif); font-size: 36px; max-width: 12ch; margin-bottom: 12px; color: #f7f8fb; }
.auth__art p { color: #c3cad6; max-width: 38ch; }
.auth__art .eyebrow { color: #ffd479; }
.auth__art .auth__list li { color: #dfe5ee; }
.auth__art .auth__link { color: #ffd479; }
.mobile-gate__actions { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 14px; }
.ad-slot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.load-more-wrap { display: flex; justify-content: center; margin: 24px 0 8px; }
.ad-slot__label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.ad-slot strong { font-size: 13px; }
.ad-slot p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.ad-slot .btn { margin-left: auto; }
.pricing-group { margin-top: 30px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pricing-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pricing-card--pro { border-color: rgba(246, 183, 60, .45); background: linear-gradient(150deg, rgba(246, 183, 60, .09), var(--surface)); }
.pricing-card__price { display: block; font-family: var(--font-serif); font-size: 30px; margin: 8px 0; }
.pricing-card .btn { margin-top: 12px; }
.pro-status { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 14px 16px; }
.locked { max-width: 560px; margin: 60px auto; text-align: center; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); }
.locked__icon { font-size: 40px; }
.locked h1 { margin: 10px 0; }
.locked p { color: var(--muted); margin-bottom: 18px; }
.gate-page .topbar, .gate-page .sidebar, .gate-page .footer, .gate-page .mobile-nav { display: none; }
.gate-page .app { display: block; }
.gate-page .shell { max-width: none; }
.gate-page .main { max-width: 760px; margin: 0 auto; padding: 28px 18px 40px; min-height: 100vh; display: flex; align-items: center; }
.gate-page .auth { min-height: 0; width: 100%; }
.auth__covers { position: relative; height: 150px; margin-top: 26px; }
.auth__cover { position: absolute; width: 82px; aspect-ratio: 2 / 3; border-radius: 7px; background: linear-gradient(150deg, #f6b73c, #7a4d05); box-shadow: var(--shadow-cover); }
.auth__cover--1 { left: 0; top: 16px; transform: rotate(-9deg); }
.auth__cover--2 { left: 56px; top: 0; background: linear-gradient(150deg, #9d7bff, #3b2670); transform: rotate(3deg); }
.auth__cover--3 { left: 112px; top: 20px; background: linear-gradient(150deg, #6ea8fe, #16356b); transform: rotate(12deg); }
.auth__list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.auth__list li { font-size: 13px; color: var(--text-soft); padding-left: 20px; position: relative; }
.auth__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.auth__link { margin-top: 24px; font-size: 13px; color: var(--accent); }
.auth__panel { padding: 44px; display: flex; flex-direction: column; justify-content: center; background: var(--bg-elevated); }
.auth__panel h1 { margin-bottom: 6px; }
.auth__panel > .muted { margin-bottom: 18px; }
.demo-note { margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.demo-note strong { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- onboarding ---------- */
.onboarding { max-width: 900px; margin: 0 auto; padding-top: 20px; }
.onboarding h1 { font-family: var(--font-serif); margin-bottom: 8px; }
.genre-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 24px 0; }
.genre-pick input { position: absolute; opacity: 0; pointer-events: none; }
.genre-pick__body { display: flex; flex-direction: column; gap: 3px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .15s; cursor: pointer; }
.genre-pick__body strong { font-size: 14px; }
.genre-pick__body small { font-size: 11px; color: var(--faint); }
.genre-pick input:checked + .genre-pick__body { border-color: var(--accent); background: rgba(246, 183, 60, .1); box-shadow: inset 0 0 0 1px var(--accent); }
.genre-pick input:focus-visible + .genre-pick__body { outline: 2px solid var(--accent); }
.onboarding__actions { display: flex; gap: 10px; }

/* ---------- notifications ---------- */
.notifications { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.notification { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.notification:last-child { border-bottom: 0; }
.notification:hover { background: var(--surface-2); }
.notification__dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 7px; flex: 0 0 auto; }
.notification.is-unread .notification__dot { background: var(--accent); box-shadow: 0 0 8px rgba(246, 183, 60, .6); }
.notification__body { display: flex; flex-direction: column; gap: 2px; }
.notification__body strong { font-size: 13.5px; }
.notification__body span { font-size: 12.5px; color: var(--muted); }
.notification__body small { font-size: 10.5px; color: var(--faint); }

/* ---------- search ---------- */
.search-page { max-width: 1100px; }
.search-page h1 { font-family: var(--font-serif); }
.search-page__form { display: flex; gap: 9px; margin: 18px 0; max-width: 620px; }
.search-page__form input { flex: 1; height: 48px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 0 16px; color: var(--text); font-size: 15px; }
.search-hints { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }

/* ---------- article / news ---------- */
.article { max-width: 780px; }
.article__head h1 { font-family: var(--font-serif); margin: 10px 0; }
.article__meta { font-size: 12px; color: var(--faint); }
.article__meta a { color: var(--accent); }
.article__lead { font-size: 18px; color: var(--text-soft); line-height: 1.5; margin: 18px 0; padding-left: 16px; border-left: 3px solid var(--accent); }
.article .prose { font-size: 16px; }
.article__works { margin-top: 28px; }
.article__works h2 { margin-bottom: 14px; }

/* ---------- rights ---------- */
.rights-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.steps { display: flex; flex-direction: column; gap: 12px; counter-reset: step; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 34px; font-size: 13px; color: var(--text-soft); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgba(246, 183, 60, .15); color: var(--accent); }
.steps strong { color: var(--text); }
.simple-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.simple-table th, .simple-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.simple-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }

/* ---------- achievements ---------- */
.profile-level { margin-top: 14px; max-width: 380px; display: flex; flex-direction: column; gap: 6px; }
.profile-level__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-level__badge { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 2px 7px; border-radius: 5px; }
.profile-level__top strong { font-size: 14px; }
.profile-level__top .muted { font-size: 11px; }
.profile-level small { font-size: 10.5px; }

.achievements-section__meta { display: flex; align-items: center; gap: 14px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.ach-grid--compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ach-card {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--surface); opacity: .55; filter: grayscale(.85);
  transition: opacity .2s, filter .2s, border-color .2s;
}
.ach-card.is-awarded { opacity: 1; filter: none; border-color: var(--line); }
.ach-card.is-awarded:hover { border-color: rgba(246, 183, 60, .45); }
.ach-card__icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  background: var(--surface-2);
}
.ach-card.is-awarded .ach-card__icon { background: linear-gradient(150deg, var(--surface-3), var(--surface)); }
.tier-bronze .ach-card__icon { box-shadow: 0 0 0 2px #cd7f32; }
.tier-silver .ach-card__icon { box-shadow: 0 0 0 2px #c0c0c0; }
.tier-gold .ach-card__icon { box-shadow: 0 0 0 2px #f6b73c; }
.tier-platinum .ach-card__icon { box-shadow: 0 0 0 2px #a5f3fc; }
.ach-card__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ach-card__body strong { font-size: 12.5px; line-height: 1.25; }
.ach-card__body small { font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.ach-card__date { font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.ach-card__progress { display: block; height: 3px; border-radius: 3px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.ach-card__progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ach-card__count { font-size: 9.5px; color: var(--faint); }
.next-achievements { margin-top: 16px; }
.next-achievements__caption { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 7px; }

.ach-page-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(150deg, var(--surface-2), var(--surface)); margin-bottom: 16px; }
.ach-page-head__user { display: flex; align-items: center; gap: 16px; }
.ach-page-head h1 { font-family: var(--font-serif); margin: 0; }
.ach-page-head .muted { font-size: 12px; }
.level-card { min-width: 240px; display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.level-card__label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.level-card strong { font-size: 18px; }
.level-card small { font-size: 10.5px; }
.ach-category .section__head h2 { font-size: 18px; }

.feed-item__achievement { font-size: 12px; color: var(--accent); }
.ach-inline { color: var(--accent); font-size: 12.5px; }

/* ---------- pagination / empty ---------- */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 30px; }
.pagination-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 30px; }
.pagination-wrap .pagination { margin-top: 0; justify-content: center; }
.pagination__meta { color: var(--muted); font-size: 12.5px; text-align: center; }
.pagination__edge { border-color: var(--line); color: var(--accent); font-weight: 700; }
.pagination a, .pagination__current, .pagination__arrow, .pagination__edge { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; color: var(--muted); border: 1px solid transparent; }
.pagination a:hover { background: var(--surface); color: var(--text); border-color: var(--line); }
.pagination__current { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pagination__arrow { border-color: var(--line); }
.empty { text-align: center; padding: 44px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); margin: 20px 0; }
.empty__icon { font-size: 32px; color: var(--faint); }
.empty h3 { margin: 8px 0 5px; font-family: var(--font-serif); font-size: 20px; }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 46ch; margin: 0 auto 14px; }

/* ---------- footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line-soft); padding: 34px 38px 26px; background: var(--bg-elevated); }
.footer__grid { display: grid; grid-template-columns: 1.5fr .85fr .9fr .9fr 1fr; gap: 24px; max-width: 1480px; margin: 0 auto; }
.footer__brand strong { font-family: var(--font-serif); font-size: 18px; }
.footer__brand p { color: var(--faint); font-size: 12px; margin-top: 6px; max-width: 34ch; }
.footer__caption { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 8px; }
.footer__grid a { display: block; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.footer__grid a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; max-width: 1480px; margin: 26px auto 0; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--faint); }

/* ---------- mobile nav ---------- */
.mobile-nav { display: none; }

/* ---------- catalog ---------- */
.catalog-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 30px; align-items: start; }
.catalog-filters { position: sticky; top: 80px; }
.filters { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.filters__group { display: flex; flex-direction: column; gap: 5px; }
.filters__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.filters select, .filters input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-elevated); color: var(--text); padding: 0 9px; font-size: 12.5px; }
.filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.filters__hint { font-size: 11px; color: var(--faint); }
.filters__reset { text-align: center; font-size: 11.5px; color: var(--faint); }
.filters__reset:hover { color: var(--accent); }
.filters__note { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); }
.filters__note strong { font-size: 11px; color: var(--accent); }
.filters__note p { font-size: 11px; color: var(--faint); margin-top: 3px; }
.catalog-toolbar { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.catalog-toolbar .chips { margin: 0; }
.sort { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; margin: 6px 0 20px; padding: 2px 0 10px; border-bottom: 1px solid var(--line-soft); }
.sort .muted { font-size: 12px; }
.sort a { color: var(--faint); padding: 2px 0; }
.sort a { color: var(--faint); }
.sort a:hover, .sort a.is-active { color: var(--accent); }
.sort a.is-active { font-weight: 600; }
.sort-arrow { display: inline-block; margin-left: 3px; font-size: 12px; color: var(--accent); }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.active-filters a { color: inherit; opacity: .7; }

/* ---------- misc ---------- */
.fragment-box p, .article p { max-width: none; }
.button-row .btn { flex: 0 0 auto; }

/* ---------- adaptive ---------- */
@media (max-width: 1280px) {
  .main { padding: 24px 28px 60px; }
  .topbar { padding: 12px 28px; }
  .footer { padding: 30px 28px 24px; }
  .hero { padding: 38px; }
  .book-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; }
  .home-columns { grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; }
  .profile-hero { grid-template-columns: 100px minmax(0, 1fr) 340px; }
}

@media (max-width: 1100px) {
  :root { --sidebar: 228px; }
  .hero { grid-template-columns: 1fr; }
  .hero__covers { display: none; }
  .hero h1 { max-width: 20ch; }
  .home-columns { grid-template-columns: 1fr; }
  .book-layout { grid-template-columns: 1fr; }
  .book-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .book-aside .panel + .panel { margin-top: 0; }
  .profile-hero { grid-template-columns: 100px minmax(0, 1fr); }
  .profile-stats { grid-column: 1 / -1; grid-template-columns: repeat(5, 1fr); }
  .profile-stats div:last-child { grid-column: auto; }
  .author-hero { grid-template-columns: 120px minmax(0, 1fr); }
  .author-hero__stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .rights-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app { display: block; }
  .main { padding: 20px 18px 110px; }
  .topbar { padding: 10px 16px; }
  .topbar .btn--ghost { display: none; }
  .search-hints { grid-template-columns: 1fr; }
  .footer { padding: 26px 18px 100px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; gap: 5px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: rgba(13, 16, 21, .94); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  [data-theme="light"] .mobile-nav { background: rgba(251, 249, 244, .96); }
  .mobile-nav__item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 22px; color: var(--faint); padding: 4px 0; }
  .mobile-nav__item small { font-size: 10px; }
  .mobile-nav__item.is-active { color: var(--accent); }
  .toasts { bottom: 80px; right: 12px; left: 12px; }
  .book-hero { grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
  .book-hero__cover { position: sticky; top: 80px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filters { position: static; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters .btn, .filters__reset { grid-column: 1 / -1; }
  .filters__note { display: none; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth__art { display: none; }
  .auth__panel { padding: 30px 24px; }
  .two-columns { grid-template-columns: 1fr; gap: 20px; }
  .search-hints { grid-template-columns: 1fr; }
  .anchor-nav { top: 58px; }
}

@media (max-width: 720px) {
  h1 { font-size: 30px; }
  .main { padding: 16px 14px 104px; }
  .hero { padding: 26px 20px; border-radius: var(--radius-lg); }
  .hero h1 { font-size: 34px; }
  .hero__lead { font-size: 14px; }
  .hero__stats { gap: 18px; }
  .hero__stats strong { font-size: 17px; }
  .welcome { flex-direction: column; align-items: flex-start; gap: 12px; }
  .news-list--grid { grid-template-columns: 1fr; }
  .status-control__btn[data-status="rereading"] { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .book-hero { grid-template-columns: 1fr; }
  .book-hero__media { display: flex; gap: 16px; align-items: flex-start; }
  .book-hero__cover { width: 130px; flex: 0 0 130px; position: static; }
  .book-hero__info h1 { font-size: 28px; }
  .book-facts { grid-template-columns: 1fr 1fr; }
  .edition-row { grid-template-columns: 38px 1fr; gap: 6px 10px; }
  .book-aside { grid-template-columns: 1fr; }
  .author-hero { grid-template-columns: 1fr; text-align: left; }
  .author-hero__photo { width: 96px; }
  .author-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero__avatar { width: 80px; height: 80px; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); grid-column: auto; }
  .profile-stats div:last-child { grid-column: auto; }
  .ach-page-head { flex-direction: column; align-items: flex-start; }
  .level-card { width: 100%; }
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 20px 12px; }
  .book-card__title { font-size: 13.5px; }
  .author-grid { grid-template-columns: 1fr 1fr; }
  .genre-grid { grid-template-columns: 1fr 1fr; }
  .collection-hero { flex-direction: column; padding: 22px; }
  .progress-card { width: 100%; }
  .filters { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 18px; }
  .work-row { grid-template-columns: 26px 38px minmax(0, 1fr) auto; }
  .work-row__rating { display: none; }
  .anchor-nav { margin-top: 8px; }
  .review { padding: 14px; }
  .continue-row { grid-template-columns: 1fr; }
  .sort { font-size: 13px; gap: 10px; margin-bottom: 16px; }
}

@media (max-width: 420px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-grid--wide { grid-template-columns: 1fr 1fr; }
  .hero__search { flex-direction: column; }
  .hero__search .btn { width: 100%; }
  .status-control { width: 100%; }
  .status-control__btn { flex: 1; padding: 7px 6px; font-size: 11.5px; }
  .rating-control__dots { flex-wrap: wrap; }
  .rating-dot { width: 23px; height: 23px; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .author-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: 1fr; }
  .topbar__actions .btn--ghost { display: none; }
  .user-menu__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ---------- back button / Pro / favorites ---------- */
.back-button { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s; }
.back-button:hover { border-color: var(--accent); color: var(--accent); }
.back-button span:first-child { font-size: 18px; line-height: 1; }
.badge--pro { background: linear-gradient(135deg, #f6b73c, #ffdf91); color: #17130a; font-weight: 800; letter-spacing: .04em; box-shadow: 0 0 18px rgba(246, 183, 60, .45); }
.profile-stats__locked { grid-column: 1 / -1; color: var(--faint); font-size: 12px; }
.favorites-section, .favorite-book { min-width: 0; }
.favorite-book__count { display: block; margin-top: 6px; font-size: 11px; line-height: 1.4; color: var(--accent); }
@media (max-width: 700px) { .back-button { position: sticky; top: 8px; z-index: 20; } .back-button__text { display: none; } }


.panel--narrow { max-width: 680px; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.cover-grid__item { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; }
.cover-grid__item img { width: 100%; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.cover-grid__item:hover { color: var(--accent); }

.avatar { position: relative; display: inline-flex; }
.avatar__pro { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #f6b73c, #ffe3a3); color: #17130a; font-size: 10px; box-shadow: 0 0 10px rgba(246,183,60,.6); }

.footer__app { display: inline-flex; align-items: center; gap: 0; }
.footer__app img { width: 132px; height: auto; display: block; border-radius: 7px; filter: drop-shadow(0 0 8px rgba(246,183,60,.18)); }

.modal { width: min(560px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.modal__close { position: absolute; right: 16px; top: 12px; border: 0; background: none; color: var(--muted); font-size: 28px; cursor: pointer; }
.modal__title { margin: 0 36px 18px 0; font-family: var(--font-serif); font-size: 26px; }
.modal__body .form { margin: 0; }
.modal__body .field:last-of-type { margin-bottom: 10px; }



/* ---------- author page ---------- */
.author-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.author-facts dt { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.author-facts dd { margin: 2px 0 0; font-size: 14px; color: var(--text); }
.author-genres { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: 12px; }
.author-bio { margin-top: 22px; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); }
.author-bio .section__head { margin-bottom: 8px; }
.author-bio__short { color: var(--text-soft); width: 100%; max-width: none; margin: 0 0 10px; line-height: 1.7; text-align: justify; }
.author-bio__more { margin-top: 4px; }
.author-bio__more summary { color: var(--accent); font-size: 13px; cursor: pointer; list-style: none; display: inline-flex; gap: 6px; }
.author-bio__more summary::-webkit-details-marker { display: none; }
.author-bio__more summary::before { content: "＋"; }
.author-bio__more[open] summary::before { content: "−"; }
.author-bio__close { display: none; }
.author-bio__more[open] .author-bio__open { display: none; }
.author-bio__more[open] .author-bio__close { display: inline; }
.author-bio__more[open] .author-bio__short { display: none; }
.author-bio__full { color: var(--text-soft); width: 100%; line-height: 1.75; max-width: none; margin-top: 12px; text-align: justify; }
.author-view-switch { display: inline-flex; gap: 4px; margin: 24px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.author-view-switch__item { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: 13px; }
.author-view-switch__item.is-active { color: #17130a; background: var(--accent); font-weight: 700; }

.author-bio:has(.author-bio__more[open]) .author-bio__short { display: none; }
.country-flag { display: inline-block; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }

.author-bio__more[open] > summary { display: none; }
.author-bio__collapse { margin-top: 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.author-bio__collapse:hover { border-color: var(--accent); }
.author-bio__collapse { margin: 12px 0 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; }
.author-bio__collapse:hover { text-decoration: none; color: var(--accent-strong); text-shadow: 0 0 8px rgba(246,183,60,.28); }

/* ---------- link hover: colour + faint glow, never underline ---------- */
a { transition: color .15s ease, text-shadow .15s ease; }
a:hover, a:focus-visible { text-decoration: none; text-shadow: 0 0 10px rgba(246, 183, 60, .22); }
/* links: no underline/glow; yellow text links brighten slightly */
a:hover, a:focus-visible { text-decoration: none; text-shadow: none; }

.author-bio__collapse:hover, .author-bio__more summary:hover { color: var(--accent-strong); text-shadow: none; text-decoration: none; }
/* keep tabs readable: only text links change colour */
.author-view-switch__item:hover:not(.is-active) { color: var(--text); }
.author-view-switch__item.is-active,
.author-view-switch__item.is-active:hover,
.author-view-switch__item.is-active:focus-visible { color: #17130a; text-shadow: none; }
.author-view-switch.is-loading, #author-sections.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

.author-bio p, .author-bio__full p { max-width: none; width: 100%; text-align: justify; }
.author-facts { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.author-facts > div { display: flex; align-items: center; flex-wrap: nowrap; gap: 7px; }
.author-facts dt { white-space: nowrap; }
.author-facts dd { margin: 0; display: inline-flex; align-items: center; white-space: nowrap; }
.author-bio__short--faded {
  padding-bottom: 10px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.35) 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.35) 86%, transparent 100%);
}
.author-bio__preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; }
.author-bio__preview .author-bio__short { display: inline; margin: 0; flex: 0 1 auto; }
.author-bio__preview .author-bio__more { display: inline; margin: 0; }
.author-bio__preview .author-bio__more summary { display: inline; margin-left: 6px; }
.author-bio__preview .author-bio__more[open] { display: block; flex-basis: 100%; width: 100%; }
.author-bio__preview:has(.author-bio__more[open]) .author-bio__short { display: none; }
.author-bio__preview { display: block; }
.author-bio__preview .author-bio__short { display: inline; }
.author-bio__preview .author-bio__more { display: inline; }
.author-bio__preview .author-bio__more summary { display: inline; }
.author-bio__preview .author-bio__more[open] { display: block; width: 100%; }
.author-bio__preview .author-bio__more summary { white-space: nowrap; }
.author-bio__preview .author-bio__more summary::before { content: none !important; }
.author-bio__preview .author-bio__more[open] > summary { display: none !important; }
.author-bio__fade-char { display: inline; }
.author-bio__preview .author-bio__more summary { list-style: none; } .author-bio__preview .author-bio__more summary::marker { content: ""; }
.cover-grid__item > a { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.cover-grid__item > a:hover { color: var(--accent); }
.cover-grid__item form { margin-top: 2px; }
.cover-grid__item form .btn { width: 100%; justify-content: center; font-size: 10.5px; padding: 6px 8px; }
.genre-check { break-inside: avoid; margin: 2px 0; }
.genre-check label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-soft); cursor: pointer; }
.genre-check input { accent-color: var(--accent); }
.settings-grid { grid-template-columns: 1fr; }
.genre-columns { columns: 3; column-gap: 22px; margin: 4px 0 10px; }
.field:has(> input[type="checkbox"]) { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 7px; }
.field:has(> input[type="checkbox"]) > input { grid-column: 1; grid-row: 1; width: 16px; height: 16px; margin: 0; padding: 0; }
.field:has(> input[type="checkbox"]) > .field__label { grid-column: 2; grid-row: 1; }
.field:has(> input[type="checkbox"]) > .field__hint { grid-column: 2; margin-top: 0; }
@media (max-width: 1050px) { .genre-columns { columns: 2; } }
@media (max-width: 700px) { .genre-columns { columns: 1; } }
.profile-avatar-row { display: flex; align-items: center; gap: 16px; padding: 4px 0 8px; }
.profile-avatar-edit { position: relative; display: inline-flex; cursor: pointer; flex: 0 0 auto; }
.profile-avatar-edit .avatar { border: 1px solid var(--line); }
.profile-avatar-edit__pencil { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #17130a; font-size: 15px; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.profile-avatar-edit input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-avatar-edit.is-disabled { opacity: .55; cursor: not-allowed; }
.profile-avatar-edit.is-disabled input[type="file"] { cursor: not-allowed; }
.profile-form-layout { display: flex; align-items: flex-start; gap: 22px; }
.profile-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 13px; }
.profile-avatar-edit { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.profile-avatar-pro-hint { position: absolute; left: 0; bottom: 30px; z-index: 5; transform: translateY(4px); width: max-content; max-width: 250px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text-soft); font-size: 11.5px; line-height: 1.4; box-shadow: var(--shadow-sm); opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.profile-avatar-edit.is-hint .profile-avatar-pro-hint { opacity: 1; visibility: visible; transform: translateY(0); }
.privacy-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.privacy-form > button { grid-column: 1 / -1; justify-self: start; }
.form select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aab2c0' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; color-scheme: dark; }
.form select option { background: var(--surface-2); color: var(--text); }
@media (max-width: 760px) { .privacy-form { grid-template-columns: 1fr; } .profile-form-layout { gap: 16px; } }
.profile-avatar-edit input[type="file"] { pointer-events: none; }


.settings-grid .panel > p,
.settings-note p { max-width: none; }
.avatar--xl { width: 150px; height: 150px; font-size: 0; }
.avatar__person { display: block; width: 58%; height: 58%; color: var(--muted); }
.profile-hero__avatar .avatar__person { width: 62%; height: 62%; color: var(--faint); }
.profile-avatar-edit { z-index: 30; }
.profile-avatar-pro-hint { z-index: 1000; background: var(--surface-3); box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.avatar-pro-toast { position: fixed; z-index: 100000; max-width: 280px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 12px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.6); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.avatar-pro-toast.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.avatar { display: inline-grid; place-items: center; }
.avatar__person { width: 100%; height: 100%; }
.profile-hero__avatar .avatar__person { width: 100%; height: 100%; }
.profile-avatar-edit__pencil { right: -10px; bottom: -10px; }
.profile-avatar-edit__pencil { right: 8px; bottom: 8px; }
.avatar--sm .avatar__person { width: 82%; height: 82%; }
.avatar__person { width: 100%; height: auto; aspect-ratio: 1; }
.avatar--sm .avatar__person { width: 82%; height: auto; }
.profile-hero__avatar .avatar__person { width: 100%; height: auto; }
.profile-avatar-edit .avatar { border: 0; box-shadow: 0 0 0 1px var(--line); }
.avatar .avatar__person { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.avatar--sm .avatar__person { width: 82%; height: 82%; }
.profile-avatar-edit .avatar .avatar__person { width: 100%; height: 100%; }
.profile-avatar-edit .avatar .avatar__person { width: 104%; height: 104%; }
.avatar-default--dark { display: none !important; }
[data-theme="dark"] .avatar-default--light { display: none !important; }
[data-theme="dark"] .avatar-default--dark { display: block !important; }
.avatar--xl { width: 165px; height: 165px; }
.avatar--sm { width: 30px; height: 30px; }
.avatar-default--light,
.avatar-default--dark { transform: scale(1.12); }
.profile-avatar-edit .avatar { box-shadow: none; }
.avatar-default--light,
.avatar-default--dark { transform: scale(1.22); }
.avatar-crop { position: fixed; inset: 0; z-index: 200000; display: grid; place-items: center; padding: 18px; background: rgba(4,6,9,.78); backdrop-filter: blur(5px); }
.avatar-crop[hidden] { display: none !important; }
.avatar-crop__dialog { width: min(440px, 100%); padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.65); }
.avatar-crop__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.avatar-crop__head strong { display: block; font-family: var(--font-serif); font-size: 19px; }
.avatar-crop__head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.avatar-crop__close { border: 0; background: transparent; color: var(--muted); font-size: 25px; line-height: 1; padding: 0 2px; }
.avatar-crop__stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #0b0d10; touch-action: none; cursor: grab; user-select: none; }
.avatar-crop__stage:active { cursor: grabbing; }
.avatar-crop__stage img { position: absolute; max-width: none; max-height: none; pointer-events: none; user-select: none; }
.avatar-crop__ring { position: absolute; inset: 8%; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.34); pointer-events: none; }
.avatar-crop__zoom { display: grid; grid-template-columns: 18px 1fr 18px; align-items: center; gap: 8px; margin: 14px 2px 4px; color: var(--muted); }
.avatar-crop__zoom input { width: 100%; accent-color: var(--accent); }
.avatar-crop__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.profile-avatar-remove { position: absolute; right: 44px; bottom: 8px; z-index: 4; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-3); color: var(--text-soft); font-size: 19px; line-height: 1; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.profile-avatar-remove:hover { background: var(--red); color: #fff; border-color: var(--red); }
.profile-form-layout { gap: 44px; }
.profile-avatar-remove { right: -40px; bottom: 8px; background: var(--red); color: #fff; border-color: var(--red); }
.profile-avatar-remove:hover { background: #b91c1c; border-color: #b91c1c; }
.profile-avatar-remove { right: -32px; bottom: 8px; padding: 0; line-height: 0; display: grid; place-items: center; background: #ff3b3b; color: #fff; border-color: #ff3b3b; }
.profile-avatar-remove svg { display: block; width: 12px; height: 12px; }
.profile-avatar-remove:hover { background: #df2020; border-color: #df2020; }
.profile-avatar-edit__pencil { display: grid; place-items: center; padding: 0; line-height: 0; }
.profile-avatar-edit__pencil svg { display: block; width: 14px; height: 14px; }
.profile-avatar-remove { right: -26px; }
.confirm-modal { position: fixed; inset: 0; z-index: 200001; display: grid; place-items: center; padding: 18px; background: rgba(4,6,9,.78); backdrop-filter: blur(5px); }
.confirm-modal[hidden] { display: none !important; }
.confirm-modal__dialog { width: min(400px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.65); }
.confirm-modal__dialog h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 22px; }
.confirm-modal__dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.confirm-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn--danger { background: #ff3b3b; color: #fff; border-color: #ff3b3b; }
.btn--danger:hover { background: #df2020; border-color: #df2020; }
.profile-avatar-edit__pencil { border: 0; cursor: pointer; }
.select-ui { position: relative; width: 100%; }
.select-ui__native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.select-ui__button { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 10px 38px 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elevated); color: var(--text); font-size: 14px; text-align: left; }
.select-ui__button:focus-visible { outline: 2px solid rgba(246,183,60,.55); outline-offset: 1px; border-color: rgba(246,183,60,.55); }
.select-ui__button[disabled] { opacity: .55; cursor: not-allowed; }
.select-ui__button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-ui__arrow { position: absolute; right: 13px; top: 50%; width: 12px; height: 8px; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.select-ui__menu { position: absolute; z-index: 1000; top: calc(100% + 6px); left: 0; width: 100%; max-height: 285px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); box-shadow: 0 14px 34px rgba(0,0,0,.55); }
.select-ui__menu[hidden] { display: none !important; }
.select-ui__option { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-soft); font-size: 13.5px; text-align: left; }
.select-ui__option:hover, .select-ui__option:focus-visible { background: var(--surface-3); color: var(--text); outline: none; }
.select-ui__option.is-selected { background: rgba(246,183,60,.12); color: var(--accent); font-weight: 600; }
.profile-avatar-edit, .profile-avatar-edit.is-disabled { cursor: default; }
.profile-avatar-edit__pencil { cursor: pointer; }
.news-search { margin: 14px 0 16px; }
.news-search__bar { display: flex; align-items: center; gap: 8px; }
.news-search__bar input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elevated); color: var(--text); padding: 0 13px; }
.news-search__bar .btn { flex: 0 0 auto; min-height: 40px; }
.news-search__filter-toggle.is-active { border-color: rgba(246,183,60,.55); color: var(--accent); background: rgba(246,183,60,.08); }
.news-filters--panel { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.news-filters--panel[hidden] { display: none !important; }
.news-filters--panel .select-ui { width: 100%; }
.news-filters--panel select, .news-filters--panel .select-ui__button { width: 100%; }
.news-filters__actions { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
@media (max-width: 560px) { .news-search__bar { flex-wrap: wrap; } .news-search__bar input[type="search"] { flex-basis: 100%; } }
.profile-form > .btn, .genre-form > .btn { align-self: flex-start; }
.profile-form > .btn, .genre-form > .btn { align-self: center; }
.privacy-form > button { justify-self: center; }
/* ---------- scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: #343c48 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #343c48; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #485363; }
::-webkit-scrollbar-corner { background: transparent; }
[data-theme="light"] * { scrollbar-color: #c3c8d0 transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c3c8d0; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #aab1bc; }
.topbar .back-button { flex: 0 0 auto; width: 38px; height: 38px; margin: 0; padding: 0; justify-content: center; border-radius: 10px; background: var(--surface); color: var(--muted); }
.topbar .back-button:hover { color: var(--accent); }
.topbar .back-button span:first-child { font-size: 18px; }
.topbar .back-button__text { display: none; }
.topbar .back-button { width: auto; min-width: 0; height: 38px; padding: 0 13px; gap: 6px; border-radius: 10px; justify-content: center; }
.topbar .back-button__chevron { flex: 0 0 auto; width: 9px; height: 18px; }
.topbar .back-button__text { display: inline; font-size: 13px; line-height: 1; font-weight: 600; }
@media (max-width: 700px) { .topbar .back-button__text { display: none; } .topbar .back-button { width: 38px; padding: 0; } }
.topbar .back-button__chevron { transform: translateY(2px); }
.topbar .back-button__chevron { transform: translateY(1px); }
.topbar { gap: 24px; padding-left: 24px; padding-right: 24px; }
.topbar .back-button { height: 40px; padding: 0 14px; line-height: 1; }
.topbar .back-button__chevron { transform: none; width: 9px; height: 18px; }
.topbar .back-button__text { line-height: 1; }
@media (max-width: 700px) { .topbar .back-button { width: 40px; padding: 0; } }
.topbar .back-button__text { transform: translateY(-0.5px); }
.req-star { color: var(--accent); margin-left: 3px; }
.settings-footnote { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11px; line-height: 1.45; }
.profile-form-layout { padding-left: 14px; gap: 32px; }
.password-form > .btn { align-self: center; }
.profile-community { display: block; margin-top: 34px; }
.profile-community .review-cards, .profile-community .friend-list { width: 100%; }
.profile-community .review-card { width: 100%; }
.anchor-nav { background: var(--bg); }
.section-count { color: var(--muted); font-size: .72em; font-weight: 400; margin-left: 5px; }
.review-card { display: block; width: 100%; cursor: default; }
.review-card p.review-card__text { max-width: none; width: 100%; line-height: 1.55; }
.review__text, .review__text p { max-width: none; width: 100%; }
.review-card__more { display: inline; margin-left: 3px; color: var(--accent); font-size: 12.5px; }
.review-card:hover .review-card__more { color: var(--accent-strong); }
.auth__forgot { text-align: right; margin-top: -3px; font-size: 12.5px; } .auth__forgot a { color: var(--accent); } .auth__forgot a:hover { color: var(--accent-strong); }
.modal [hidden] { display: none !important; }
.review-card__text--with-link { padding-right: 132px; }
.profile-community .review-card:hover { border-color: var(--line-soft); }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.email-code-open { align-self: flex-start; margin-top: -4px; }
.email-lock { color: var(--red) !important; }
.security-list { display: flex; flex-direction: column; gap: 12px; }
.security-row { display: flex; align-items: flex-end; gap: 12px; }
.security-row__field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.security-row__field input[readonly] { color: var(--text-soft); background: var(--surface-2); cursor: default; }
.security-edit { flex: 0 0 auto; }
.security-email-note { margin: -4px 0 0; }
.email-code-open { align-self: flex-start; margin-top: -4px; }
@media (max-width: 620px) {
  .security-row { align-items: stretch; flex-direction: column; }
  .security-edit { align-self: flex-start; }
}
.modal__body > p.muted { margin-bottom: 14px; }
.security-row__field.field { gap: 5px; }
.security-row__field.field input { height: 44px; box-sizing: border-box; }
.security-row .security-edit { height: 44px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-sizing: border-box; }
.security-row__field.field input { height: 34px; padding: 0 12px; }
.security-row .security-edit { height: 34px; }
.cover-grid__preview { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.cover-grid__preview img { display: block; width: 100%; }
.cover-preview-modal { width: auto; max-width: none; max-height: none; border: 0; border-radius: 0; padding: 0; background: transparent; overflow: visible; }
.cover-preview-modal::backdrop { background: rgba(0, 0, 0, .84); }
.cover-preview-modal__image { display: block; width: auto; height: auto; max-width: 92vw; max-height: 88vh; border-radius: 0; object-fit: contain; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.cover-preview-modal__close { position: fixed; top: 16px; right: 20px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; }
.cover-preview-modal { width: fit-content; height: fit-content; margin: auto; }
/* ---------- subscription tiers ---------- */
.pricing-tier-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; vertical-align: -6px; margin-right: 6px; }
.pricing-tier-icon--ad_free { color: #9bd7ff; background: rgba(99,179,237,.14); border: 1px solid rgba(99,179,237,.35); }
.pricing-tier-icon--pro { color: var(--accent); background: rgba(246,183,60,.12); border: 1px solid rgba(246,183,60,.4); }
.pricing-tier-icon--vip { color: #d9b8ff; background: rgba(166,108,255,.14); border: 1px solid rgba(166,108,255,.45); }
.pricing-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pricing-card__discount { font-size: 11px; font-weight: 700; color: #17130a; background: var(--accent); border-radius: 999px; padding: 3px 8px; }
.pricing-card__monthly { display: block; font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
.pricing-card--ad_free { border-color: rgba(99,179,237,.35); }
.pricing-card--vip { border-color: rgba(166,108,255,.45); background: linear-gradient(150deg, rgba(166,108,255,.09), var(--surface)); }

.avatar { overflow: visible; }
.avatar > img, .avatar .avatar-default { border-radius: inherit; }
.avatar__tier { position: absolute; right: -4px; bottom: -4px; z-index: 2; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 9px; line-height: 1; border: 1px solid var(--bg); }
.avatar__tier--ad_free { color: #08202e; background: #9bd7ff; }
.avatar__tier--pro { color: #17130a; background: var(--accent); }
.avatar__tier--vip { color: #1b1030; background: #d9b8ff; }
.avatar--tier-ad_free { border-color: rgba(99,179,237,.65); box-shadow: 0 0 0 2px rgba(99,179,237,.16); }
.avatar--tier-pro { border-color: rgba(246,183,60,.8); box-shadow: 0 0 0 2px rgba(246,183,60,.18); }
.avatar--tier-vip { border-color: #d9b8ff; box-shadow: 0 0 0 2px rgba(166,108,255,.3), 0 0 18px rgba(166,108,255,.18); }
.profile-hero__avatar { overflow: visible; }
.profile-hero__avatar > img { border-radius: 50%; }
.profile-hero__avatar { position: relative; }
.pricing-card .pricing-card__gift { margin-top: 8px; }
.gift-summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.gift-summary strong { font-family: var(--font-serif); font-size: 20px; }
.gift-summary small { color: var(--muted); }
.gift-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pricing-card .pricing-card__gift {
  background: linear-gradient(135deg, #5aa9ff, #2f7fe8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 127, 232, .28);
}
.pricing-card .pricing-card__gift:hover {
  background: linear-gradient(135deg, #77baff, #3b8ff5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(47, 127, 232, .42);
}
.pricing-card .pricing-card__gift {
  background: linear-gradient(135deg, #b18cff, #7a5bd6);
  border: 1px solid rgba(246, 183, 60, .38);
  color: #fff;
  box-shadow: 0 6px 18px rgba(122, 91, 214, .3);
}
.pricing-card .pricing-card__gift:hover {
  background: linear-gradient(135deg, #c3a4ff, #8b6bea);
  border-color: rgba(246, 183, 60, .55);
  color: #fff;
  box-shadow: 0 8px 22px rgba(122, 91, 214, .42);
}
.pricing-card .pricing-card__gift {
  background: linear-gradient(135deg, #343052, #292945);
  border: 1px solid #4a4468;
  color: #f3efff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
}
.pricing-card .pricing-card__gift:hover {
  background: linear-gradient(135deg, #403a63, #322f52);
  border-color: #665d8f;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
p { max-width: none !important; }
.comment-form__submit { padding-left: 20px; padding-right: 20px; }
.comment-form__meta { justify-content: center; }
.comment-form__actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.comment-form__actions .comment-form__submit { align-self: auto; }
.home-stats-banner { display: grid; grid-template-columns: minmax(180px, .9fr) 2fr; align-items: center; gap: 22px; margin: 16px 0 22px; padding: 18px 22px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: linear-gradient(120deg, var(--surface-2), var(--surface)); }
.home-stats-banner__head { display: flex; flex-direction: column; gap: 4px; }
.home-stats-banner__head strong { font-family: var(--font-serif); font-size: 19px; }
.home-stats-banner__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.home-stats-banner__grid > div { display: flex; flex-direction: column; gap: 2px; padding: 0 18px; border-left: 1px solid var(--line-soft); }
.home-stats-banner__grid strong { font-family: var(--font-serif); font-size: 27px; line-height: 1.1; color: var(--text); }
.home-stats-banner__grid span { font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) {
  .home-stats-banner { grid-template-columns: 1fr; gap: 14px; }
  .home-stats-banner__grid > div { padding: 0 12px; }
  .home-stats-banner__grid > div:first-child { border-left: 0; padding-left: 0; }
}
.share-button { display: inline-flex; align-items: center; gap: 5px; }
.share-button__icon { font-size: 14px; line-height: 1; color: var(--accent); }
.article__actions { margin-top: 12px; }
.share-icon { display: grid; place-items: center; padding: 0; line-height: 0; text-align: center; }
.share-icon__plane { display: block; margin: auto; color: var(--accent); }
.share-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 80;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, transform .15s, visibility .15s;
}
.share-icon:hover::after, .share-icon:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.icon-btn { line-height: 1; text-align: center; }
.share-icon__plane { color: currentColor; }
.pricing-group .section__head h2 { display: flex; align-items: center; gap: 8px; }
.pricing-tier-icon { vertical-align: 0; margin-right: 0; flex: 0 0 auto; }
.readers-search { display: flex; align-items: center; gap: 9px; margin: 18px 0 22px; max-width: 620px; }
.readers-search input[type="search"] { flex: 1; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-elevated); color: var(--text); padding: 0 13px; outline: none; }
.readers-search input[type="search"]:focus { border-color: rgba(246,183,60,.55); }
.reader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.reader-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.reader-card__avatar { flex: 0 0 auto; }
.reader-card__body { flex: 1; min-width: 0; }
.reader-card__name { display: block; font-family: var(--font-serif); font-size: 18px; color: var(--text); }
.reader-card__name:hover { color: var(--accent); }
.reader-card__username { display: block; font-size: 11.5px; color: var(--faint); }
.reader-card__bio { margin: 7px 0; color: var(--text-soft); font-size: 12.5px; }
.reader-card__genres { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.reader-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.reader-card__foot .muted { font-size: 10.5px; }
@media (max-width: 560px) { .reader-grid { grid-template-columns: 1fr; } .reader-card__foot { align-items: flex-start; flex-direction: column; } }
.avatar--tier-ad_free {
  border: 2px solid #7cc7ff;
  box-shadow: 0 0 0 3px rgba(99,179,237,.42), 0 0 16px rgba(99,179,237,.18);
}
.avatar--tier-pro {
  border: 2px solid #f6b73c;
  box-shadow: 0 0 0 3px rgba(246,183,60,.42), 0 0 16px rgba(246,183,60,.16);
}
.avatar--tier-vip {
  border: 2px solid #d9b8ff;
  box-shadow: 0 0 0 3px rgba(166,108,255,.55), 0 0 20px rgba(166,108,255,.28);
}
.profile-hero__avatar { border: 2px solid var(--line); }
.avatar__tier { width: 18px; height: 18px; border-width: 2px; }
.avatar--tier-ad_free { border-width: 3px; box-shadow: 0 0 0 4px rgba(99,179,237,.55), 0 0 18px rgba(99,179,237,.25); }
.avatar--tier-pro { border-width: 3px; box-shadow: 0 0 0 4px rgba(246,183,60,.55), 0 0 18px rgba(246,183,60,.24); }
.avatar--tier-vip { border-width: 3px; box-shadow: 0 0 0 4px rgba(166,108,255,.7), 0 0 22px rgba(166,108,255,.36); }
.profile-hero__avatar.avatar--tier-ad_free { border-width: 4px; box-shadow: 0 0 0 6px rgba(99,179,237,.55), 0 0 24px rgba(99,179,237,.25); }
.profile-hero__avatar.avatar--tier-pro { border-width: 4px; box-shadow: 0 0 0 6px rgba(246,183,60,.55), 0 0 24px rgba(246,183,60,.24); }
.profile-hero__avatar.avatar--tier-vip { border-width: 4px; box-shadow: 0 0 0 6px rgba(166,108,255,.7), 0 0 28px rgba(166,108,255,.38); }
.avatar--tier-ad_free { outline: 3px solid #7cc7ff; outline-offset: 1px; }
.avatar--tier-pro { outline: 3px solid #f6b73c; outline-offset: 1px; }
.avatar--tier-vip { outline: 3px solid #b18cff; outline-offset: 1px; }
.profile-hero__avatar.avatar--tier-ad_free { outline-width: 5px; outline-offset: 2px; }
.profile-hero__avatar.avatar--tier-pro { outline-width: 5px; outline-offset: 2px; }
.profile-hero__avatar.avatar--tier-vip { outline-width: 5px; outline-offset: 2px; }
.profile-hero__avatar.avatar--tier-ad_free { border-color: #7cc7ff; outline: 6px solid #7cc7ff; outline-offset: 2px; }
.profile-hero__avatar.avatar--tier-pro { border-color: #f6b73c; outline: 6px solid #f6b73c; outline-offset: 2px; }
.profile-hero__avatar.avatar--tier-vip { border-color: #d9b8ff; outline: 6px solid #b18cff; outline-offset: 2px; }
.avatar--tier-ad_free { border-color: #7cc7ff; outline: 4px solid #7cc7ff; outline-offset: 1px; }
.avatar--tier-pro { border-color: #f6b73c; outline: 4px solid #f6b73c; outline-offset: 1px; }
.avatar--tier-vip { border-color: #d9b8ff; outline: 4px solid #b18cff; outline-offset: 1px; }
/* единая рамка аватара: без двойных контуров и зазоров */
.avatar--tier-ad_free,
.avatar--tier-pro,
.avatar--tier-vip {
  border-style: solid;
  border-width: 2px;
  box-shadow: none !important;
  outline: 0 !important;
}
.avatar--tier-ad_free { border-color: #7cc7ff; }
.avatar--tier-pro { border-color: #f6b73c; }
.avatar--tier-vip { border-color: #d9b8ff; }
.avatar--sm.avatar--tier-ad_free,
.avatar--sm.avatar--tier-pro,
.avatar--sm.avatar--tier-vip { border-width: 2px; }
.avatar--lg.avatar--tier-ad_free,
.avatar--lg.avatar--tier-pro,
.avatar--lg.avatar--tier-vip { border-width: 3px; }
.avatar--xl.avatar--tier-ad_free,
.avatar--xl.avatar--tier-pro,
.avatar--xl.avatar--tier-vip { border-width: 4px; }
.avatar--tier-ad_free .avatar-default,
.avatar--tier-pro .avatar-default,
.avatar--tier-vip .avatar-default { transform: scale(1); }

.profile-hero__avatar {
  border: 3px solid var(--line);
  box-shadow: none !important;
  outline: 0 !important;
}
.profile-hero__avatar.avatar--tier-ad_free { border: 4px solid #7cc7ff; }
.profile-hero__avatar.avatar--tier-pro { border: 4px solid #f6b73c; }
.profile-hero__avatar.avatar--tier-vip { border: 4px solid #d9b8ff; }
.profile-hero__avatar .avatar-default { transform: scale(1); }

.avatar__tier {
  top: -5px;
  right: -5px;
  bottom: auto;
  width: 18px;
  height: 18px;
  border-width: 2px;
}
.avatar--sm .avatar__tier { top: -4px; right: -4px; width: 15px; height: 15px; font-size: 8px; border-width: 1.5px; }
.avatar--lg .avatar__tier { top: -6px; right: -6px; width: 24px; height: 24px; font-size: 11px; }
.avatar--xl .avatar__tier { top: -7px; right: -7px; width: 30px; height: 30px; font-size: 14px; }
.profile-hero__avatar .avatar__tier { top: -8px; right: -8px; width: 34px; height: 34px; font-size: 16px; }
/* финальные рамки и значки: насыщенные, без смещений */
.avatar--tier-ad_free { border-color: #58b6ff; }
.avatar--tier-pro { border-color: #ffc247; }
.avatar--tier-vip { border-color: #c68cff; }
.avatar--sm.avatar--tier-ad_free,
.avatar--sm.avatar--tier-pro,
.avatar--sm.avatar--tier-vip { border-width: 2px; border-style: solid; }
.avatar--lg.avatar--tier-ad_free,
.avatar--lg.avatar--tier-pro,
.avatar--lg.avatar--tier-vip { border-width: 3px; border-style: solid; }
.avatar--xl.avatar--tier-ad_free,
.avatar--xl.avatar--tier-pro,
.avatar--xl.avatar--tier-vip { border-width: 4px; border-style: solid; }
.profile-avatar-edit .avatar.avatar--xl.avatar--tier-ad_free { border: 4px solid #58b6ff; }
.profile-avatar-edit .avatar.avatar--xl.avatar--tier-pro { border: 4px solid #ffc247; }
.profile-avatar-edit .avatar.avatar--xl.avatar--tier-vip { border: 4px solid #c68cff; }
.profile-hero__avatar.avatar--tier-ad_free { border-color: #58b6ff; }
.profile-hero__avatar.avatar--tier-pro { border-color: #ffc247; }
.profile-hero__avatar.avatar--tier-vip { border-color: #c68cff; }
.avatar__tier--ad_free { color: #071c2e; background: linear-gradient(135deg, #a8dcff, #58b6ff); box-shadow: 0 0 8px rgba(88,182,255,.55); }
.avatar__tier--pro { color: #241a06; background: linear-gradient(135deg, #ffe08a, #ffc247); box-shadow: 0 0 8px rgba(255,194,71,.55); }
.avatar__tier--vip { color: #1b1030; background: linear-gradient(135deg, #e3c8ff, #b06cff); box-shadow: 0 0 9px rgba(176,108,255,.65); }
.avatar__tier { border: 2px solid var(--bg); }
.avatar--xl .avatar__tier { top: 24px; right: -8px; width: 34px; height: 34px; font-size: 15px; }
.avatar--lg .avatar__tier { top: 14px; right: -6px; width: 24px; height: 24px; font-size: 11px; }
.profile-hero__avatar .avatar__tier { top: 20px; right: -8px; width: 32px; height: 32px; font-size: 14px; }
.avatar--sm .avatar__tier { top: -4px; right: -4px; width: 15px; height: 15px; font-size: 8px; border-width: 1.5px; }
.avatar--xl .avatar__tier { top: -8px; right: 21px; width: 34px; height: 34px; }
.profile-hero__avatar .avatar__tier { top: -8px; right: 14px; width: 32px; height: 32px; }
.avatar--lg .avatar__tier { top: -5px; right: 10px; width: 24px; height: 24px; }
.avatar--sm .avatar__tier { top: -3px; right: -3px; width: 13px; height: 13px; font-size: 7px; border-width: 1.5px; }
.avatar--xl .avatar__tier { top: -3px; right: 15px; }
.profile-hero__avatar .avatar__tier { top: -3px; right: 12px; }
.avatar--lg .avatar__tier { top: -2px; right: 8px; }
.avatar--xl .avatar__tier { top: 2px; right: 3px; }
.profile-hero__avatar .avatar__tier { top: -1px; right: -5px; }
.avatar--lg .avatar__tier { top: 0; right: -2px; }
.avatar--xl .avatar__tier { top: -7px; right: 11px; }
.profile-hero__avatar .avatar__tier { top: -6px; right: 3px; }
.avatar--lg .avatar__tier { top: -4px; right: 2px; }
.avatar--xl .avatar__tier { top: -7px; right: 11px; }
.profile-hero__avatar .avatar__tier { top: -9px; right: 3px; }
.avatar--lg .avatar__tier { top: -6px; right: 4px; }
.avatar--sm .avatar__tier { top: -5px; right: -1px; }
.friends-add { margin-top: 12px; }
.author-genre-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 10px 0 16px; }
.author-genre-filters__label { color: var(--muted); font-size: 12px; margin-right: 2px; }
.genre-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text-soft); font-size: 12px; line-height: 1.2; transition: .15s; }
.genre-filter span { color: var(--faint); font-size: 10px; }
.genre-filter:hover { border-color: var(--surface-3); color: var(--text); background: var(--surface-2); }
.genre-filter.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.genre-filter.is-active span { color: var(--accent-ink); opacity: .7; }
.author-genre-empty { margin: 16px 0; color: var(--muted); }
.work-row[hidden] { display: none !important; }
.profile-hero { position: relative; }
.profile-menu { position: absolute; top: 20px; right: 22px; z-index: 30; }
.profile-menu__trigger { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text-soft); font-size: 22px; line-height: 1; cursor: pointer; list-style: none; }
.profile-menu__trigger::-webkit-details-marker { display: none; }
.profile-menu__trigger:hover { background: var(--surface-2); color: var(--text); }
.profile-menu__popover { position: absolute; top: calc(100% + 8px); right: 0; width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.profile-menu__popover a, .profile-menu__popover button { display: flex; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-soft); font-size: 12.5px; text-align: left; cursor: pointer; }
.profile-menu__popover a:hover, .profile-menu__popover button:hover { background: var(--surface-3); color: var(--text); }
.profile-menu__popover .profile-menu__block { color: #fca5a5; }
.modal__actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
@media (max-width: 560px) { .profile-menu { top: 12px; right: 12px; } }
.friend-remove { border: 0; cursor: pointer; font-family: inherit; }
.profile-menu__popover a, .profile-menu__popover button { align-items: center; gap: 9px; }
.profile-menu__icon { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.profile-menu__popover span { line-height: 1.25; }
@media (min-width: 901px) { .profile-hero { padding-right: 64px; } }
@media (max-width: 900px) { .profile-hero { padding-top: 64px; } }

.profile-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.profile-side .profile-menu { position: relative; top: auto; right: auto; align-self: flex-end; }
@media (max-width: 1100px) { .profile-side { grid-column: 1 / -1; } }
@media (min-width: 901px) { .profile-hero { padding-right: 26px; } }
@media (max-width: 900px) { .profile-hero { padding-top: 26px; } }
.profile-menu__trigger { background: #1b212b; border-color: rgba(246,183,60,.55); color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.profile-menu__trigger:hover { background: rgba(246,183,60,.16); border-color: var(--accent); color: var(--accent-strong); }
.profile-menu__trigger { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 16px rgba(246,183,60,.28); }
.profile-menu__trigger:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.profile-hero { padding: 16px 26px; align-items: start; }
.profile-hero__avatar { width: 120px; height: 120px; margin-top: 31px; }
@media (min-width: 1101px) { .profile-hero { grid-template-columns: 120px minmax(0, 1fr) 380px; } }
@media (max-width: 1100px) { .profile-hero__avatar { width: 110px; height: 110px; } }
@media (max-width: 900px) { .profile-hero { padding: 16px; } }
@media (max-width: 760px) { .profile-hero__avatar { width: 100px; height: 100px; margin-top: 0; } }
.profile-menu__trigger { background: #0b0d10; border-color: #2c3542; color: #eef1f5; box-shadow: none; }
.profile-menu__trigger:hover { background: #151a21; border-color: #46515f; color: #ffffff; }
[data-theme="light"] .profile-menu__trigger { background: #1b212b; border-color: #1b212b; color: #ffffff; }
[data-theme="light"] .profile-menu__trigger:hover { background: #2a3440; border-color: #2a3440; color: #ffffff; }
.profile-hero__avatar { width: 150px; height: 150px; }
@media (min-width: 1101px) { .profile-hero { grid-template-columns: 150px minmax(0, 1fr) 380px; } }
@media (max-width: 1100px) { .profile-hero__avatar { width: 130px; height: 130px; } }
@media (max-width: 760px) { .profile-hero__avatar { width: 110px; height: 110px; } }
.profile-menu__trigger { background: #151a21; border-color: #333d4a; }
.profile-menu__trigger:hover { background: #1e252e; border-color: #46515f; }
[data-theme="light"] .profile-menu__trigger { background: #efe7d8; border-color: #d8c7a7; color: #8a5a12; box-shadow: 0 3px 10px rgba(120,90,40,.12); }
[data-theme="light"] .profile-menu__trigger:hover { background: #e7dcc8; border-color: #c9b48d; color: #6f4608; }
[data-theme="light"] .profile-menu__trigger { background: #eadfca; border-color: #cdb894; color: #7a4d05; }
[data-theme="light"] .profile-menu__trigger:hover { background: #e2d3b8; border-color: #bca47c; color: #643d02; }
.profile-side .profile-stats div:last-child { grid-column: auto; }
[data-theme="light"] .profile-menu__trigger { background: #f6f0e4; border-color: #e3d7c2; color: #a0783c; box-shadow: 0 2px 7px rgba(120,90,40,.08); }
[data-theme="light"] .profile-menu__trigger:hover { background: #eee6d6; border-color: #d3c2a5; color: #85581a; }
@keyframes knigomer-spin { to { transform: rotate(360deg); } }
.empty__icon {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 0;
  color: transparent;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(150,161,176,.06) 55deg, rgba(150,161,176,.34) 190deg, var(--faint) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: knigomer-spin 1s linear infinite;
}
.empty__icon { width: 30px; height: 30px; animation-duration: 1.8s; }
.empty__icon { width: 30px; height: 30px; display: block; margin: 0 auto; background: none !important; -webkit-mask: none !important; mask: none !important; animation: none; color: var(--faint); font-size: 0; }
.empty__spinner { display: block; width: 30px; height: 30px; overflow: visible; animation: knigomer-spin 1.8s linear infinite; transform-origin: 50% 50%; }
.empty__spinner-track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.empty__spinner-arc { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.empty__icon { color: var(--muted); }
.empty__spinner-arc { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.empty__spinner-arc { stroke-linecap: butt; }
.empty__spinner-arc { stroke-width: 3; }
.empty__spinner-head { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.empty__spinner { animation-duration: 2.8s; }
.news-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; align-items: start; }
.news-detail-main { min-width: 0; }
.news-detail-main .article { max-width: none; }
.news-detail-aside { position: sticky; top: 86px; }
.news-aside { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.news-aside__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.news-aside__head h2 { font-family: var(--font-serif); font-size: 20px; }
.news-aside__head a { color: var(--faint); font-size: 11px; }
.news-aside__head a:hover { color: var(--accent); }
.news-aside__list { display: flex; flex-direction: column; }
.news-aside__item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.news-aside__item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-aside__media { width: 66px; height: 88px; flex: 0 0 66px; overflow: hidden; border-radius: 9px; background: var(--surface-2); }
.news-aside__media img { width: 100%; height: 100%; object-fit: cover; }
.news-aside__placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: 5px; background: linear-gradient(145deg, #ffd479, #d99a1c); color: #1d1405; font-size: 9px; font-weight: 700; text-align: center; text-transform: uppercase; }
.news-aside__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-aside__type { align-self: flex-start; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; }
.news-aside__body strong { font-size: 13px; line-height: 1.35; }
.news-aside__body small { color: var(--faint); font-size: 10px; }
.news-aside__item:hover strong { color: var(--accent); }
@media (max-width: 1000px) { .news-detail-layout { grid-template-columns: 1fr; gap: 22px; } .news-detail-aside { position: static; } }
.publisher-hero { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(150deg, var(--surface-2), var(--surface)); }
.publisher-hero__logo { display: grid; place-items: center; width: 150px; height: 150px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--accent-ink); font-family: var(--font-serif); font-size: 38px; font-weight: 700; }
.publisher-hero__logo img { width: 100%; height: 100%; object-fit: contain; padding: 14px; background: #fff; }
.publisher-hero__logo > span { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(145deg, #ffd479, #d99a1c); }
.publisher-hero__legal { color: var(--faint); font-size: 12px; margin-top: 2px; }
.publisher-hero__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.publisher-hero__facts strong { color: var(--text-soft); font-weight: 600; }
.publisher-hero__links { margin-top: 14px; }
.publisher-history { max-width: 900px; margin-top: 26px; }
.publisher-history h2 { font-family: var(--font-serif); margin-bottom: 10px; }
.publisher-view-switch { display: inline-flex; gap: 4px; margin: 24px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.publisher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.publisher-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .15s; }
.publisher-card:hover { border-color: var(--surface-3); background: var(--surface-2); }
.publisher-card__logo { display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; border-radius: 12px; background: linear-gradient(145deg, #ffd479, #d99a1c); color: #1d1405; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.publisher-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.publisher-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.publisher-card__body strong { font-family: var(--font-serif); font-size: 17px; }
.publisher-card__body small { color: var(--muted); font-size: 11px; }
@media (max-width: 620px) { .publisher-hero { grid-template-columns: 1fr; text-align: center; } .publisher-hero__logo { margin: 0 auto; } .publisher-hero__facts { justify-content: center; } .publisher-grid { grid-template-columns: 1fr; } }
.edition-row__publisher { display: block; color: var(--text-soft); font-weight: 600; } .edition-row__publisher:hover { color: var(--accent); }
.alphabet-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 1px; margin: 14px 0 22px; }
.alphabet-filter__all, .alphabet-filter__letter { display: inline-grid; place-items: center; min-width: 24px; height: 30px; padding: 0 5px; border-radius: 7px; color: var(--muted); font-size: 12.5px; }
.alphabet-filter__all:hover, .alphabet-filter__letter:hover { color: var(--text); background: var(--surface-2); }
.alphabet-filter__all.is-active, .alphabet-filter__letter.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.alphabet-filter__all { padding: 0 9px; margin-right: 5px; }
.alphabet-filter__lang { margin-left: auto; padding: 5px 8px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.alphabet-filter__lang:hover { color: var(--accent-strong); }
.publisher-popular { margin-top: 4px; }
.publisher-all-head { margin-top: 30px; }
@media (max-width: 620px) { .alphabet-filter__lang { margin-left: 0; } }
.publisher-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; align-items: start; }
.publisher-content-main { min-width: 0; }
.publisher-aside { position: sticky; top: 86px; }
.publisher-aside .news-aside { margin-top: 24px; }
.alphabet-filter__lang { margin-left: 6px; }
@media (max-width: 1000px) { .publisher-content-layout { grid-template-columns: 1fr; gap: 22px; } .publisher-aside { position: static; } }
.nav__icon svg { display: inline-block; width: 17px; height: 17px; vertical-align: middle; }
.publisher-card { flex-direction: column; align-items: stretch; min-height: 188px; }
.publisher-card__logo { width: 100%; height: 102px; flex: 0 0 102px; padding: 10px; border-radius: 11px; font-size: 15px; line-height: 1.25; text-align: center; }
.publisher-card__name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.publisher-card__body strong { font-size: 16px; }
.publisher-hero__name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.publisher-hero__name-row h1 { margin: 0; }
.publisher-hero__name-row .badge { display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding-top: 4px; padding-bottom: 4px; }
.publisher-hero__site { display: inline-block; color: var(--accent); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; }
.publisher-hero__site:hover { color: var(--accent-strong); }
.publisher-hero__country { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--text-soft); font-size: 12.5px; }
.publisher-hero__info { display: grid; gap: 4px; margin-top: 12px; }
.publisher-hero__info > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.publisher-hero__info dt { color: var(--muted); font-size: 12px; }
.publisher-hero__info dd { margin: 0; color: var(--text-soft); font-size: 12.5px; }
.publisher-hero__info .publisher-hero__site { font-size: 12.5px; }
@media (max-width: 620px) { .publisher-hero__info > div { grid-template-columns: 1fr; gap: 1px; } }
a, a:hover, a:focus, a:visited { text-decoration: none !important; }
.publisher-hero__name-row { align-items: flex-start; }
.publisher-hero__name-row .badge { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 9px; line-height: 1; }
.publisher-card { flex-direction: row; align-items: center; min-height: 0; gap: 12px; }
.publisher-card__logo { width: 72px; height: 72px; flex: 0 0 72px; padding: 6px; font-size: 11px; line-height: 1.15; }
.publisher-card__name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.publisher-card__body strong { font-size: 17px; }
.publisher-card__logo { width: 80px; height: 80px; flex: 0 0 80px; font-size: 10px; }
.publisher-card__name { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.12; }
.publisher-hero__info > div { display: flex; align-items: center; justify-content: flex-start; grid-template-columns: none; gap: 5px; }
.publisher-hero__info dt { white-space: nowrap; }
.publisher-hero__info dd { margin: 0; }
.publisher-hero__name-row .badge { display: inline-block; height: 24px; padding: 0 9px; line-height: 24px; text-align: center; vertical-align: top; }
.publisher-hero__info dd { display: inline-flex; align-items: center; }
.publisher-hero__info .country-flag { margin-right: 5px; }
.alphabet-filter__label { font-size: 12px; color: var(--muted); white-space: nowrap; padding-right: 2px; }
.alphabet-filter__label { font-size: 14px; padding-right: 0; margin-right: 0; }
.alphabet-filter__label { margin-right: 16px; }
.alphabet-filter__all { margin-right: 8px; }
.alphabet-filter__label { margin-right: 16.4px; }
.alphabet-filter__all { margin-right: 8.4px; }
.alphabet-filter__label { margin-right: 0; }
.alphabet-filter__all { margin-right: 0; }
.alphabet-filter__label { margin-right: 8px; }
.message { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.message > span { min-width: 0; }
.message__close { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: currentColor; opacity: .65; font-size: 20px; line-height: 1; cursor: pointer; }
.message__close:hover { opacity: 1; background: rgba(255,255,255,.08); }
.profile-avatar-remove[hidden] { display: none !important; }
.btn--pro-locked { position: relative; opacity: .5 !important; filter: saturate(.55); box-shadow: none !important; cursor: not-allowed; }
.btn--pro-locked::after { content: ""; position: absolute; top: -9px; right: -8px; width: 18px; height: 18px; border: 1px solid var(--bg); border-radius: 5px; background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2317130a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 12px 12px; }
.btn--pro-locked { opacity: 1 !important; background: rgba(246, 183, 60, .35) !important; color: rgba(23, 19, 10, .68) !important; box-shadow: none !important; }
.btn--pro-locked:hover { filter: none; }
.btn--pro-locked { opacity: 1 !important; background: linear-gradient(180deg, rgba(246,183,60,.68), rgba(205,143,32,.58)) !important; color: #20190b !important; border: 1px solid rgba(246,183,60,.75); box-shadow: none !important; }
.btn--pro-locked:hover { filter: none; }
.btn--pro-locked::after { content: ""; position: absolute; top: -11px; right: -9px; width: 16px; height: 16px; border: 0; border-radius: 0; background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffc247' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 16px 16px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.btn--pro-locked { border: 0 !important; }
.btn--pro-locked::after { top: -6px; right: -7px; width: 18px; height: 18px; background-size: 18px 18px; }
.profile-avatar-edit .avatar--xl:not([class*="avatar--tier-"]) { border: 4px solid transparent; }
.btn--pro-locked::after { top: -9px; }
.profile-avatar-edit { width: 165px; height: 165px; flex: 0 0 165px; }
.profile-avatar-edit .avatar { width: 165px !important; height: 165px !important; box-sizing: border-box; border-width: 4px !important; border-style: solid; }
.profile-form-layout { gap: 44px; }
.btn--pro-locked::after { right: -5px; }
.btn--pro-locked::after { filter: drop-shadow(0 2px 3px rgba(0,0,0,.9)); }
.profile-avatar-edit .avatar-default { transform: none !important; width: 100% !important; height: 100% !important; object-fit: cover; }
.profile-avatar-edit .avatar > img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit .avatar { background-clip: padding-box; }
.btn--pro-locked::after { top: -10px; right: -4px; }
.profile-avatar-edit .avatar:not([class*="avatar--tier-"]) { border-color: var(--surface) !important; }
.avatar__tier { display: none !important; }
.avatar--xl .avatar__tier,
.avatar--lg .avatar__tier,
.profile-hero__avatar .avatar__tier { display: grid !important; }
.home-stats-auth { margin-top: 16px; }
.edit-mode-toggle__edit { display: none; }
body.is-edit-mode .edit-mode-toggle__view { display: none; }
body.is-edit-mode .edit-mode-toggle__edit { display: grid; }
body.is-edit-mode .edit-mode-toggle { color: var(--accent); }
.genre-wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.genre-wall-card { height: 300px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.genre-wall-card__head { flex: 0 0 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.genre-wall-card__head strong { font-family: var(--font-serif); font-size: 20px; }
.genre-wall-card__head span { color: var(--muted); font-size: 13px; }
.genre-wall-card__media { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0f1218; }
.genre-wall-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.genre-wall-card__hit { position: absolute; inset: 0; z-index: 1; }
.genre-wall-edit { position: absolute; z-index: 3; display: none; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.genre-wall-pencil { top: 10px; right: 10px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.genre-wall-remove { top: 10px; right: 46px; background: var(--surface-3); color: var(--text); font-size: 21px; line-height: 1; }
body.is-edit-mode .genre-wall-edit { display: grid; }
body.is-edit-mode .genre-wall-edit[hidden] { display: none !important; }
.genre-wall-apply { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; min-height: 36px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.genre-wall-apply[hidden] { display: none !important; }
.genre-crop { position: fixed; inset: 0; z-index: 200001; display: grid; place-items: center; padding: 18px; background: rgba(4,6,9,.82); backdrop-filter: blur(6px); }
.genre-crop[hidden] { display: none !important; }
.genre-crop__dialog { width: min(720px, 100%); padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.7); }
.genre-crop__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.genre-crop__head strong { display: block; font-family: var(--font-serif); font-size: 20px; }
.genre-crop__head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.genre-crop__close { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; padding: 0 2px; cursor: pointer; }
.genre-crop__stage { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: #0b0d10; touch-action: none; cursor: grab; user-select: none; }
.genre-crop__stage:active { cursor: grabbing; }
.genre-crop__stage img { position: absolute; max-width: none; max-height: none; pointer-events: none; user-select: none; }
.genre-crop__frame { position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.75); border-radius: 6px; box-shadow: 0 0 0 999px rgba(0,0,0,.24); pointer-events: none; }
.genre-crop__zoom { display: grid; grid-template-columns: 18px 1fr 18px; align-items: center; gap: 8px; margin: 14px 2px 4px; color: var(--muted); }
.genre-crop__zoom input { width: 100%; accent-color: var(--accent); }
.genre-crop__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 620px) { .genre-wall-grid { grid-template-columns: 1fr; } .genre-wall-card { height: 260px; } }
.genre-wall-card__head strong { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.genre-wall-card__head strong.is-long { font-size: 16px; letter-spacing: -.01em; }
.genre-wall-card__head > span { flex: 0 0 auto; }
.genre-wall-card__head strong { text-overflow: clip; }
[data-theme="light"] .genre-wall-card { background: var(--surface); border-color: var(--line); }
[data-theme="light"] .genre-wall-card__media { background: var(--surface-2); }
.genre-wall-card { position: relative; }
.genre-wall-card__image { z-index: 0; }
.genre-wall-card__head { position: relative; z-index: 2; background: rgba(10, 13, 18, .58); backdrop-filter: blur(7px); }
.genre-wall-card__media { position: relative; z-index: 1; background: transparent; }
[data-theme="light"] .genre-wall-card__head { background: rgba(255, 255, 255, .72); }
[data-theme="light"] .genre-wall-card__media { background: transparent; }
.genre-wall-card__head { background: rgba(10, 13, 18, .30); backdrop-filter: blur(3px); text-shadow: 0 1px 3px rgba(0,0,0,.75); }
[data-theme="light"] .genre-wall-card__head { background: rgba(255, 255, 255, .42); text-shadow: 0 1px 3px rgba(255,255,255,.65); }
.genre-wall-card__media { background: transparent !important; }
.genre-wall-card::after { content: ""; position: absolute; inset: 0; z-index: 5; border: 1px solid var(--line); border-radius: inherit; pointer-events: none; }
.genre-wall-card__head { border-bottom-color: var(--line) !important; box-shadow: 0 1px 0 0 var(--line); }
[data-theme="light"] .genre-wall-card { border-color: var(--line); }
.genre-wall-card__head { background: rgba(12, 16, 22, .58); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.genre-wall-card__head strong { color: #fff; }
.genre-wall-card__head span { color: rgba(255,255,255,.82); }
[data-theme="light"] .genre-wall-card__head { background: rgba(32, 28, 22, .62); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.genre-wall-card__image { border-radius: inherit; clip-path: inset(0 round 13px); }
.genre-wall-card { border-color: transparent !important; }
.genre-wall-card::after { border-width: 1px !important; }
.genre-wall-card__head { box-shadow: none !important; }
.genre-wall-card__image { inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); border-radius: 13px; clip-path: none; }
.genre-crop__stage { aspect-ratio: 1193 / 1000; border-radius: 14px; }
.genre-crop__frame { inset: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; box-shadow: none; }
.genre-wall-card { border: 0 !important; clip-path: inset(0 round 14px); }
.genre-wall-card::after { inset: 0.5px; border-width: 1px !important; border-radius: 13.5px; }
.genre-wall-card__image { inset: 0; width: 100%; height: 100%; border-radius: 0; clip-path: none; }
.genre-wall-card { height: auto !important; aspect-ratio: 1193 / 1000; }
@media (max-width: 620px) { .genre-wall-card { height: auto; } }
.genre-wall-card { overflow: hidden; clip-path: none; background: var(--surface); }
.genre-wall-card__inner { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 13px; overflow: hidden; background: var(--surface); }
.genre-wall-card::after { inset: 0; border: 1px solid var(--line); border-radius: 14px; z-index: 10; }
.genre-wall-card__image { inset: 0; width: 100%; height: 100%; border-radius: 0; clip-path: none; }
.genre-wall-card__head { background: rgba(10, 13, 18, .24); backdrop-filter: blur(2px); }
[data-theme="light"] .genre-wall-card__head { background: rgba(28, 24, 18, .30); }
.genre-wall-card__head { border-bottom: 0; border-top: 1px solid var(--line); box-shadow: 0 -1px 0 0 var(--line); }
.genre-wall-pencil { top: 6px; }
.genre-wall-remove { top: 6px; }
.genre-wall-card { padding: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.genre-wall-card__inner { border-radius: 13px; width: 100%; height: 100%; background: var(--surface); }
.genre-wall-card::after { display: none !important; }
.genre-wall-card { padding: 2px; }
.genre-wall-card__inner { border-radius: 12px; }
.genre-wall-card { padding: 0 !important; background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 14px; overflow: hidden; }
.genre-wall-card__inner { border-radius: 13px; overflow: hidden; clip-path: inset(0 round 13px); background: var(--surface); }
.genre-wall-card::after { display: none !important; }
[data-theme="light"] .genre-wall-card { background: #d6c8b0 !important; border-color: #d6c8b0 !important; }
[data-theme="light"] .genre-wall-card__head { border-top: 0 !important; box-shadow: none !important; }
.genre-wall-card__head { border-top: 0 !important; box-shadow: none !important; }
.username-status { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.username-status[hidden] { display: none !important; }
.username-status.is-error { color: var(--red); }
.username-status.is-ok { color: var(--green); }
.username-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.username-suggestions[hidden] { display: none !important; }
.username-suggestion { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--accent); font-size: 11.5px; padding: 4px 8px; }
.username-suggestion:hover { border-color: var(--accent); background: rgba(246, 183, 60, .1); }
.dialog-toasts { position: fixed; right: 20px; bottom: 24px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .dialog-toasts { right: 12px; bottom: 80px; left: auto; } }
/* Компактная форма входа */
.auth-modal { position: relative; width: min(410px, calc(100vw - 28px)); padding: 0; overflow: hidden; }
.auth-modal .modal__close { z-index: 3; color: #fff; top: 10px; right: 14px; font-size: 26px; }
.auth-modal__art { position: relative; padding: 20px 22px 14px; overflow: hidden; color: #f4f6fa; background: radial-gradient(360px 180px at 85% 0%, rgba(157, 123, 255, .35), transparent 65%), radial-gradient(320px 200px at 0% 110%, rgba(246, 183, 60, .25), transparent 65%), linear-gradient(150deg, #1a2130, #0d1015); }
.auth-modal__art .eyebrow { color: #ffd479; font-size: 9px; }
.auth-modal__art h2 { margin: 5px 0 4px; font-family: var(--font-serif); font-size: 25px; line-height: 1.05; color: #f7f8fb; }
.auth-modal__art p { margin: 0; max-width: 36ch; color: #c3cad6; font-size: 11.5px; line-height: 1.4; }
.auth-modal__covers { position: relative; height: 62px; margin-top: 8px; }
.auth-modal__covers .auth__cover { width: 40px; border-radius: 5px; }
.auth-modal__covers .auth__cover--1 { left: 0; top: 8px; }
.auth-modal__covers .auth__cover--2 { left: 30px; top: 0; }
.auth-modal__covers .auth__cover--3 { left: 60px; top: 10px; }
.auth-modal__panel { padding: 16px 22px 20px; background: var(--bg-elevated); }
.auth-modal__panel h2 { margin: 0 0 10px; font-family: var(--font-serif); font-size: 26px; }
.auth-modal__panel .form { gap: 10px; }
.auth-modal__panel .field__label { font-size: 11px; }
.auth-modal__panel input[type="text"], .auth-modal__panel input[type="password"] { height: 40px; }
.auth-modal__links { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.auth-modal__links a { color: var(--accent); }
.auth-modal__links a:last-child { color: var(--muted); }
@media (max-width: 480px) { .auth-modal__art { padding: 16px 18px 10px; } .auth-modal__panel { padding: 14px 18px 18px; } }
.topbar__auth { display: flex; align-items: center; gap: 8px; }
.auth-gate { text-align: center; width: min(430px, calc(100vw - 28px)); }
.auth-gate__icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 4px auto 12px; border-radius: 50%; background: rgba(246,183,60,.12); color: var(--accent); }
.auth-gate .modal__title { margin: 0 26px 10px; font-size: 24px; }
.auth-gate__text { margin: 0 auto 18px; max-width: 34ch; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-gate__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.auth-gate__actions .btn { min-width: 150px; }
/* Финальное оформление окна входа */
.auth-modal { background: #11151d; }
.auth-modal .modal__close, .auth-gate .modal__close { outline: 0 !important; box-shadow: none !important; border: 0; }
.auth-modal .modal__close:focus, .auth-modal .modal__close:focus-visible, .auth-gate .modal__close:focus, .auth-gate .modal__close:focus-visible { outline: 0 !important; box-shadow: none !important; }
.auth-modal__art { padding: 16px 20px 10px; overflow: visible; background: radial-gradient(420px 210px at 88% -8%, rgba(157, 123, 255, .32), transparent 68%), radial-gradient(360px 240px at -5% 112%, rgba(246, 183, 60, .24), transparent 70%), #11151d; }
.auth-modal__brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.auth-modal__brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #17130a; font-family: var(--font-serif); font-size: 21px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.auth-modal__brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.auth-modal__brand-text strong { font-size: 13px; font-weight: 700; }
.auth-modal__brand-text small { margin-top: 2px; font-size: 8px; color: #9aa4b4; }
.auth-modal__art h2 { display: block; margin: 10px 0 5px; max-width: none; font-size: 24px; line-height: 1.08; }
.auth-modal__art h2 > span { display: block; }
.auth-modal__title-line { margin-left: 18px; }
.auth-modal__art p { font-size: 11px; max-width: 34ch; }
.auth-modal__covers { height: 62px; margin-top: 4px; }
.auth-modal__covers::after { content: ""; position: absolute; left: -12px; right: -24px; bottom: -20px; height: 64px; background: radial-gradient(ellipse at center, rgba(100, 135, 210, .30), transparent 72%); filter: blur(7px); pointer-events: none; }
.auth-modal__panel { background: #11151d; }
.auth-gate .modal__close:focus { outline: none !important; }
/* Композиция и общий фон окна входа */
.auth-modal { background: radial-gradient(460px 250px at 88% -6%, rgba(157, 123, 255, .30), transparent 66%), radial-gradient(440px 300px at -8% 108%, rgba(246, 183, 60, .22), transparent 70%), linear-gradient(150deg, #1a2130, #0d1015); }
.auth-modal__art { background: transparent; padding: 16px 20px 12px; }
.auth-modal__panel { background: transparent; }
.auth-modal__brand { margin-bottom: 8px; }
.auth-modal__intro { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; align-items: center; }
.auth-modal__covers { position: relative; height: 96px; margin: 0; }
.auth-modal__covers .auth__cover { width: 42px; border-radius: 5px; }
.auth-modal__covers .auth__cover--1 { left: 0; top: 22px; }
.auth-modal__covers .auth__cover--2 { left: 31px; top: 10px; }
.auth-modal__covers .auth__cover--3 { left: 64px; top: 24px; }
.auth-modal__copy h2 { margin: 0 0 7px; font-size: 23px; line-height: 1.06; }
.auth-modal__copy h2 > span { display: block; }
.auth-modal__copy .auth-modal__title-line { margin-left: 17px; }
.auth-modal__copy p { margin: 0; color: #c3cad6; font-size: 11px; line-height: 1.4; }
.auth-modal__covers::after { left: -8px; right: -20px; bottom: 8px; height: 72px; background: radial-gradient(ellipse at center, rgba(100, 135, 210, .28), transparent 70%); }
.auth-modal { width: min(436px, calc(100vw - 28px)); }
.auth-modal__intro { grid-template-columns: 144px minmax(0, 1fr); }
.auth-modal__title-line { margin-left: 38px; }
.auth-modal__copy p { margin-left: 24px; }
.auth-modal__copy p > span { display: block; }
.auth-modal__copy p > span:nth-child(2) { margin-left: 12px; }
.auth-modal__copy p > span:nth-child(3) { margin-left: 26px; }
.auth-modal__covers .auth__cover { width: 46px; }
.auth-modal__covers .auth__cover--2 { left: 34px; }
.auth-modal__covers .auth__cover--3 { left: 69px; }
.auth-modal__copy .auth-modal__title-line { margin-left: 39px; }
.auth-modal__copy p { margin-left: 21px; font-size: 12px; }
.auth-modal__copy p > span:nth-child(2) { margin-left: 13px; }
.auth-modal__copy p > span:nth-child(3) { margin-left: 28px; }
.auth-modal__art { padding-left: 23px; }
.auth-modal__copy .auth-modal__title-line { margin-left: 82px; }
.auth-modal__copy p { margin-left: 21px; font-size: 11.5px; }
.auth-modal__copy p > span:nth-child(2) { margin-left: 52px; }
.auth-modal__copy p > span:nth-child(3) { margin-left: 94px; }
.auth-modal__copy p { font-size: 11px; }
.review-more { margin: 0; }
.review-more > summary { display: block; cursor: pointer; list-style: none; color: var(--accent); }
.review-more > summary::-webkit-details-marker { display: none; }
.review-more__open { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--accent); }
.review-text-preview { display: block; color: var(--text-soft); line-height: 1.7; }
.review-text-preview--faded { -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0,0,0,.35) 88%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0,0,0,.35) 88%, transparent 100%); }
.review-more[open] > summary { display: none; }
.review-more__full { color: var(--text-soft); line-height: 1.7; }
.review-more__collapse { margin: 10px 0 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.review-more__collapse:hover { color: var(--accent-strong); }
.review__edit-toggle { margin-left: auto; color: var(--accent); }
.review-edit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.review-edit .form { margin: 0; }
.reviews + .login-note { margin-top: 18px; }
.review.is-editing .review__title, .review.is-editing .review__text, .review.is-editing .review__foot { display: none; }
.review-edit__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.review-edit__actions .btn { width: auto; }
.review, .comment { position: relative; }
.admin-delete { display: none; position: absolute; top: 10px; right: 10px; z-index: 4; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 18px; line-height: 1; }
body.is-edit-mode .admin-delete { display: grid; }
.admin-delete:hover { color: var(--red); border-color: var(--red); }
.content-report-success { margin: 4px 0 0; padding: 12px; border: 1px solid rgba(74,222,128,.35); border-radius: 10px; color: #b7f7cd; background: rgba(74,222,128,.08); }
.modal { position: fixed; inset: 0; margin: auto; }
.comment__text.is-spoiler.is-open { filter: none; user-select: auto; }
.comment__foot { margin-top: 9px; }
.comment__foot .spoiler-toggle { display: inline-flex; align-items: center; height: 28.6px; margin: 0; padding: 0 10px; border-radius: 8px; font-size: 12px; line-height: 1; box-sizing: border-box; }

.comment__foot .admin-delete-inline { display: none; align-items: center; justify-content: center; height: 28.6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; line-height: 1; box-sizing: border-box; cursor: pointer; }
body.is-edit-mode .comment__foot .admin-delete-inline { display: inline-flex; }
.comment__foot .admin-delete-inline:hover { border-color: var(--red); color: var(--red); }

.review__spoiler-warning { display: inline-flex; align-items: center; margin-left: auto; padding: 3px 9px; border: 1px solid var(--red); border-radius: 6px; background: rgba(248,113,113,.14); color: #ffb4b4; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { align-self: center; vertical-align: middle; line-height: 1 !important; }
.review__spoiler-warning { margin-right: 3.5px; position: relative; top: -0.5px; }


.btn, .vote-btn, .spoiler-toggle, .admin-delete-inline { align-items: center; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { padding-top: 1px; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { line-height: 12px !important; padding-top: 0 !important; }
.comment__foot .control-label { display: block; transform: translateY(-0.5px); }
.review__spoiler-warning .control-label { display: block; transform: translateY(-1.5px); }
.comment__foot .vote-btn, .comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { height: 24px !important; padding: 0 10px !important; align-items: center !important; justify-content: center !important; }
.comment__foot .control-label, .review__spoiler-warning .control-label { transform: none !important; }
.review__spoiler-warning { padding: 5px 9px !important; }
.review__spoiler-warning .control-label { transform: translateY(-1px) !important; }
.comment__foot .vote-btn { height: auto !important; padding: 4px 8px !important; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { height: 28.6px !important; padding: 0 10px !important; }
.comment__foot .control-label { transform: translateY(-0.5px) !important; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { height: 33px !important; padding: 0 12px !important; }
.comment__foot .control-label { transform: translateY(-1.5px) !important; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { height: 28.6px !important; padding: 0 10px !important; }
.comment__foot .control-label { transform: translateY(-0.5px) !important; }
.comment__foot .control-label { transform: translateY(0) !important; }
.comment__foot .vote-btn, .comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { height: 28px !important; padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
.comment__foot .vote-btn { padding-left: 8px !important; padding-right: 8px !important; }
.comment__foot .spoiler-toggle, .comment__foot .admin-delete-inline { padding-left: 10px !important; padding-right: 10px !important; }
.icon-btn .badge { display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 18px; min-width: 18px; height: 18px; padding: 0; border-radius: 50%; font-size: 10px; line-height: 1; font-weight: 700; }
.comment__foot .vote-btn, .comment__foot .spoiler-toggle { display: inline-flex !important; }
.comment__foot .admin-delete-inline { display: none !important; }
body.is-edit-mode .comment__foot .admin-delete-inline { display: inline-flex !important; }
.comment-menu { position: relative; margin-left: 2px; }
.comment-menu__trigger { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; list-style: none; }
.comment-menu__trigger::-webkit-details-marker { display: none; }
.comment-menu__trigger span { line-height: 1; transform: translateY(-3px); }
.comment-menu__popover { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 205px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.comment-menu__item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--text-soft); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.comment-menu__item:hover { background: var(--surface-3); color: var(--text); }
.comment-menu__block { color: #fca5a5; }
.comment-menu__trigger { width: 22px; height: 22px; border-color: var(--line-soft); background: transparent; color: var(--faint); font-size: 15px; }
.comment-menu__trigger:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.comment-menu__trigger span { transform: translateY(-1px); }
.comment__head { margin-bottom: 8px; }
.comment-menu { align-self: center; }
.comment__time { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.comment-menu { transform: translateY(-1px); }
.comment-menu { z-index: 30; }
.comment-menu[open] { z-index: 50; }
.comment-menu__popover { background-color: var(--surface-2); }
.comment__body { min-width: 0; flex: 1; }
.comment__replies { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 0 42px; padding-left: 14px; border-left: 1px solid var(--line-soft); }
.comment__hidden-replies { display: flex; flex-direction: column; gap: 14px; }
.comment__replies-toggle, .comment__reply-toggle { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.comment__replies-toggle:hover, .comment__reply-toggle:hover { color: var(--accent-strong); }
.comment__reply-controls { margin-top: 8px; }
.comment__reply-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.comment__reply-form[hidden] { display: none; }
.comment__reply-form textarea { min-height: 64px; resize: vertical; }
.comment__reply-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 560px) { .comment__replies { margin-left: 22px; padding-left: 10px; } }
.comment__hidden-replies[hidden] { display: none; }
.comment__reply-form { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.comment__reply-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line) !important; border-radius: 8px; background: var(--surface-2); color: var(--text); outline: 0 !important; box-shadow: none !important; resize: vertical; }
.comment__reply-form textarea:focus, .comment__reply-form textarea:focus-visible { border-color: var(--line) !important; outline: 0 !important; box-shadow: none !important; }
.comment-form-wrap { margin-top: 18px; text-align: center; }
.comment-form-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text-soft); font: inherit; font-size: 12.5px; cursor: pointer; }
.comment-form-toggle:hover { border-color: var(--accent); color: var(--accent); }
.comment-form-toggle[hidden], .comment-form[hidden] { display: none; }
.comment-form-wrap .comment-form { margin-top: 12px; text-align: left; }
.comment-form textarea { border: 1px solid var(--line) !important; background: var(--surface-2); color: var(--text); outline: 0 !important; box-shadow: none !important; }
.comment-form textarea:focus, .comment-form textarea:focus-visible { border-color: var(--line) !important; outline: 0 !important; box-shadow: none !important; }
.comment-form__actions { display: flex; align-items: center; gap: 8px; }
.comment-form__actions .checkbox { margin-right: auto; }
.comment-form__actions { align-items: flex-start; }
.comment-form__actions .checkbox { align-items: flex-start; }
.comment-form__actions .checkbox span { line-height: 1; }
.comment__reply-target { display: inline-block; margin-bottom: 2px; color: var(--accent); font-size: 12px; font-weight: 600; }
.comment__quote { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; padding: 5px 9px; border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0; background: rgba(246,183,60,.055); color: var(--muted); text-decoration: none; }
.comment__quote:hover { background: rgba(246,183,60,.1); color: var(--text-soft); }
.comment__quote-author { color: var(--accent); font-size: 11.5px; font-weight: 700; }
.comment__quote-text { font-size: 11.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comment.is-highlighted { animation: comment-highlight .8s ease-in-out 3; }
@keyframes comment-highlight { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 26px rgba(246,183,60,.42); } }
[data-theme="light"] .comment.is-highlighted { animation-name: comment-highlight-light; }
@keyframes comment-highlight-light { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 24px rgba(0,0,0,.32); } }

.comment { padding: 8px 10px; border-radius: 12px; }
.comment.is-highlighted { border-radius: 12px; }
.notifications { gap: 22px; border: 0; background: transparent; overflow: visible; }
.notification-day__title { margin: 0 0 7px; padding-left: 2px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.notification-day__list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.notification { align-items: flex-start; }
.notification__body { flex: 1; min-width: 0; }
.notification__time { margin-left: auto; flex: 0 0 auto; padding-top: 1px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.notification-day:last-child .notification:last-child { border-bottom: 0; }
.comment-form-wrap { text-align: left; }
.notification-day__title { padding-left: 0; text-align: center; font-size: 12px; letter-spacing: .06em; }
.notification-day__title { color: var(--text); }
.comment__deleted { padding: 8px 0; color: var(--faint); font-size: 12.5px; font-style: italic; }
.comment__deleted { color: var(--red); font-style: italic; }
.comment__quote-text--deleted { color: var(--red); font-style: italic; }
.comment__deleted, .comment__quote-text--deleted { color: #6f7681; }
[data-theme="light"] .comment__deleted, [data-theme="light"] .comment__quote-text--deleted { color: #a8a39a; }
.author-filter { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; }
.author-filter__label { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.author-filter select { height: 36px; min-width: 220px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.author-filter select:hover { border-color: var(--line-strong, var(--muted)); }
.author-filter { width: 100%; }
.author-filter__label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .01em; text-transform: none; }
.author-filter__clear { height: 36px; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; white-space: nowrap; }
.author-filter__label { white-space: nowrap; }
.author-filter__label { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.author-filter__dropdown { position: relative; flex: 0 1 1030px; min-width: 0; }
.author-filter__trigger { width: 100%; height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.author-filter__trigger:hover { border-color: var(--line-strong, var(--muted)); }
.author-filter__trigger svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--faint); }
.author-filter__dropdown.is-open .author-filter__trigger svg { transform: rotate(180deg); }
.author-filter__menu { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 40; max-height: 330px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 38px rgba(0, 0, 0, .38); }
.author-filter__menu[hidden] { display: none; }
.author-filter__option { display: block; padding: 8px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.author-filter__option:hover { background: var(--surface-2); color: var(--text); }
.author-filter__option.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
#author-results.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
.author-filter { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.author-filter__label, .author-filter__or { font-size: 16px; font-weight: 600; }
.author-filter__or { margin-left: 4px; color: var(--muted); white-space: nowrap; }
.author-filter__dropdown { flex: 1 1 320px; max-width: 430px; }
.author-filter__clear { margin-left: 0; flex: 0 0 auto; }
.author-filter__search { display: flex; flex: 1 1 320px; min-width: 260px; gap: 7px; }
.author-filter__search input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 12px; color: var(--text); font: inherit; font-size: 13px; }
.author-filter__search button { height: 36px; flex: 0 0 auto; }

.author-filter__label, .author-filter__or { font-weight: 400; }
.trial-note { display: flex; flex-direction: column; gap: 3px; margin: 14px 0 12px; padding: 11px 13px; border: 1px solid rgba(246, 183, 60, .28); border-radius: 10px; background: rgba(246, 183, 60, .08); }
.trial-note strong { color: var(--accent); font-size: 12.5px; }
.trial-note span { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.subscription-hero { position: relative; overflow: hidden; padding: 22px 24px 18px; border: 1px solid rgba(246, 183, 60, .34); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(246, 183, 60, .12), var(--surface) 58%, var(--surface-2)); }
.subscription-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.subscription-hero__identity { display: flex; align-items: flex-start; gap: 15px; min-width: 0; }
.subscription-hero__icon { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 24px; box-shadow: 0 8px 24px rgba(246, 183, 60, .25); }
.subscription-hero h2 { margin: 5px 0 4px; font-family: var(--font-serif); font-size: 27px; }
.subscription-hero p { max-width: 640px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.subscription-hero__remaining { flex: 0 0 auto; min-width: 168px; text-align: right; }
.subscription-hero__remaining > span { display: block; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.subscription-hero__remaining strong { display: block; margin: 3px 0 2px; color: var(--accent); font-size: 22px; }
.subscription-hero__remaining small { color: var(--faint); font-size: 10.5px; }
.subscription-progress { height: 5px; margin-top: 20px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.subscription-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); }
.subscription-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; margin-top: 16px; }
.subscription-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.subscription-details div { min-width: 0; }
.subscription-details dt { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.subscription-details dd { margin: 3px 0 0; color: var(--text); font-size: 12.5px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.subscription-benefits { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.subscription-benefits li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-soft); font-size: 12.5px; line-height: 1.4; }
.subscription-benefits li span { color: var(--accent); font-weight: 700; }
.subscription-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11px; line-height: 1.45; }
.subscription-section { margin-top: 16px; }
.subscription-section .panel__head { align-items: flex-start; }
.subscription-section .panel__head p { margin: 3px 0 0; font-size: 11.5px; }
.subscription-upgrades { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.subscription-upgrade { display: flex; flex-direction: column; gap: 3px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.subscription-upgrade__tier { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.subscription-upgrade strong { font-size: 13px; }
.subscription-upgrade__price { margin: 4px 0 8px; font-family: var(--font-serif); font-size: 20px; }
.subscription-upgrade .btn { margin-top: auto; align-self: flex-start; }
.subscription-freeze p { margin: 0; font-size: 12.5px; }
.subscription-empty { max-width: 560px; margin: 0 auto; padding: 30px; text-align: center; }
.subscription-empty__icon { font-size: 34px; color: var(--accent); }
.subscription-empty h2 { margin: 8px 0; font-family: var(--font-serif); }
.subscription-empty p { margin: 0 0 16px; }
@media (max-width: 760px) {
  .subscription-hero__top { flex-direction: column; }
  .subscription-hero__remaining { text-align: left; }
  .subscription-grid { grid-template-columns: 1fr; }
  .subscription-details { grid-template-columns: 1fr; }
}
.user-menu__popover { min-width: 215px; }
.user-menu__popover a { display: flex; align-items: center; gap: 10px; }
.user-menu__icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--faint); transition: color .15s; }
.user-menu__popover a:hover .user-menu__icon { color: var(--accent); }
.subscription-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr); gap: 16px; align-items: stretch; }
.subscription-main { min-width: 0; }
.subscription-history { position: sticky; top: 88px; align-self: stretch; min-width: 0; padding: 16px; }
.subscription-history .panel__head { margin-bottom: 12px; }
.subscription-history .panel__head h2 { font-size: 16px; }
.subscription-history .panel__head p { margin: 3px 0 0; font-size: 10.5px; }
.payment-list { display: flex; flex-direction: column; }
.payment-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.payment-row:first-child { padding-top: 0; }
.payment-row:last-child { border-bottom: 0; padding-bottom: 0; }
.payment-row__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.payment-row__body strong { color: var(--text-soft); font-size: 11.5px; line-height: 1.35; }
.payment-row__body span { color: var(--faint); font-size: 9.5px; }
.payment-row__amount { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.payment-row__amount strong { color: var(--text); font-size: 11.5px; white-space: nowrap; }
.payment-row__amount span { color: var(--faint); font-size: 9px; }
.payment-more { width: 100%; margin-top: 12px; }
.payment-empty { margin: 8px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.45; }
@media (max-width: 950px) {
  .subscription-layout { grid-template-columns: 1fr; }
  .subscription-history { position: static; }
}
.subscription-empty { max-width: none; width: 100%; margin: 0; }
.privacy-checks { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin: 2px 0; }
.privacy-check { width: 100%; }
.admin-subscription { padding: 16px 18px; }
.admin-subscription__summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-subscription__summary > div { display: flex; flex-direction: column; gap: 3px; }
.admin-subscription__summary strong { font-size: 14px; }
.admin-subscription__summary .muted { font-size: 11.5px; }
.admin-subscription__edit { flex: 0 0 auto; }
.admin-subscription__edit > summary { cursor: pointer; list-style: none; }
.admin-subscription__edit > summary::-webkit-details-marker { display: none; }
.admin-subscription__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.admin-subscription__form > .checkbox, .admin-subscription__form > .admin-subscription__hint, .admin-subscription__form > .btn { grid-column: 1 / -1; }
.admin-subscription__term { display: flex; gap: 9px; align-items: flex-end; }
.admin-subscription__term .field { flex: 1; }
.admin-subscription__term .field:last-child { flex: 0 0 120px; }
.admin-subscription__hint { margin: 0; color: var(--faint); font-size: 10.5px; line-height: 1.45; }
.admin-subscription__form:disabled, .admin-subscription__term.is-disabled { opacity: .45; }
.admin-subscription__edit[open] > summary { color: var(--text); }
@media (max-width: 760px) {
  .admin-subscription__summary { flex-direction: column; }
  .admin-subscription__form { grid-template-columns: 1fr; }
  .admin-subscription__form > .checkbox, .admin-subscription__form > .admin-subscription__hint, .admin-subscription__form > .btn { grid-column: auto; }
}
.admin-subscription__summary { display: block; }
.admin-subscription__edit { margin-top: 12px; }
.admin-subscription__edit[open] { margin-top: 14px; }
.subscription-compare { margin-top: 36px; }
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.compare-table th, .compare-table td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.compare-table thead th { background: var(--surface-2); color: var(--text-soft); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.compare-table thead th:first-child, .compare-table tbody th { text-align: left; }
.compare-table tbody th { color: var(--text); font-weight: 500; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
.compare-table__ad-free { color: #9bd7ff; }
.compare-table__pro { color: var(--accent); }
.compare-table__vip { color: #c3a4ff; }
.compare-yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(46, 107, 79, .18); color: var(--green); font-weight: 700; }
.compare-no { color: var(--faint); }
.compare-value { font-size: 15px; }
.compare-note { margin: 9px 0 0; color: var(--faint); font-size: 10.5px; }
[data-theme="light"] .compare-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, .018); }
.notifications-head { align-items: flex-start; flex-wrap: wrap; }
.notifications-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.notification-filter { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.notification-filter a { padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.notification-filter a:hover { color: var(--text); }
.notification-filter a.is-active { background: var(--surface-2); color: var(--text); }
.notification-filter a span { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 700; }
.notification-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-soft); background: var(--surface); transition: background .15s; }
.notification-item:last-child { border-bottom: 0; }
.notification-item .notification { flex: 1; min-width: 0; border-bottom: 0; }
.notification-item.is-selected { background: rgba(246, 183, 60, .075); }
.notification-check { display: none; align-items: flex-start; padding: 16px 0 16px 14px; cursor: pointer; }
.notifications.is-selecting .notification-check { display: flex; }
.notification-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.notification-bulkbar { position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 75; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; border-top: 1px solid var(--line); background: rgba(11, 13, 16, .94); backdrop-filter: blur(18px); box-shadow: 0 -12px 34px rgba(0, 0, 0, .32); }
.notification-bulkbar > span { color: var(--text); font-size: 13px; font-weight: 600; }
.notification-bulkbar__actions { display: flex; align-items: center; gap: 8px; }
.notification-bulkbar__delete { border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
body.has-notification-bulk { padding-bottom: 72px; }
[data-theme="light"] .notification-bulkbar { background: rgba(251, 249, 244, .95); }
@media (max-width: 700px) {
  .notifications-actions { justify-content: flex-start; }
  .notification-bulkbar { left: 0; padding: 10px 14px; flex-wrap: wrap; }
  .notification-bulkbar > span { width: 100%; }
}
.notification-item:nth-child(even) { background: rgba(255, 255, 255, .022); }
.notification-item.is-selected { background: rgba(246, 183, 60, .09); }
.notification-check { align-items: center; }
.notification__time { align-self: center; padding-top: 0; }
[data-theme="light"] .notification-item:nth-child(even) { background: rgba(0, 0, 0, .025); }
[data-theme="light"] .notification-item.is-selected { background: rgba(246, 183, 60, .12); }
.notification-item:nth-child(even) { background: rgba(255, 255, 255, .055); }
.notification-item:hover { background: var(--surface-2); }
.notification-item.is-selected { background: rgba(246, 183, 60, .1); }
.notification-item.is-selected:hover { background: rgba(246, 183, 60, .14); }
.notification:hover { background: transparent; }
.notification-check { padding-left: 20px; }
.notification { padding-left: 10px; }
[data-theme="light"] .notification-item:nth-child(even) { background: rgba(0, 0, 0, .025); }
[data-theme="light"] .notification-item:hover { background: var(--surface-2); }
.notification-item:nth-child(even) { background: #11161d; }
.notification-bulkbar[hidden] { display: none; }
[data-theme="light"] .notification-item:nth-child(even) { background: rgba(0, 0, 0, .025); }
.notification-item:hover { background: var(--surface-2); }
.notification-item.is-selected:hover { background: rgba(246, 183, 60, .14); }
.notification:hover { background: transparent; }
.notification-day__heading { position: relative; display: flex; align-items: center; justify-content: center; min-height: 26px; margin: 0 0 7px; }
.notification-day__heading .notification-day__title { margin: 0; }
.notification-selection-tools { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11.5px; }
.notification-selection-tools[hidden] { display: none; }
.notification-selection-tools button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.notification-selection-tools button:hover { color: var(--text); }
[data-theme="light"] .notification-item:nth-child(even) { background: rgba(0, 0, 0, .025); }
@media (max-width: 700px) {
  .notification-selection-tools { position: static; transform: none; width: 100%; justify-content: flex-start; margin-bottom: 3px; }
  .notification-day__heading { flex-direction: column; }
}
.admin-subscription-section { display: none; }
body.is-edit-mode .admin-subscription-section { display: block; }
.admin-subscription__form { grid-template-columns: 1fr; }
.admin-subscription__form > .btn { justify-self: start; width: auto; }
.admin-subscription__term { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-items: end; }
.admin-subscription__term .field { min-width: 0; }
.admin-subscription__term input { width: 100%; }
.admin-subscription__current { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.admin-subscription__current > strong { font-size: 14px; }
.admin-subscription__current > .muted { font-size: 11.5px; }
.admin-subscription__grants { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.admin-subscription__grants-title { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-subscription__grant { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: 11.5px; }
.admin-subscription__grant strong { color: var(--text-soft); font-size: 12px; }
.admin-subscription__group-label { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-subscription__error { margin: 0; color: #fca5a5; font-size: 11.5px; }
.admin-subscription__term.is-disabled { opacity: .45; }
.subscription-grid > .panel { margin-top: 0; }
.subscription-grid { align-items: stretch; }
.comment__restore-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.comment__restore { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 11.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.comment__restore:hover { color: var(--accent-strong); }
.comment__restore:disabled { color: var(--faint); text-decoration: none; cursor: default; }
.comment__restore-timer { color: var(--faint); font-size: 10.5px; font-variant-numeric: tabular-nums; }
/* ---------- единая палитра уровней подписки ---------- */
:root {
  --tier-ads: #58b6ff;
  --tier-ads-line: rgba(88, 182, 255, .62);
  --tier-ads-soft: rgba(88, 182, 255, .13);
  --tier-ads-ink: #071a28;
  --tier-pro: #cbd4df;
  --tier-pro-strong: #9aa8b9;
  --tier-pro-line: rgba(203, 212, 223, .62);
  --tier-pro-soft: rgba(203, 212, 223, .13);
  --tier-pro-ink: #151d27;
  --tier-vip: #f6b73c;
  --tier-vip-strong: #d99a13;
  --tier-vip-line: rgba(246, 183, 60, .66);
  --tier-vip-soft: rgba(246, 183, 60, .13);
  --tier-vip-ink: #1b1407;
}

.badge--tier-ad_free { background: linear-gradient(135deg, #b9e4ff, var(--tier-ads)); color: var(--tier-ads-ink); box-shadow: 0 0 16px rgba(88, 182, 255, .3); }
.badge--tier-pro { background: linear-gradient(135deg, #f1f5fa, var(--tier-pro)); color: var(--tier-pro-ink); box-shadow: 0 0 16px rgba(203, 212, 223, .28); }
.badge--tier-vip { background: linear-gradient(135deg, #ffe6a5, var(--tier-vip)); color: var(--tier-vip-ink); box-shadow: 0 0 18px rgba(246, 183, 60, .4); }

.pricing-tier-icon--ad_free { color: #9bd7ff; background: var(--tier-ads-soft); border-color: var(--tier-ads-line); }
.pricing-tier-icon--pro { color: #e6edf5; background: var(--tier-pro-soft); border-color: var(--tier-pro-line); }
.pricing-tier-icon--vip { color: #ffe3a0; background: var(--tier-vip-soft); border-color: var(--tier-vip-line); }
.pricing-card--ad_free { border-color: var(--tier-ads-line); }
.pricing-card--pro { border-color: var(--tier-pro-line); background: linear-gradient(150deg, var(--tier-pro-soft), var(--surface)); }
.pricing-card--vip { border-color: var(--tier-vip-line); background: linear-gradient(150deg, var(--tier-vip-soft), var(--surface)); }
.pricing-card--pro .pricing-card__price { color: var(--tier-pro); }
.pricing-card--vip .pricing-card__price { color: var(--tier-vip); }
.pricing-card--ad_free .pricing-card__price { color: var(--tier-ads); }
.pricing-card--pro .pricing-card__discount { background: linear-gradient(135deg, #eef3f8, var(--tier-pro-strong)); color: var(--tier-pro-ink); }
.pricing-card--vip .pricing-card__discount { background: linear-gradient(135deg, #ffe6a5, var(--tier-vip)); color: var(--tier-vip-ink); }
.pricing-card--ad_free .pricing-card__discount { background: linear-gradient(135deg, #b9e4ff, var(--tier-ads)); color: var(--tier-ads-ink); }

.pricing-card--pro .btn--primary { background: linear-gradient(135deg, #eef3f8, var(--tier-pro-strong)); border-color: transparent; color: var(--tier-pro-ink); box-shadow: 0 6px 18px rgba(154, 168, 185, .24); }
.pricing-card--pro .btn--primary:hover { background: linear-gradient(135deg, #ffffff, var(--tier-pro)); color: var(--tier-pro-ink); }
.pricing-card--vip .btn--primary { background: linear-gradient(135deg, #ffe6a5, var(--tier-vip)); border-color: transparent; color: var(--tier-vip-ink); box-shadow: 0 6px 18px rgba(246, 183, 60, .3); }
.pricing-card--vip .btn--primary:hover { background: linear-gradient(135deg, #ffefbf, #ffc957); color: var(--tier-vip-ink); }
.pricing-card--ad_free .btn--primary { background: linear-gradient(135deg, #b9e4ff, var(--tier-ads)); border-color: transparent; color: var(--tier-ads-ink); box-shadow: 0 6px 18px rgba(88, 182, 255, .24); }
.pricing-card--ad_free .btn--primary:hover { background: linear-gradient(135deg, #d7efff, #73c4ff); color: var(--tier-ads-ink); }

.pricing-card--pro .pricing-card__gift { background: transparent !important; border: 1px solid var(--tier-pro-line) !important; color: var(--tier-pro) !important; box-shadow: none !important; }
.pricing-card--pro .pricing-card__gift:hover { background: var(--tier-pro-soft) !important; color: #f3f7fb !important; }
.pricing-card--vip .pricing-card__gift { background: transparent !important; border: 1px solid var(--tier-vip-line) !important; color: var(--tier-vip) !important; box-shadow: none !important; }
.pricing-card--vip .pricing-card__gift:hover { background: var(--tier-vip-soft) !important; color: #ffe8ad !important; }
.pricing-card--ad_free .pricing-card__gift { background: transparent !important; border: 1px solid var(--tier-ads-line) !important; color: var(--tier-ads) !important; box-shadow: none !important; }
.pricing-card--ad_free .pricing-card__gift:hover { background: var(--tier-ads-soft) !important; color: #bfe9ff !important; }

.compare-table__ad-free { color: var(--tier-ads); }
.compare-table__pro { color: var(--tier-pro); }
.compare-table__vip { color: var(--tier-vip); }
.pro-status--pro { border-color: var(--tier-pro-line); }
.pro-status--vip { border-color: var(--tier-vip-line); }
.pro-status--ad_free { border-color: var(--tier-ads-line); }

.subscription-hero--ad_free { border-color: var(--tier-ads-line); background: linear-gradient(135deg, var(--tier-ads-soft), var(--surface) 58%, var(--surface-2)); }
.subscription-hero--pro { border-color: var(--tier-pro-line); background: linear-gradient(135deg, var(--tier-pro-soft), var(--surface) 58%, var(--surface-2)); }
.subscription-hero--vip { border-color: var(--tier-vip-line); background: linear-gradient(135deg, var(--tier-vip-soft), var(--surface) 58%, var(--surface-2)); }
.subscription-hero__icon--ad_free { background: linear-gradient(135deg, #b9e4ff, var(--tier-ads)); color: var(--tier-ads-ink); box-shadow: 0 8px 24px rgba(88, 182, 255, .25); }
.subscription-hero__icon--pro { background: linear-gradient(135deg, #f1f5fa, var(--tier-pro-strong)); color: var(--tier-pro-ink); box-shadow: 0 8px 24px rgba(154, 168, 185, .25); }
.subscription-hero__icon--vip { background: linear-gradient(135deg, #ffe6a5, var(--tier-vip)); color: var(--tier-vip-ink); box-shadow: 0 8px 24px rgba(246, 183, 60, .3); }
.subscription-hero--ad_free .subscription-hero__remaining strong { color: var(--tier-ads); }
.subscription-hero--pro .subscription-hero__remaining strong { color: var(--tier-pro); }
.subscription-hero--vip .subscription-hero__remaining strong { color: var(--tier-vip); }
.subscription-progress--ad_free span { background: linear-gradient(90deg, #2f8fdf, var(--tier-ads)); }
.subscription-progress--pro span { background: linear-gradient(90deg, var(--tier-pro-strong), var(--tier-pro)); }
.subscription-progress--vip span { background: linear-gradient(90deg, var(--tier-vip-strong), var(--tier-vip)); }

.subscription-upgrade--ad_free { border-color: var(--tier-ads-line); background: linear-gradient(150deg, var(--tier-ads-soft), var(--surface)); }
.subscription-upgrade--pro { border-color: var(--tier-pro-line); background: linear-gradient(150deg, var(--tier-pro-soft), var(--surface)); }
.subscription-upgrade--vip { border-color: var(--tier-vip-line); background: linear-gradient(150deg, var(--tier-vip-soft), var(--surface)); }
.subscription-upgrade--ad_free .subscription-upgrade__tier { color: var(--tier-ads); }
.subscription-upgrade--pro .subscription-upgrade__tier { color: var(--tier-pro); }
.subscription-upgrade--vip .subscription-upgrade__tier { color: var(--tier-vip); }
.subscription-upgrade--ad_free .btn { border-color: var(--tier-ads-line); color: var(--tier-ads); }
.subscription-upgrade--pro .btn { border-color: var(--tier-pro-line); color: var(--tier-pro); }
.subscription-upgrade--vip .btn { border-color: var(--tier-vip-line); color: var(--tier-vip); }

.avatar--tier-ad_free { border-color: var(--tier-ads) !important; outline: 0 !important; }
.avatar--tier-pro { border-color: var(--tier-pro) !important; outline: 0 !important; }
.avatar--tier-vip { border-color: var(--tier-vip) !important; outline: 0 !important; }
.avatar__tier--ad_free { color: var(--tier-ads-ink); background: linear-gradient(135deg, #b9e4ff, var(--tier-ads)); box-shadow: 0 0 8px rgba(88, 182, 255, .55); }
.avatar__tier--pro { color: var(--tier-pro-ink); background: linear-gradient(135deg, #f1f5fa, var(--tier-pro)); box-shadow: 0 0 8px rgba(203, 212, 223, .55); }
.avatar__tier--vip { color: var(--tier-vip-ink); background: linear-gradient(135deg, #ffe6a5, var(--tier-vip)); box-shadow: 0 0 9px rgba(246, 183, 60, .6); }
[data-theme="light"] .pricing-card--pro { border-color: rgba(120, 135, 151, .52); }
[data-theme="light"] .pricing-card--vip { border-color: rgba(201, 147, 26, .52); }
[data-theme="light"] .subscription-hero--pro { border-color: rgba(120, 135, 151, .5); }
[data-theme="light"] .subscription-hero--vip { border-color: rgba(201, 147, 26, .5); }
[data-theme="light"] .avatar--tier-pro { border-color: #8795a8 !important; }
[data-theme="light"] .avatar--tier-vip { border-color: #c9931a !important; }
.notification-item--tier-ad_free { box-shadow: inset 2px 0 0 var(--tier-ads); }
.notification-item--tier-pro { box-shadow: inset 2px 0 0 var(--tier-pro); }
.notification-item--tier-vip { box-shadow: inset 2px 0 0 var(--tier-vip); }
/* единая заливка карточек тарифов: как у VIP, с цветом уровня */
.pricing-card--ad_free {
  background: linear-gradient(150deg, rgba(88, 182, 255, .13), var(--surface) 58%, var(--surface-2));
}
.pricing-card--pro {
  background: linear-gradient(150deg, rgba(203, 212, 223, .13), var(--surface) 58%, var(--surface-2));
}
.pricing-card--vip {
  background: linear-gradient(150deg, rgba(246, 183, 60, .13), var(--surface) 58%, var(--surface-2));
}
.pricing-card--ad_free,
.pricing-card--pro,
.pricing-card--vip {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}
/* заливка один-в-один как у VIP: тот же градиент и та же точка перехода */
.pricing-card--ad_free {
  background: linear-gradient(150deg, rgba(88, 182, 255, .13), var(--surface));
}
.pricing-card--pro {
  background: linear-gradient(150deg, rgba(203, 212, 223, .13), var(--surface));
}
.pricing-card--vip {
  background: linear-gradient(150deg, rgba(246, 183, 60, .13), var(--surface));
}
/* серебро и голубой требуют чуть большей плотности, чтобы читаться так же, как тёплое золото VIP */
.pricing-card--ad_free {
  background: linear-gradient(150deg, rgba(88, 182, 255, .18), var(--surface));
}
.pricing-card--pro {
  background: linear-gradient(150deg, rgba(203, 212, 223, .2), var(--surface));
}
/* «Без рекламы» возвращаем к исходному оформлению карточки */
.pricing-card--ad_free {
  background: var(--surface);
  border-color: rgba(99, 179, 237, .35);
  box-shadow: none;
}
.pricing-card--ad_free .pricing-card__price { color: var(--text); }
.pricing-card--ad_free .pricing-card__discount {
  background: var(--accent);
  color: var(--accent-ink);
}
.pricing-card--ad_free .btn--primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(246, 183, 60, .22);
}
.pricing-card--ad_free .btn--primary:hover {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  filter: brightness(1.05);
}
.pricing-card--ad_free .pricing-card__gift {
  background: linear-gradient(135deg, #343052, #292945) !important;
  border: 1px solid #4a4468 !important;
  color: #f3efff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .28) !important;
}
.pricing-card--ad_free .pricing-card__gift:hover {
  background: linear-gradient(135deg, #403a63, #322f52) !important;
  border-color: #665d8f !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35) !important;
}
.pricing-tier-icon--ad_free { color: #9bd7ff; background: rgba(99, 179, 237, .14); border-color: rgba(99, 179, 237, .35); }
.compare-table__ad-free { color: #9bd7ff; }
/* «Без рекламы»: заливка и кнопки в цвете значка #9bd7ff */
.pricing-card--ad_free {
  background: linear-gradient(150deg, rgba(155, 215, 255, .17), var(--surface));
  border-color: rgba(155, 215, 255, .52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}
.pricing-card--ad_free .pricing-card__price { color: #bfe9ff; }
.pricing-card--ad_free .pricing-card__discount {
  background: linear-gradient(135deg, #d7efff, #9bd7ff);
  color: #071a28;
}
.pricing-card--ad_free .btn--primary {
  background: linear-gradient(135deg, #d7efff, #9bd7ff);
  border-color: transparent;
  color: #071a28;
  box-shadow: 0 6px 18px rgba(155, 215, 255, .28);
}
.pricing-card--ad_free .btn--primary:hover {
  background: linear-gradient(135deg, #e8f7ff, #b5e4ff);
  color: #071a28;
  filter: none;
}
.pricing-card--ad_free .pricing-card__gift {
  background: transparent !important;
  border: 1px solid rgba(155, 215, 255, .52) !important;
  color: #9bd7ff !important;
  box-shadow: none !important;
}
.pricing-card--ad_free .pricing-card__gift:hover {
  background: rgba(155, 215, 255, .11) !important;
  border-color: #9bd7ff !important;
  color: #d7efff !important;
  box-shadow: none !important;
}
.subscription-main > .subscription-section:first-child { margin-top: 0; }
.admin-restrictions-section { display: none; }
body.is-edit-mode .admin-restrictions-section { display: block; }
.admin-restrictions { padding: 16px 18px; }
.admin-restrictions__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.admin-restriction { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); }
.admin-restriction__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-restriction__body strong { font-size: 12.5px; }
.admin-restriction__body span { color: var(--text-soft); font-size: 11.5px; }
.admin-restriction__body small { color: var(--faint); font-size: 10.5px; }
.admin-restrictions__form { display: flex; flex-direction: column; gap: 10px; }
.admin-restrictions__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.admin-restrictions__fields .field { min-width: 0; }
.admin-restrictions__fields select { width: 100%; }
.admin-restrictions__other[hidden] { display: none; }
.admin-restrictions__error { margin: 0; color: #fca5a5; font-size: 11.5px; }
@media (max-width: 700px) {
  .admin-restrictions__fields { grid-template-columns: 1fr; }
  .admin-restriction { align-items: flex-start; }
}
.admin-restrictions__form > .btn { align-self: flex-start; width: auto; }
.admin-restrictions__fields { grid-template-columns: 1fr; }
.admin-restrictions__group-label { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-restrictions__term { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-items: end; }
.admin-restrictions__term .field { min-width: 0; }
.admin-restrictions__term input { width: 100%; }
.admin-restrictions__term.is-disabled { opacity: .45; }
.admin-form-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}
.admin-restrictions__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-restrictions__fields .admin-restrictions__other { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .admin-restrictions__fields { grid-template-columns: 1fr; }
}
/* выпадающие списки админ-панелей в цветах сайта */
.admin-restrictions select,
.admin-subscription select {
  color-scheme: dark;
  background-color: var(--surface);
  color: var(--text);
}
.admin-restrictions select option,
.admin-subscription select option {
  background-color: var(--surface-2);
  color: var(--text);
}
.admin-restrictions select option:checked,
.admin-subscription select option:checked {
  background-color: var(--accent);
  color: var(--accent-ink);
}
[data-theme="light"] .admin-restrictions select,
[data-theme="light"] .admin-subscription select {
  color-scheme: light;
  background-color: var(--surface);
  color: var(--text);
}
[data-theme="light"] .admin-restrictions select option,
[data-theme="light"] .admin-subscription select option {
  background-color: var(--surface);
  color: var(--text);
}
.two-columns { align-items: stretch; }
.two-columns > .panel { margin-top: 0; }
.form--center-action > .btn[type="submit"] { align-self: center; width: auto; min-width: 190px; }
/* встроенное редактирование карточек книги и автора */
.book-hero, .author-hero { position: relative; }
.card-edit-toggle {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  display: none; place-items: center; width: 32px; height: 32px;
  padding: 0; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--muted); cursor: pointer;
}
body.is-edit-mode .card-edit-toggle { display: grid; }
.card-edit-toggle:hover { border-color: var(--accent); color: var(--accent); }
.card-edit-toggle svg { width: 16px; height: 16px; }
.card-edit-only { display: none; }
.is-card-editing .card-view-only { display: none !important; }
.is-card-editing .card-edit-only { display: block; }
.book-card-edit { margin: 12px 0 4px; }
.author-card-edit { margin: 12px 0; }
.card-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.card-edit-grid__wide { grid-column: 1 / -1; }
.card-edit-grid .field { min-width: 0; }
.card-edit-grid select,
.card-edit-grid input,
.card-edit-only textarea { width: 100%; }
.card-edit-actions[hidden] { display: none !important; }
.card-edit-actions { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 14px 0 2px; }
@media (max-width: 700px) {
  .card-edit-grid { grid-template-columns: 1fr; }
  .card-edit-grid__wide { grid-column: auto; }
  .card-edit-toggle { top: 8px; right: 8px; }
}
/* мультивыбор жанров и циклов с поиском */
.multi-select { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elevated); overflow: hidden; }
.multi-select__search { width: 100%; height: 34px; padding: 0 10px; border: 0; border-bottom: 1px solid var(--line-soft); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; outline: none; }
.multi-select__search::placeholder { color: var(--faint); }
.multi-select__options { max-height: 190px; overflow-y: auto; padding: 5px 6px; }
.multi-option { display: flex; align-items: flex-start; gap: 8px; padding: 5px 7px; border-radius: 6px; color: var(--text-soft); font-size: 12px; line-height: 1.35; cursor: pointer; }
.multi-option[data-depth="1"] { padding-left: 23px; }
.multi-option[data-depth="2"] { padding-left: 39px; }
.multi-option[data-depth="3"] { padding-left: 55px; }
.multi-option[data-depth="4"] { padding-left: 71px; }
.multi-option[data-depth="5"] { padding-left: 87px; }
.multi-option:hover { background: var(--surface-2); color: var(--text); }
.multi-option input { width: 14px; height: 14px; flex: 0 0 14px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.multi-option--child span { color: var(--muted); }
.multi-option[hidden] { display: none; }
.multi-select__empty { margin: 0; padding: 8px 10px; color: var(--faint); font-size: 11.5px; }
.multi-select__empty[hidden] { display: none; }


/* календарь и ручной ввод годов в карточках */
input[type="date"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .92;
  cursor: pointer;
  filter: invert(1) brightness(1.5);
}
[data-theme="light"] input[type="date"] { color-scheme: light; }
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .8;
  filter: none;
}


/* явная календарная иконка для тёмной темы */
.card-edit-only input[type="date"] {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cbd4df' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 17px 17px;
}
.card-edit-only input[type="date"]::-webkit-calendar-picker-indicator {
  width: 36px;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
[data-theme="light"] .card-edit-only input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234a5565' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
}
/* заметный карандаш карточки, вынесен за пределы контента */
.card-edit-toggle {
  top: -12px;
  right: -10px;
  width: 36px;
  height: 36px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(246, 183, 60, .32);
}
.card-edit-toggle:hover {
  background: linear-gradient(135deg, #ffd98a, var(--accent));
  border-color: transparent;
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(246, 183, 60, .42);
}
.card-edit-toggle svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .card-edit-toggle { top: -8px; right: -6px; }
}
/* сохраняем нативный календарь кликабельным, иконку делаем светлой */
.card-edit-only input[type="date"] {
  padding-right: 38px;
  background-image: none;
}
.card-edit-only input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  opacity: 1;
  cursor: pointer;
  filter: invert(1) brightness(1.7);
}
[data-theme="light"] .card-edit-only input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}
/* видимая иконка + кликабельная область календаря */
.card-edit-only input[type="date"] {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cbd4df' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 17px 17px;
}
.card-edit-only input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}
[data-theme="light"] .card-edit-only input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234a5565' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
}


/* портрет автора: загрузка и замена как у аватара */
.author-photo-edit { position: relative; width: 100%; align-self: start; }
.author-photo-edit .author-hero__photo { width: 100%; }
.author-photo-edit .profile-avatar-edit__pencil { right: -8px; bottom: -8px; z-index: 6; }
.author-photo-edit .profile-avatar-remove { right: -42px; bottom: -8px; z-index: 6; }
.author-photo-edit input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.author-photo-edit #avatar-upload-error { position: absolute; left: 0; top: calc(100% + 4px); width: 220px; }


/* портрет доступен для замены только в режиме редактирования карточки */
.author-photo-edit .profile-avatar-edit__pencil,
.author-photo-edit .profile-avatar-remove {
  display: none;
}
.author-hero.is-card-editing .author-photo-edit .profile-avatar-edit__pencil,
.author-hero.is-card-editing .author-photo-edit .profile-avatar-remove {
  display: grid;
}
/* кнопки портрета автора не заходят на соседнюю колонку */
.author-photo-edit .profile-avatar-edit__pencil { right: 14px; }
.author-photo-edit .profile-avatar-remove { right: 50px; }
@media (max-width: 700px) {
  .author-photo-edit .profile-avatar-edit__pencil { right: 6px; }
  .author-photo-edit .profile-avatar-remove { right: 38px; }
}
/* правая граница карандаша совпадает с правой границей портрета */
.author-photo-edit .profile-avatar-edit__pencil { right: 0; }
.author-photo-edit .profile-avatar-remove { right: 36px; }
@media (max-width: 700px) {
  .author-photo-edit .profile-avatar-edit__pencil { right: 0; }
  .author-photo-edit .profile-avatar-remove { right: 32px; }
}
/* история платежей: высота как у основной колонки и внутренняя прокрутка */
.subscription-freeze form { margin-top: 14px; }
.subscription-history {
  height: 100%;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.subscription-history .payment-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.subscription-history .payment-list::-webkit-scrollbar { width: 6px; }
.subscription-history .payment-list::-webkit-scrollbar-track { background: transparent; }
.subscription-history .payment-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
.subscription-history .payment-more { flex: 0 0 auto; }
.subscription-history .payment-empty { flex: 0 0 auto; }
@media (max-width: 950px) {
  .subscription-history { height: auto; max-height: none; }
  .subscription-history .payment-list { max-height: 320px; }
}
/* история не задаёт высоту строки, высота синхронизируется с основной колонкой */
.subscription-history {
  height: 0;
  max-height: none;
  min-height: 0;
  align-self: start;
}


/* индикаторы статуса подписки */
.status-dot--active { background: var(--green); }
.status-dot--frozen { background: #58a6ff; }
.status-dot--expired { background: #e05a4f; }
.status-dot--none { background: var(--faint); }
.subscription-state { display: flex; align-items: center; gap: 2px; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
/* улучшение подписки: группы и по четыре карточки в ряд */
.subscription-upgrade-group + .subscription-upgrade-group { margin-top: 16px; }
.subscription-upgrade-group__head { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.subscription-upgrades { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.subscription-upgrade { min-width: 0; }
@media (max-width: 1100px) { .subscription-upgrades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .subscription-upgrades { grid-template-columns: 1fr; } }


/* названия групп улучшения: крупнее и со значком уровня */
.subscription-upgrade-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}
.subscription-upgrade-group__icon {
  width: 22px;
  height: 22px;
  font-size: 12px;
  margin: 0;
  vertical-align: 0;
  flex: 0 0 22px;
}


/* внутренние заметки администраторов */
.admin-notes-section { display: none; }
body.is-edit-mode .admin-notes-section { display: block; }
.admin-notes { padding: 16px 18px; }
.admin-note { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.admin-note:first-child { padding-top: 0; }
.admin-note:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-note__head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 7px; }
.admin-note__head strong { font-size: 12.5px; }
.admin-note__meta { color: var(--faint); font-size: 10.5px; }
.admin-note__text { margin: 0 0 8px; color: var(--text-soft); font-size: 12.5px; line-height: 1.5; }
.admin-note__textarea { width: 100%; min-height: 84px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-elevated); color: var(--text); font: inherit; font-size: 12.5px; line-height: 1.45; }
.admin-note__textarea:focus { outline: none; border-color: rgba(246, 183, 60, .55); }
.admin-note__actions { display: flex; gap: 8px; margin-top: 8px; }
.admin-note__delete { margin-top: 8px; color: #e58a80; }
.admin-notes__list { margin-top: 14px; padding-top: 2px; border-top: 1px solid var(--line-soft); }
.admin-note__edit { margin-top: 5px; }
.admin-note__edit > summary { color: var(--muted); cursor: pointer; font-size: 11.5px; }
.admin-note__edit[open] > summary { color: var(--text); margin-bottom: 7px; }


/* мягкая пульсация индикаторов состояния подписки */
.status-dot--active { --status-rgb: 74, 222, 128; }
.status-dot--frozen { --status-rgb: 88, 166, 255; }
.status-dot--expired { --status-rgb: 224, 90, 79; }
.status-dot--none { --status-rgb: 150, 161, 176; }
.status-dot {
  position: relative;
  animation: status-dot-pulse 2s ease-out infinite;
}
@keyframes status-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--status-rgb), .48); }
  65% { box-shadow: 0 0 0 5px rgba(var(--status-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--status-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}


/* лимит любимых жанров */
.genre-limit { margin: 2px 0 10px; color: var(--muted); font-size: 11.5px; }
.genre-limit.is-over { color: #e05a4f; font-weight: 600; }
.genre-limit-note { margin: 0 0 10px; padding: 8px 10px; border-left: 2px solid #e05a4f; color: var(--muted); font-size: 11px; line-height: 1.45; }


/* ---------- статистика чтения ---------- */
.read-stats-page { max-width: 1240px; padding-bottom: 30px; }
.read-stats-back { display: flex; width: max-content; margin-bottom: 14px; }
.read-stats-head { margin-bottom: 22px; }
.read-stats-head h1 { margin: 2px 0 6px; font-family: var(--font-serif); font-size: 44px; line-height: 1; }
.read-stats-head p { margin: 0; }
.read-period-row { display: flex; justify-content: center; margin-bottom: 20px; }
.read-period-switch { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.read-period-switch button { border: 0; background: transparent; color: var(--muted); padding: 8px 15px; border-radius: 999px; font: inherit; font-size: 12px; cursor: pointer; }
.read-period-switch button:hover { color: var(--text); }
.read-period-switch button.is-active { color: #17130a; background: var(--accent); font-weight: 700; }
.read-chart-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 12px 18px 9px; margin-bottom: 40px; }
.read-chart-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.read-period-label { flex: 1; text-align: center; font-family: var(--font-serif); font-size: 22px; font-weight: 700; }
.read-chart-tools { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 10.5px; }
.read-chart-arrow { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; font: inherit; }
.read-chart-arrow:hover { border-color: var(--accent); color: var(--accent); }
.read-chart-box { overflow-x: auto; overflow-y: hidden; padding: 14px 4px 0; cursor: grab; scrollbar-width: none; -ms-overflow-style: none; }
.read-chart-box::-webkit-scrollbar { display: none; width: 0; height: 0; }
.read-chart-box.is-dragging { cursor: grabbing; }
.read-chart-track { position: relative; display: flex; align-items: flex-end; justify-content: flex-start; gap: 6px; width: max-content; min-width: 100%; height: 105px; padding: 0 12px; }
.read-chart-grid { position: absolute; inset: 0 12px 24px; background: repeating-linear-gradient(to top, var(--line-soft) 0 1px, transparent 1px 25%); opacity: .55; pointer-events: none; }
.read-chart-bar { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; width: 48px; height: 100%; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.read-chart-bar__count { font-size: 10px; color: var(--text-soft); }
.read-chart-bar__track { display: flex; align-items: flex-end; width: 28px; height: 76px; border-radius: 7px 7px 2px 2px; background: rgba(255,255,255,.025); overflow: hidden; }
.read-chart-bar__fill { display: block; width: 100%; min-height: 0; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, rgba(246,183,60,.26), rgba(246,183,60,.06)); border-top: 2px solid rgba(246,183,60,.5); }
.read-chart-bar:hover .read-chart-bar__fill { background: linear-gradient(180deg, rgba(246,183,60,.45), rgba(246,183,60,.12)); }
.read-chart-bar.is-selected .read-chart-bar__fill { background: linear-gradient(180deg, #f6b73c, #b87810); border-top-color: #ffd77a; box-shadow: 0 0 26px rgba(246,183,60,.22); }
.read-chart-bar.is-selected .read-chart-bar__count, .read-chart-bar.is-selected .read-chart-bar__label { color: var(--accent); }
.read-chart-bar__label { max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; color: var(--faint); }
.read-chart-bar.is-empty .read-chart-bar__count { color: var(--faint); }
.read-chart-bar.is-future .read-chart-bar__count, .read-chart-bar.is-future .read-chart-bar__label { opacity: .55; }
.read-chart-bar.is-empty .read-chart-bar__fill { display: none; }
.read-chart-tooltip { position: fixed; z-index: 100; max-width: 240px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #171b21; box-shadow: 0 10px 24px rgba(0,0,0,.45); color: var(--text-soft); font-size: 10.5px; line-height: 1.35; pointer-events: none; }
.read-chart-note { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; color: var(--faint); font-size: 10.5px; }
.read-chart-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.read-next-row { display: flex; justify-content: center; margin: 0 0 40px; }
.read-next-row:empty { display: none; }
.read-prev-row { display: flex; justify-content: center; margin: 22px 0 0; }
.read-next-row [hidden], .read-prev-row [hidden], .read-next-row[hidden], .read-prev-row[hidden] { display: none !important; }
.read-blocks { display: flex; flex-direction: column; gap: 40px; }
.read-genre-filter { margin-bottom: 40px; padding: 15px 18px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.read-genre-filter__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.read-genre-filter__heading { display: flex; align-items: baseline; gap: 9px; }
.read-genre-filter__heading .eyebrow { color: var(--accent); }
.read-genre-filter__heading strong { font-family: var(--font-serif); font-size: 19px; }
.read-genre-filter__summary { color: var(--faint); font-size: 10.5px; }
.read-genre-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.read-genre-pill { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text-soft); padding: 7px 11px; font: inherit; font-size: 11px; cursor: pointer; }
.read-genre-pill:hover { border-color: rgba(246,183,60,.55); color: var(--text); }
.read-genre-pill.is-selected { border-color: var(--accent); color: #17130a; background: var(--accent); font-weight: 700; }
.read-genre-pill__cross { margin-left: 3px; font-size: 12px; opacity: .75; }
.read-genre-pill--all { border-color: rgba(246,183,60,.55); color: var(--accent); }
.read-genre-pill--clear { margin-left: auto; border-style: dashed; color: var(--muted); }
.read-work-item { min-width: 0; }
.read-work-item[hidden] { display: none; }
.read-period-block.is-filtered-out { display: none; }
.read-period-block { min-width: 0; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.read-period-title { margin: 0 0 16px; text-align: center; font-family: var(--font-serif); font-size: 22px; }
.read-period-title .section-count { color: var(--muted); font-family: var(--font-sans); font-size: 14px; font-weight: 400; }
.read-book-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.read-period-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 30px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.read-period-empty strong { color: var(--text-soft); font-size: 13px; }
.read-period-empty span { font-size: 11.5px; }
.read-all-card { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; gap: 3px; width: 100%; min-height: 68px; padding: 9px 8px; border: 1px dashed rgba(246,183,60,.42); border-radius: 12px; background: rgba(246,183,60,.045); color: var(--text); text-align: center; text-decoration: none; }
.read-all-card:hover { border-color: var(--accent); background: rgba(246,183,60,.09); }
.read-all-card strong { font-family: var(--font-serif); font-size: 12.5px; line-height: 1.35; }
.read-all-card__arrow { margin-left: 5px; color: var(--accent); }
.read-all-card small { color: var(--muted); font-size: 9.5px; line-height: 1.3; }
.profile-card-grid, .profile-read-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: start; }
.profile-read-grid .book-card__title { font-size: 13px; }
@media (max-width: 1000px) {
  .read-genre-filter__top { align-items: flex-start; flex-direction: column; }
  .read-genre-pill--clear { margin-left: 0; }
  .read-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-card-grid, .profile-read-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .read-stats-head h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .read-book-grid, .profile-card-grid, .profile-read-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .read-chart-tools span { display: none; }
  .read-period-label { font-size: 18px; }
  .read-all-card { margin-top: 0; min-height: 60px; }
}






/* На странице пользователя название само становится всплывающей подсказкой. */
.book-card__title-popover { display: none; }
html.profile-page .book-card__title-wrap { position: relative; z-index: 1; min-height: 20px; }
html.profile-page .shelf-card.is-tooltip-card,
html.profile-page .shelf-card:has(.book-card__title-wrap.is-tooltip-open) { z-index: 9998; }
html.profile-page .book-grid,
html.profile-page .shelf-panel { overflow: visible; }
html.profile-page .book-card__title-wrap.is-tooltip-open { z-index: 9999; }
html.profile-page .read-all-card { position: relative; z-index: 0; }
html.profile-page .book-card__title {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}
html.profile-page .book-card__title-wrap.is-tooltip-open .book-card__title,
html.profile-page .book-card__title-wrap.is-truncated:hover .book-card__title,
html.profile-page .book-card__title-wrap.is-truncated:focus-within .book-card__title,
html.profile-page .shelf-card.is-last-shelf-card .book-card__title-wrap:hover .book-card__title,
html.profile-page .profile-card-grid .shelf-card:last-child .book-card__title-wrap:hover .book-card__title {
  position: absolute;
  top: -6px;
  left: -9px;
  z-index: 80;
  width: max-content;
  max-width: min(340px, calc(100vw - 40px));
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}


/* Последняя карточка раскрывает название влево, чтобы не уходить под «Смотреть все». */
html.profile-page .shelf-card.is-last-shelf-card .book-card__title-wrap.is-tooltip-open .book-card__title,
html.profile-page .shelf-card.is-last-shelf-card .book-card__title-wrap.is-truncated:hover .book-card__title,
html.profile-page .shelf-card.is-last-shelf-card .book-card__title-wrap.is-truncated:focus-within .book-card__title,
html.profile-page .shelf-card.is-last-shelf-card .book-card__title-wrap:hover .book-card__title,
html.profile-page .profile-card-grid .shelf-card:last-child .book-card__title-wrap:hover .book-card__title {
  left: auto;
  right: -9px;
}

.edition-status-form { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.edition-status-form select { min-height: 30px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; }

.publisher-hero { position: relative; }
.publisher-card-edit { margin-top: 14px; }
.card-edit-toggle { display: grid; }

/* ---------- рамки и значки типа аккаунта: Автор / Издательство ---------- */
.avatar.avatar--account-author {
  border: 2px solid #d96b62 !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.avatar.avatar--account-publisher {
  border: 2px solid #55c7c7 !important;
  box-shadow: 0 0 0 2px rgba(85,199,199,.26), 0 0 14px rgba(85,199,199,.2) !important;
  outline: 0 !important;
}
.avatar--sm.avatar--account-author,
.avatar--sm.avatar--account-publisher { border-width: 2px !important; }
.avatar--lg.avatar--account-author,
.avatar--lg.avatar--account-publisher { border-width: 3px !important; }
.avatar--xl.avatar--account-author,
.avatar--xl.avatar--account-publisher { border-width: 4px !important; }

.profile-hero__avatar.avatar--account-author {
  border: 4px solid #d96b62 !important;
  box-shadow: none !important;
}
.profile-hero__avatar.avatar--account-publisher {
  border: 4px solid #55c7c7 !important;
  box-shadow: 0 0 0 3px rgba(85,199,199,.28), 0 0 22px rgba(85,199,199,.2) !important;
}

.avatar__account {
  position: absolute;
  top: -5px;
  left: -5px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.avatar__account--author {
  color: #2a0e0b;
  background: linear-gradient(135deg, #ffb4ac, #d96b62);
  box-shadow: 0 0 8px rgba(217,107,98,.5);
}
.avatar__account--publisher {
  color: #062b2b;
  background: linear-gradient(135deg, #b8f1ef, #55c7c7);
  box-shadow: 0 0 8px rgba(85,199,199,.5);
}
.avatar--sm .avatar__account { top: -4px; left: -4px; width: 14px; height: 14px; font-size: 8px; border-width: 1.5px; }
.avatar--lg .avatar__account { top: -5px; left: -5px; width: 23px; height: 23px; font-size: 12px; }
.avatar--xl .avatar__account { top: -7px; left: -7px; width: 30px; height: 30px; font-size: 15px; }
.profile-hero__avatar .avatar__account { top: -8px; left: -8px; width: 33px; height: 33px; font-size: 16px; }

.badge--account-author {
  background: rgba(217,107,98,.16);
  color: #f0a39d;
  border: 1px solid rgba(217,107,98,.38);
}
.badge--account-publisher {
  background: rgba(85,199,199,.14);
  color: #9ce7e5;
  border: 1px solid rgba(85,199,199,.34);
}


/* Рамки и значки авторов/издательств по геометрии как у подписок. */
.avatar.avatar--account-author,
.avatar.avatar--account-publisher {
  box-shadow: none !important;
}
.profile-hero__avatar.avatar--account-author,
.profile-hero__avatar.avatar--account-publisher {
  box-shadow: none !important;
}
.avatar--sm.avatar--account-author,
.avatar--sm.avatar--account-publisher { border-width: 2px !important; }
.avatar--lg.avatar--account-author,
.avatar--lg.avatar--account-publisher { border-width: 3px !important; }
.avatar--xl.avatar--account-author,
.avatar--xl.avatar--account-publisher { border-width: 4px !important; }
.profile-hero__avatar.avatar--account-author,
.profile-hero__avatar.avatar--account-publisher { border-width: 4px !important; }

.avatar__account {
  top: -5px;
  right: -5px;
  left: auto;
  width: 18px;
  height: 18px;
  border-width: 2px;
  font-size: 9px;
}
.avatar--sm .avatar__account {
  top: -3px;
  right: -3px;
  left: auto;
  width: 13px;
  height: 13px;
  border-width: 1.5px;
  font-size: 7px;
}
.avatar--lg .avatar__account {
  top: -2px;
  right: 8px;
  left: auto;
  width: 24px;
  height: 24px;
  border-width: 2px;
  font-size: 11px;
}
.avatar--xl .avatar__account {
  top: 2px;
  right: 3px;
  left: auto;
  width: 34px;
  height: 34px;
  border-width: 2px;
  font-size: 15px;
}
.profile-hero__avatar .avatar__account {
  top: -3px;
  right: 12px;
  left: auto;
  width: 32px;
  height: 32px;
  border-width: 2px;
  font-size: 14px;
}



/* Центрирование символов внутри круглых значков. */
.avatar__tier,
.avatar__account {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* Иконки в круглых значках: SVG-маски вместо текстовых глифов. */
.avatar__tier,
.avatar__account {
  font-size: 0 !important;
  line-height: 0 !important;
}
.avatar__tier::before,
.avatar__account::before {
  content: "";
  display: block;
  width: 62%;
  height: 62%;
  background: currentColor;
  -webkit-mask: var(--badge-icon) center / contain no-repeat;
  mask: var(--badge-icon) center / contain no-repeat;
}
.avatar__tier--ad_free { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 3v6c0 5-3.5 8.5-8 11-4.5-2.5-8-6-8-11V5l8-3z'/%3E%3C/svg%3E"); }
.avatar__tier--pro { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l3 6.2 6.8.9-5 4.8 1.2 6.8L12 17.5 6 20.7l1.2-6.8-5-4.8 6.8-.9L12 2z'/%3E%3C/svg%3E"); }
.avatar__tier--vip { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 8l4 3 5-6 5 6 4-3-2 10H5L3 8z'/%3E%3C/svg%3E"); }
.avatar__account--author { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 4c-7 0-12 4-14 10l-2 6 6-2C16 16 20 11 20 4z'/%3E%3C/svg%3E"); }
.avatar__account--publisher { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 21V4h8v17H3zm10 0V8h8v13h-8zM6 7h2v2H6V7zm0 4h2v2H6v-2zm0 4h2v2H6v-2zm10-4h2v2h-2v-2zm0 4h2v2h-2v-2z'/%3E%3C/svg%3E"); }


/* Возвращаем исходные символы значков; центрируем их через SVG-текст. */
.avatar__tier,
.avatar__account {
  font-size: 9px !important;
  line-height: 1 !important;
}
.avatar__tier::before,
.avatar__account::before {
  content: none !important;
  display: none !important;
}
.avatar__badge-glyph {
  display: block;
  width: 66%;
  height: 66%;
  overflow: visible;
}
.avatar__badge-glyph text {
  fill: currentColor;
  font-family: "Segoe UI Symbol", "Segoe UI", "Noto Sans Symbols 2", sans-serif;
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: central;
}


/* Исходные размеры символов; только центрирование в круге. */
.avatar__tier,
.avatar__account {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
}
.avatar__tier::before,
.avatar__account::before { content: none !important; display: none !important; }
.avatar__badge-glyph { display: none !important; }
.avatar__tier, .avatar__account { font-size: 9px !important; }
.avatar--sm .avatar__tier, .avatar--sm .avatar__account { font-size: 8px !important; }
.avatar--lg .avatar__tier, .avatar--lg .avatar__account { font-size: 11px !important; }
.avatar--xl .avatar__tier, .avatar--xl .avatar__account { font-size: 15px !important; }
.profile-hero__avatar .avatar__tier, .profile-hero__avatar .avatar__account { font-size: 16px !important; }


/* Единое относительное положение круглого значка на всех аватарах. */
.avatar__tier,
.avatar__account {
  top: 11.8% !important;
  right: 25.5% !important;
  left: auto !important;
  bottom: auto !important;
  transform: translate(50%, -50%) !important;
}


/* Карточки-аватары: размер круга и значка как в профиле. */
.avatar--lg .avatar__tier,
.avatar--lg .avatar__account {
  width: 32px !important;
  height: 32px !important;
  font-size: 16px !important;
}


/* Размеры значков в карточках — исходные 24/11; меняется только положение. */
.avatar--lg .avatar__tier,
.avatar--lg .avatar__account {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}


/* Точная корректировка положения символа внутри круглого значка. */
.avatar__glyph {
  display: block;
  line-height: 1;
  transform: translate(1px, -1px);
}


/* Сдвиг всего круглого значка вместе с содержимым в карточках читателей. */
.reader-card .avatar__tier,
.reader-card .avatar__account {
  transform: translate(calc(50% + 6px), calc(-50% - 6px)) !important;
}


/* Крупнее символы внутри круглых значков в карточках читателей. */
.reader-card .avatar__tier,
.reader-card .avatar__account {
  font-size: 18px !important;
}


/* Размер символов значков в карточках читателей: 16 px. */
.reader-card .avatar__tier,
.reader-card .avatar__account {
  font-size: 16px !important;
}


/* Все символы в карточках, кроме авторского, сдвинуты на 1 px влево. */
.reader-card .avatar__tier .avatar__glyph,
.reader-card .avatar__account--publisher .avatar__glyph {
  transform: translate(0, -1px) !important;
}


/* Кнопка продления в блоке подписки и карточка остатка срока. */
.subscription-hero__renew { margin-top: 8px; }
.subscription-upgrade--remaining {
  border-style: dashed;
}


/* Рейтинги на главной. */
.ranking-section .section__head { align-items: flex-end; }
.ranking-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.ranking-filters__label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.ranking-filters__label select { height: 34px; min-width: 132px; padding: 0 28px 0 10px; }
.ranking-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 16px; }
.ranking-item { position: relative; min-width: 0; }
.ranking-item__rank {
  position: absolute; z-index: 2; top: 8px; left: 8px;
  display: grid; place-items: center; width: 23px; height: 23px;
  border-radius: 50%; background: rgba(11,13,16,.86); color: var(--accent);
  font-size: 11px; font-weight: 800; border: 1px solid rgba(246,183,60,.4);
}
.ranking-item__stat { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.ranking-item__stat strong { color: var(--accent); font-size: 12px; }
.ranking-empty { margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 620px) {
  .ranking-filters__label { flex: 1 1 100%; }
  .ranking-filters__label select { width: 100%; }
}

/* Рейтинги на главной. */
.ranking-section .section__head { align-items: flex-end; }
.ranking-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.ranking-filters__label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.ranking-filters__label select { height: 34px; min-width: 132px; padding: 0 28px 0 10px; }
.ranking-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 16px; }
.ranking-item { position: relative; min-width: 0; }
.ranking-item__rank {
  position: absolute; z-index: 2; top: 8px; left: 8px;
  display: grid; place-items: center; width: 23px; height: 23px;
  border-radius: 50%; background: rgba(11,13,16,.86); color: var(--accent);
  font-size: 11px; font-weight: 800; border: 1px solid rgba(246,183,60,.4);
}
.ranking-item__stat { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.ranking-item__stat strong { color: var(--accent); font-size: 12px; }
.ranking-empty { margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 620px) {
  .ranking-filters__label { flex: 1 1 100%; }
  .ranking-filters__label select { width: 100%; }
}


/* Периоды рейтингов: сегментированный переключатель. */
.ranking-periods {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: #0d1117; max-width: 100%; overflow-x: auto;
}
.ranking-period {
  height: 31px; padding: 0 15px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ranking-period:hover { color: var(--text); }
.ranking-period.is-active { background: linear-gradient(180deg, #ffd15c, #f6b73c); color: #211704; font-weight: 800; }


/* Фильтры рейтинга: период справа, жанры облаком ниже. */
.ranking-toolbar { display: flex; justify-content: flex-end; margin-bottom: 9px; }
.ranking-periods { flex: 0 0 auto; }
.ranking-genre-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ranking-genre-tag {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 11px;
  font-weight: 600; cursor: pointer;
}
.ranking-genre-tag:hover { border-color: var(--accent); color: var(--text); }
.ranking-genre-tag.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
@media (max-width: 620px) {
  .ranking-toolbar { justify-content: stretch; }
  .ranking-periods { width: 100%; overflow-x: auto; }
}


/* Рейтинг — одна горизонтальная строка из 10 книг, жанры по центру. */
.ranking-genre-cloud { justify-content: center; }
.ranking-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 10px;
  scroll-snap-type: x proximity;
}
.ranking-item {
  flex: 0 0 185px;
  scroll-snap-align: start;
}
@media (max-width: 620px) {
  .ranking-item { flex-basis: 155px; }
}


/* Финальная раскладка рейтинга: период справа, жанры по центру новой строкой, книги — прежней сеткой. */
.ranking-filters {
  display: block !important;
  width: 100%;
}
.ranking-toolbar {
  display: flex !important;
  width: 100% !important;
  justify-content: flex-end !important;
}
.ranking-genre-cloud {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
}
.ranking-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  gap: 22px 16px !important;
  overflow: visible !important;
  padding: 0 !important;
}
.ranking-item {
  width: auto !important;
  flex: none !important;
}


/* Отметка о чёрном списке рядом с именем. */
.profile-blocked-mark {
  display: inline-flex; align-items: center; margin-left: 10px;
  padding: 4px 9px; border: 1px solid rgba(255, 112, 112, .4);
  border-radius: 999px; background: rgba(255, 80, 80, .09);
  color: #ff9b9b; font-family: var(--font-sans); font-size: 10px;
  font-weight: 700; letter-spacing: .03em; vertical-align: middle;
}


/* Пробная раскладка: переключатель периода по центру. */
.ranking-toolbar { justify-content: center !important; }



/* На миниатюрных аватарах значки не показываем. */
.avatar--sm .avatar__tier,
.avatar--sm .avatar__account { display: none !important; }

/* Подсказки названий на главной — как в профиле. */
html.home-page .book-card__title-wrap { position: relative; z-index: 1; min-height: 20px; }
html.home-page .book-card:has(.book-card__title-wrap.is-tooltip-open) { position: relative; z-index: 9998; }
html.home-page .book-grid,
html.home-page .home-columns,
html.home-page .home-columns__main { overflow: visible; }
html.home-page .book-card__title-wrap.is-tooltip-open { z-index: 9999; }
html.home-page .book-card__title {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}
html.home-page .book-card__title-wrap.is-tooltip-open .book-card__title,
html.home-page .book-card__title-wrap.is-truncated:hover .book-card__title,
html.home-page .book-card__title-wrap.is-truncated:focus-within .book-card__title {
  position: absolute;
  top: -6px;
  left: -9px;
  z-index: 80;
  width: max-content;
  max-width: min(340px, calc(100vw - 40px));
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}


/* Категории уведомлений: цветная полоса только на месте прежней точки. */
.notification-item {
  --notif-color: #b08cff;
  --notif-gradient: linear-gradient(145deg, #cbb0ff 0%, #8b5dd1 55%, #52318a 100%);
}
.notification-item--info {
  --notif-color: #58b6ff;
  --notif-gradient: linear-gradient(145deg, #9bd8ff 0%, #3b9ee0 55%, #1d6499 100%);
}
.notification-item--important {
  --notif-color: #ff6b6b;
  --notif-gradient: linear-gradient(145deg, #ffb3b3 0%, #e54b55 55%, #971f2a 100%);
}
.notification-item--comments {
  --notif-color: #55c7c7;
  --notif-gradient: linear-gradient(145deg, #9ce9e2 0%, #3cb5b2 55%, #176c6b 100%);
}
.notification-item--system {
  --notif-color: #9aa7b5;
  --notif-gradient: linear-gradient(145deg, #c9d3dd 0%, #8a9aaa 55%, #4d5d6d 100%);
}
.notification-item--admin {
  --notif-color: #f6b73c;
  --notif-gradient: linear-gradient(145deg, #ffe29a 0%, #e7ac31 55%, #946108 100%);
}
.notification-item--other {
  --notif-color: #b08cff;
  --notif-gradient: linear-gradient(145deg, #d2baff 0%, #9265d4 55%, #57378e 100%);
}
.notification { padding: 0 16px 0 0 !important; align-items: stretch !important; }
.notification__body { padding: 14px 0; }
.notification__time { align-self: center; padding-top: 0; }
.notification__dot {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 26px; width: 26px; height: auto; min-height: 100%;
  margin: 0; border-radius: 0; background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.28) !important;
  color: transparent; font-family: var(--font-sans), "Segoe UI", Arial, sans-serif;
  font-size: 45px; font-weight: 700; line-height: 1;
}
.notification-item .notification__dot { background: var(--notif-gradient) !important; }
.notification-item.is-read .notification__dot { opacity: .38; }
.notification-item.is-important .notification__dot { background: var(--notif-gradient) !important; color: #fff; }
.notification__category {
  display: inline-block; margin-left: 8px; padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--notif-color) 45%, transparent);
  border-radius: 999px; color: var(--notif-color);
  font-size: 9px; font-weight: 700; letter-spacing: .03em;
  vertical-align: middle; white-space: nowrap;
}
.notification-item.is-read .notification__body strong,
.notification-item.is-read .notification__body > span,
.notification-item.is-read .notification__time { color: var(--faint) !important; }
.notification-item.is-read .notification__category { opacity: .65; }

/* Единая форма предложения */
.suggestion-links { display: grid; gap: 7px; margin: 4px 0 14px; }
.suggestion-links__list { display: grid; gap: 6px; }
.suggestion-links__row { display: flex; gap: 6px; }
.suggestion-links__row input {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 12px;
}
.suggestion-links__row input:focus { outline: 0; border-color: var(--gold); }
.suggestion-links__remove {
  flex: 0 0 36px; width: 36px; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.suggestion-links__remove:hover { border-color: var(--red); color: var(--red); }
.suggestion-links__add {
  justify-self: start; padding: 0; border: 0; background: none; color: var(--gold);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.suggestion-links__add:hover { text-decoration: underline; }
.suggestion-links-view { display: grid; gap: 4px; margin: 8px 0; }
.suggestion-links-view a { color: var(--gold); font-size: 11.5px; overflow-wrap: anywhere; }


/* Мои предложения: две колонки 3/2 */
.suggestions-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.suggestions-layout > .panel { min-width: 0; }
.suggestions-layout .suggestion-form { padding: 16px 16px 18px; }
.suggestion-links { display: grid; gap: 7px; margin: 4px 0 16px; }
.suggestion-links__list { display: grid; gap: 6px; }
.suggestion-links__row { display: flex; gap: 6px; }
.suggestion-links__row input {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 12px;
}
.suggestion-links__row input:focus { outline: 0; border-color: var(--gold); }
.suggestion-links__remove {
  flex: 0 0 36px; width: 36px; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.suggestion-links__remove[hidden] { display: none !important; }
.suggestion-links__remove:hover { border-color: var(--red); color: var(--red); }
.suggestion-links__add {
  justify-self: end; padding: 0; border: 0; background: none; color: var(--gold);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.suggestion-links__add:hover { text-decoration: underline; }
.suggestion-history { display: grid; gap: 8px; padding: 12px 14px 14px; }
.suggestion-history-card {
  display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; width: 100%;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--text); text-align: left; font: inherit; cursor: pointer;
}
.suggestion-history-card:hover { border-color: var(--gold); }
.suggestion-history-card__top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; }
.suggestion-history-card__kind { color: var(--gold); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.suggestion-history-card__date { color: var(--faint); font-size: 10px; }
.suggestion-history-card__title { grid-column: 1; font-size: 12.5px; overflow-wrap: anywhere; }
.suggestion-history-card .badge { grid-column: 2; justify-self: end; white-space: nowrap; }
.suggestion-history__empty { margin: 0; }
.suggestion-history__more { padding: 0 14px 14px; }
.suggestion-detail-backdrop {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  padding: 18px; background: rgba(4,6,9,.78); backdrop-filter: blur(4px);
}
.suggestion-detail-backdrop[hidden] { display: none !important; }
.suggestion-detail {
  width: min(520px, 100%); max-height: min(78vh, 720px); overflow: auto; padding: 22px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.suggestion-detail__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.suggestion-detail__head h2 { margin: 0; font: 700 22px Georgia, serif; }
.suggestion-detail__close { border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.suggestion-detail__body { color: var(--text); font-size: 12.5px; line-height: 1.55; }
.suggestion-detail__row { display: grid; gap: 3px; margin-bottom: 10px; }
.suggestion-detail__row strong { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.suggestion-detail__links { display: grid; gap: 4px; }
.suggestion-detail__links a { color: var(--gold); overflow-wrap: anywhere; }
@media (max-width: 900px) { .suggestions-layout { grid-template-columns: 1fr; } }


.suggestions-layout > .panel { margin-top: 0 !important; }


/* Одинаковые отступы между полями формы предложения */
.suggestion-form [data-suggestion-fields] { display: flex; flex-direction: column; gap: 13px; }
.suggestion-form [data-suggestion-fields][hidden] { display: none !important; }


.suggestion-form > .btn,
.suggestion-form > button[type="submit"] { align-self: flex-start; width: auto; flex: 0 0 auto; }


.suggestion-form > .btn,
.suggestion-form > button[type="submit"] { align-self: center; margin-left: auto; margin-right: auto; }


/* История обращений: цветные метки и однострочные карточки */
.suggestion-tabs {
  display: flex; width: max-content; max-width: calc(100% - 28px);
  margin: 10px auto 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: #0d1117; overflow-x: auto;
}
.suggestion-tabs .ranking-period { flex: 0 0 auto; }
.suggestion-history { gap: 7px; }
.suggestion-history-card {
  --suggestion-color: #b08cff;
  --suggestion-gradient: linear-gradient(145deg, #cbb0ff 0%, #8b5dd1 55%, #52318a 100%);
  display: flex; align-items: stretch; gap: 10px; width: 100%; min-width: 0;
  padding: 0 14px 0 0; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  color: var(--text); text-align: left; font: inherit; cursor: pointer; overflow: hidden;
}
.suggestion-history-card--book {
  --suggestion-color: #58b6ff;
  --suggestion-gradient: linear-gradient(145deg, #9bd8ff 0%, #3b9ee0 55%, #1d6499 100%);
}
.suggestion-history-card--author {
  --suggestion-color: #55c7c7;
  --suggestion-gradient: linear-gradient(145deg, #9ce9e2 0%, #3cb5b2 55%, #176c6b 100%);
}
.suggestion-history-card--publisher {
  --suggestion-color: #f6b73c;
  --suggestion-gradient: linear-gradient(145deg, #ffe29a 0%, #e7ac31 55%, #946108 100%);
}
.suggestion-history-card--idea {
  --suggestion-color: #b08cff;
  --suggestion-gradient: linear-gradient(145deg, #cbb0ff 0%, #8b5dd1 55%, #52318a 100%);
}
.suggestion-history-card:hover { border-color: var(--suggestion-color); }
.suggestion-history-card__stripe {
  flex: 0 0 26px; align-self: stretch; min-height: 48px;
  background: var(--suggestion-gradient);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.28);
}
.suggestion-history-card__kind {
  align-self: center; flex: 0 0 auto; color: var(--suggestion-color);
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.suggestion-history-card__title {
  align-self: center; flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggestion-history-card__status {
  align-self: center; flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-size: 9.5px; white-space: nowrap;
}
.suggestion-history-card.is-closed { opacity: .58; }
.suggestion-history-card.is-closed .suggestion-history-card__stripe { opacity: .38; }
.suggestion-history-card.is-closed:hover { opacity: .8; }
@media (max-width: 620px) { .suggestion-tabs { width: calc(100% - 28px); } }


/* История обращений: таблица и фильтры */
.suggestion-history-head { align-items: center; }
.suggestion-history__count { color: var(--faint); font-size: 13px; font-weight: 400; }
.suggestion-type-filter { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.suggestion-type-filter > span { font-size: 10px; }
.suggestion-type-filter select {
  height: 31px; min-width: 112px; padding: 0 26px 0 9px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 11px;
}
.suggestion-state-switch {
  display: flex; justify-content: center; width: max-content; max-width: calc(100% - 28px);
  margin: 10px auto 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: #0d1117;
}
.suggestion-state-switch .ranking-period { flex: 0 0 auto; }
.suggestion-table {
  margin: 10px 14px 14px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.suggestion-table__head {
  display: grid; grid-template-columns: 26px 130px minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line);
  background: #0d1117; color: var(--text); font-size: 11px; font-weight: 700;
}
.suggestion-table__head span:first-child { width: 26px; }
.suggestion-history { padding: 0; gap: 0; }
.suggestion-history-card {
  display: grid; grid-template-columns: 26px 130px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; width: 100%; min-width: 0;
  padding: 0 14px 0 0; border: 0; border-bottom: 1px solid var(--line-soft);
  border-radius: 0; background: linear-gradient(145deg, var(--surface-2), var(--surface));
}
.suggestion-history-card:last-child { border-bottom: 0; }
.suggestion-history-card__stripe { grid-row: 1; align-self: stretch; min-height: 48px; width: 26px; }
.suggestion-history-card__kind { align-self: center; }
.suggestion-history-card__title { align-self: center; }
.suggestion-history-card__status { align-self: center; }
.suggestion-history-card:hover { background: var(--surface-2); }
.suggestion-history__more { padding: 0 14px 14px; }
@media (max-width: 620px) {
  .suggestion-table__head, .suggestion-history-card { grid-template-columns: 26px 92px minmax(0, 1fr) auto; }
  .suggestion-history-card__kind, .suggestion-table__head span:nth-child(2) { font-size: 9px; }
}


.suggestion-history-card__kind,
.suggestion-history-card__title,
.suggestion-history-card__status { grid-column: auto; }
.suggestion-table__head,
.suggestion-history-card { grid-template-columns: 26px 92px minmax(0, 1fr) auto; }
.suggestion-table__head span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-history-card__kind { overflow: hidden; text-overflow: ellipsis; }


/* История: без лишних рамок и на всю ширину */
.suggestion-type-filter { gap: 0; flex: 0 0 auto; }
.suggestion-type-filter select {
  width: auto; min-width: 0; max-width: 150px; height: 28px;
  padding: 0 24px 0 8px; font-size: 11px;
}
.suggestion-state-switch .ranking-period {
  height: 33px; padding: 0 16px; color: var(--text); font-size: 12.5px; font-weight: 600;
}
.suggestion-table {
  width: 100%; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.suggestion-table__head { border-bottom: 0; padding-right: 14px; }
.suggestion-history-card { border-bottom: 0; }
.suggestion-history__empty { width: 100%; padding: 14px; margin: 0; }


/* Финальные правки истории */
.suggestion-type-filter select {
  width: 142px; min-width: 142px; max-width: 142px; height: 24px;
  padding: 0 24px 0 8px; border: 1px solid var(--line); border-radius: 6px;
  background-color: var(--surface-2); color: var(--text);
  font-family: var(--font-sans), "Segoe UI", Arial, sans-serif; font-size: 11px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aab2c0' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 10px 7px;
}
.suggestion-state-switch .ranking-period {
  height: 33px; padding: 0 15px;
  font-family: var(--font-sans), "Segoe UI", Arial, sans-serif;
  font-size: 12.5px; font-weight: 600;
}
.suggestion-table {
  width: calc(100% + 36px); margin: 10px -18px 0; border-left: 0; border-right: 0;
  border-radius: 0;
}
.suggestion-history__footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 10px 14px 12px; color: var(--faint); font-size: 10.5px;
}
.suggestion-history__footer [data-suggestion-total],
.suggestion-history__footer [data-suggestion-shown] { color: var(--muted); }


.suggestion-state-switch .ranking-period { color: var(--muted) !important; }
.suggestion-state-switch .ranking-period.is-active { color: #211704 !important; }
.suggestion-type-filter select {
  width: 160px !important; min-width: 160px !important; max-width: 160px !important;
  height: 22px !important; min-height: 22px !important;
  padding: 0 22px 0 8px !important; line-height: 20px !important; font-size: 10.5px !important;
}


/* Пиксельная геометрия фильтра типов: 141×36, текст слева, стрелка справа */
.suggestion-type-filter select {
  display: block;
  width: 141px !important;
  min-width: 141px !important;
  max-width: 141px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 30px 0 10px !important;
  line-height: 34px !important;
  font-size: 13px !important;
  border-radius: 7px !important;
  background-position: right 10px center !important;
  background-size: 12px 8px !important;
  box-sizing: border-box !important;
}


/* Таблица истории: границы, центрирование и крупнее шрифт */
.suggestion-table__head,
.suggestion-history-card {
  grid-template-columns: 26px 110px minmax(0, 1fr) 100px;
  column-gap: 0;
}
.suggestion-table__head { font-size: 12px; }
.suggestion-table__head span { min-width: 0; padding: 0 10px; text-align: center; }
.suggestion-table__head span:nth-child(2) { text-align: left; padding-left: 12px; }
.suggestion-table__head span:last-child { padding-right: 10px; }
.suggestion-table__head span + span,
.suggestion-history-card__title,
.suggestion-history-card__status { border-left: 1px solid var(--line); }
.suggestion-history-card__kind {
  font-size: 11px; padding: 0 2px; text-align: center;
}
.suggestion-history-card__title {
  font-size: 13.5px; padding: 0 10px 0 12px;
}
.suggestion-history-card__status {
  font-size: 11px; padding: 0 8px; text-align: center; justify-self: stretch;
  border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0; background: transparent;
}
.suggestion-history-card { min-height: 52px; }
.suggestion-history-card__stripe { min-height: 52px; }
@media (max-width: 620px) {
  .suggestion-table__head, .suggestion-history-card { grid-template-columns: 26px 92px minmax(0,1fr) 86px; }
}


/* Кастомный выпадающий фильтр типов: строго 141 × 36 */
.suggestion-type-filter { position: relative; width: 141px; height: 36px; flex: 0 0 141px; }
.suggestion-type-control {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 141px; height: 36px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface-2); color: var(--text);
  font-family: var(--font-sans), "Segoe UI", Arial, sans-serif; font-size: 13px;
  line-height: 1; text-align: left; cursor: pointer;
}
.suggestion-type-control:hover { border-color: var(--muted); }
.suggestion-type-control svg { flex: 0 0 auto; color: var(--muted); }
.suggestion-type-menu {
  position: absolute; z-index: 120; top: calc(100% + 4px); left: 0;
  width: 141px; padding: 4px; border: 1px solid var(--line); border-radius: 8px;
  background: #141920; box-shadow: 0 14px 34px rgba(0,0,0,.5);
}
.suggestion-type-menu[hidden] { display: none !important; }
.suggestion-type-menu button {
  display: block; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 5px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px;
  text-align: left; white-space: nowrap; cursor: pointer;
}
.suggestion-type-menu button:hover { background: #222b36; color: var(--text); }
.suggestion-type-menu button.is-active { color: var(--gold); background: rgba(246,183,60,.08); }
[data-suggestion-type-filter] { display: none; }


/* Полноразмерные границы и возврат оформления статуса */
.suggestion-table__head { align-items: stretch; }
.suggestion-table__head span {
  position: relative; display: flex; align-items: center; justify-content: center;
  align-self: stretch; min-height: 34px; padding: 0 10px;
}
.suggestion-table__head span:nth-child(2) { justify-content: flex-start; padding-left: 12px; }
.suggestion-table__head span + span { border-left: 0 !important; }
.suggestion-table__head span + span::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.suggestion-history-card { min-height: 48px; align-items: stretch; }
.suggestion-history-card__stripe { min-height: 48px; }
.suggestion-history-card__kind,
.suggestion-history-card__title,
.suggestion-history-card__status {
  position: relative; align-self: stretch; display: flex; align-items: center; border-left: 0 !important;
}
.suggestion-history-card__kind { justify-content: center; padding: 0 8px; font-size: 11px; }
.suggestion-history-card__title { justify-content: flex-start; padding: 0 10px 0 12px; font-size: 13.5px; }
.suggestion-history-card__status { justify-content: center; padding: 0 8px; }
.suggestion-history-card__title::before,
.suggestion-history-card__status::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.suggestion-history-card__badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.025); color: var(--muted);
  font-size: 11px; line-height: 1.2; white-space: nowrap;
}
.suggestion-history-card.is-closed .suggestion-history-card__badge { opacity: .7; }


/* Компактная таблица: высота как на эталоне, без пустой ячейки в шапке */
.suggestion-table__head {
  grid-template-columns: 110px minmax(0, 1fr) 100px;
  padding: 0 0 0 26px; min-height: 36px;
}
.suggestion-table__head span { min-height: 36px; }
.suggestion-history-card { height: 32px; min-height: 32px; }
.suggestion-history-card__stripe { min-height: 32px; }
.suggestion-history-card__kind,
.suggestion-history-card__title,
.suggestion-history-card__status { min-height: 32px; }
.suggestion-history-card__badge { padding: 2px 8px; font-size: 11px; }
@media (max-width: 620px) {
  .suggestion-table__head { grid-template-columns: 92px minmax(0,1fr) 86px; }
  .suggestion-history-card { grid-template-columns: 26px 92px minmax(0,1fr) 86px; }
}


/* Выравнивание шапки по строкам: полоса слева без лишней границы */
.suggestion-table__head {
  grid-template-columns: 26px 110px minmax(0, 1fr) 100px;
  padding-left: 0;
}
.suggestion-table__head .suggestion-table__spacer { width: 26px; min-width: 26px; }
.suggestion-table__head span:nth-child(2)::before { display: none; }


/* Больше места теме обращения, без обрезки */
.suggestion-table__head { grid-template-columns: 26px 92px minmax(0, 1fr) 92px; }
.suggestion-history-card { grid-template-columns: 26px 92px minmax(0, 1fr) 92px; }
.suggestion-history-card__title { font-size: 13px; }
.suggestion-table__head span:nth-child(2)::before { display: none !important; }


/* Точное совпадение колонок шапки и строки */
.suggestion-table__head,
.suggestion-history-card {
  grid-template-columns: 26px 128px minmax(0, 1fr) 117px;
}
.suggestion-table__head {
  height: 32px !important; min-height: 32px !important; padding: 0 !important;
}
.suggestion-table__head span {
  height: 32px; min-height: 32px !important; padding: 0 8px !important;
  justify-content: center !important; text-align: center !important;
}
.suggestion-table__head span:nth-child(2)::before { display: block !important; }
.suggestion-history-card { height: 32px; min-height: 32px; }
.suggestion-history-card__kind {
  justify-content: center !important; position: relative;
}
.suggestion-history-card__kind::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.suggestion-history-card__title { font-size: 12.5px; }
.suggestion-history-card__status { width: 117px; }


/* Граница между цветной меткой и колонкой «Тип» */
.suggestion-table__head span:nth-child(2)::before { display: block !important; }
.suggestion-history-card__status { background: transparent !important; }


/* Убираем остаточный gap строки: колонки шапки и строки совпадают */
.suggestion-table__head,
.suggestion-history-card { gap: 0 !important; column-gap: 0 !important; row-gap: 0 !important; }


/* Финальная таблица истории: одинаковые проценты в шапке и строке */
.suggestion-table__head,
.suggestion-history-card {
  grid-template-columns: 6% 28% 42% 24% !important;
  gap: 0 !important;
  column-gap: 0 !important;
}
.suggestion-table__head {
  height: 30px !important;
  min-height: 30px !important;
}
.suggestion-table__head span {
  height: 30px;
  min-height: 30px !important;
}
.suggestion-history-card {
  height: 32px !important;
  min-height: 32px !important;
}
.suggestion-history-card__stripe { min-height: 32px; }
.suggestion-history-card__kind,
.suggestion-history-card__title,
.suggestion-history-card__status { min-height: 32px; }


/* Убираем фиксированную ширину статуса — она ломала процентные колонки */
.suggestion-history-card__status { width: auto !important; min-width: 0 !important; max-width: none !important; }


.suggestion-history-card { padding: 0 !important; }


/* Цветная метка заполняет всю ячейку по высоте и ширине */
.suggestion-history-card__stripe {
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
}


/* Значки профиля — снаружи аватара, не внутри круга */
.profile-hero__avatar .avatar__tier {
  top: -9px !important;
  right: -9px !important;
  bottom: auto !important;
  left: auto !important;
}
.profile-hero__avatar .avatar__account {
  top: -9px !important;
  right: auto !important;
  left: -9px !important;
  bottom: auto !important;
}


/* Возврат согласованного положения значка крупного аватара */
.profile-hero__avatar .avatar__tier {
  top: -9px !important;
  right: 3px !important;
  left: auto !important;
  bottom: auto !important;
}
.profile-hero__avatar .avatar__account {
  top: -3px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
}


/* Согласованное положение значка крупного аватара */
.profile-hero__avatar .avatar__tier {
  top: -8px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  width: 32px !important;
  height: 32px !important;
}


/* Крупные аватары: без глобального translate, иначе значок уезжает */
.profile-hero__avatar .avatar__tier,
.avatar--xl .avatar__tier {
  top: -8px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
}


/* В миниатюрных аватарах только рамка, без значков */
.friend .avatar__tier,
.friend .avatar__account,
.avatar--sm .avatar__tier,
.avatar--sm .avatar__account {
  display: none !important;
}


.profile-hero__badges [hidden] { display: none !important; }


.privacy-mask-option { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.privacy-mask-option .field__hint { padding-left: 23px; }


/* Единый ритм строк в блоке приватности */
.privacy-checks { gap: 9px; }
.privacy-mask-option { min-height: 38px; justify-content: flex-start; }


.privacy-mask-option { min-height: 44px; }


/* Компактные одинаковые строки маскировки */
.privacy-checks { gap: 7px; }
.privacy-mask-option { min-height: 0; }


/* ---------- страница «Мои друзья» ---------- */
.friends-page-head { align-items: flex-end; }
.friends-tabs {
  display: inline-flex; width: max-content; max-width: 100%; gap: 3px;
  padding: 4px; margin: 22px 0 20px; border: 1px solid var(--line);
  border-radius: 999px; background: #0d1117; overflow-x: auto;
}
.friends-tab {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  height: 34px; padding: 0 16px; border-radius: 999px;
  color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.friends-tab:hover { color: var(--text); }
.friends-tab.is-active { color: #211704; background: var(--accent); font-weight: 700; }
.friends-tab span { font-size: 10.5px; opacity: .68; }
.friends-tab.is-active span { opacity: .75; }
.friends-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
}
.friends-card {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-width: 0; min-height: 184px; padding: 20px 14px 15px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(155deg, var(--surface-2), var(--surface));
  color: var(--text); text-align: center; transition: border-color .15s, transform .15s;
}
a.friends-card:hover { border-color: var(--surface-3); transform: translateY(-1px); }
.friends-card__avatar { display: block; margin-bottom: 12px; }
.friends-card__avatar .avatar { width: 72px; height: 72px; font-size: 22px; border-width: 2px; }
.friends-card__avatar .avatar__tier,
.friends-card__avatar .avatar__account { display: none !important; }
.friends-card__name {
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-serif); font-size: 16px; font-weight: 700; line-height: 1.25;
  color: var(--text);
}
a.friends-card__name:hover { color: var(--accent); }
.friends-card__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  width: 100%; margin-top: auto; padding-top: 14px;
}
.friends-card__actions .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; font-size: 11px; }
.friends-empty { margin: 0; }
@media (max-width: 620px) {
  .friends-tabs { width: 100%; }
  .friends-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .friends-card { min-height: 170px; padding: 16px 10px 12px; }
  .friends-card__avatar .avatar { width: 62px; height: 62px; }
  .friends-tab { padding: 0 12px; font-size: 11.5px; }
}


.friends-card--friend .friends-card__actions { flex-direction: column; }
.friends-card--friend .friends-card__actions .btn { width: 100%; flex: 0 0 auto; }

