/* ============================================================
   Дизайн-система сайта (v3.1). Тёмная тема по умолчанию, светлая — html[data-theme=light]
   ============================================================ */
:root {
  --bg: #0b1118; --bg-2: #0e1621; --panel: #141e2a; --panel-2: #1b2735; --panel-3: #22303f; --border: #223042; --border-2: #2c3d50;
  --accent: #2b8de0; --accent-2: #5fb0ff; --accent-hover: #3d9ae8; --accent-soft: rgba(43,141,224,.14);
  --text: #eef2f6; --text-2: #c7d1dc; --muted: #8b99a8; --muted-2: #65768a;
  --ok: #34d399; --warn: #fbbf24; --danger: #f87171; --hot: #fb923c;
  --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-sm: 0 4px 14px rgba(0,0,0,.25); --glow: 0 0 60px rgba(43,141,224,.22);
  --r: 14px; --r-lg: 20px; --r-sm: 10px;
}
html[data-theme="light"] {
  --bg: #eef2f7; --bg-2: #e6ecf3; --panel: #ffffff; --panel-2: #f3f6fa; --panel-3: #e9eef5; --border: #dbe3ec; --border-2: #c9d4e0;
  --accent: #1f7fd1; --accent-2: #2b8de0; --accent-hover: #186fb9; --accent-soft: rgba(31,127,209,.1);
  --text: #101827; --text-2: #2f3b4a; --muted: #5f6f82; --muted-2: #8392a4;
  --shadow: 0 10px 30px rgba(16,24,39,.08); --shadow-sm: 0 4px 14px rgba(16,24,39,.06); --glow: 0 0 60px rgba(31,127,209,.12);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { height: 100%; } body { margin: 0; min-height: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .2s, color .2s; }
a { color: inherit; text-decoration: none; } a:hover { color: var(--accent-2); }
img, video { max-width: 100%; display: block; } button { font: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.ico { flex-shrink: 0; vertical-align: -3px; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.wrap { max-width: var(--wrap-w, 1180px); margin: 0 auto; padding: 0 20px; } @media (max-width: 640px) { .wrap { padding: 0 14px; } }
.tg-panel { background: var(--panel); border: 1px solid var(--border); } .tg-panel-2 { background: var(--panel-2); } .tg-border { border-color: var(--border); }
.tg-muted { color: var(--muted); } .tg-accent { color: var(--accent-2); } .tg-danger { color: var(--danger); } .tg-bg { background: var(--bg); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); }
.section-title { font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; gap: .55rem; } .section-title .ico { color: var(--accent-2); }
.section-sub { color: var(--muted); font-size: .9rem; margin-top: .2rem; }

/* ---------- Кнопки ---------- */
.tg-btn, .tg-btn-ghost, .btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 42px; padding: 0 1.15rem; border-radius: 12px; font-weight: 600; font-size: .92rem; white-space: nowrap; cursor: pointer; border: 1px solid transparent; transition: background .15s, transform .15s, border-color .15s, box-shadow .15s; }
.tg-btn { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 18px rgba(43,141,224,.3); }
.tg-btn:hover { background: linear-gradient(180deg, var(--accent-2), var(--accent-hover)); transform: translateY(-1px); color: #fff; box-shadow: 0 10px 22px rgba(43,141,224,.38); }
.tg-btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--border); } .tg-btn-ghost:hover { background: var(--panel-3); border-color: var(--border-2); color: var(--text); }
.btn-soft { background: var(--accent-soft); color: var(--accent-2); } .btn-soft:hover { background: rgba(43,141,224,.22); }
.tg-btn-sm { height: 34px; padding: 0 .8rem; font-size: .82rem; border-radius: 10px; } .tg-btn-lg { height: 52px; padding: 0 1.8rem; font-size: 1.05rem; border-radius: 14px; }
.tg-btn-danger { color: var(--danger); border-color: rgba(248,113,113,.3); } .tg-btn-danger:hover { background: rgba(248,113,113,.1); }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--muted); background: var(--panel-2); cursor: pointer; transition: .15s; } .icon-btn:hover { color: var(--text); border-color: var(--border-2); }

/* Кнопки внутри карточек: не вылезают за край */
.card-actions { display: flex; gap: .5rem; width: 100%; }
.card-actions > .tg-btn, .card-actions > .tg-btn-ghost, .card-actions > .btn-soft { flex: 1 1 0; min-width: 0; padding: 0 .6rem; }
.card-actions > .tg-btn-ghost:only-child { flex: 1 1 100%; }

/* ---------- Поля ---------- */
.tg-input, .tg-select { width: 100%; height: 42px; background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 11px; padding: 0 .9rem; outline: none; transition: border-color .15s, box-shadow .15s; font-size: .92rem; }
html[data-theme="light"] .tg-input, html[data-theme="light"] .tg-select { background: #fff; }
.tg-input.w-auto, .tg-select.w-auto { width: auto; }
.tg-input:focus, .tg-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .tg-input::placeholder { color: var(--muted-2); }
textarea.tg-input { height: auto; min-height: 110px; padding: .7rem .9rem; resize: vertical; line-height: 1.5; } textarea.tg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .83rem; }
input[type="file"].tg-input { padding: .45rem .6rem; } input[type="color"].tg-input { padding: .2rem; }
label.lbl { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .3rem; font-weight: 500; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: .75rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; flex-shrink: 0; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 16px rgba(43,141,224,.35); object-fit: cover; }
.header-search { flex: 1; min-width: 0; position: relative; } .header-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-search .tg-input { padding-left: 40px; background: var(--bg-2); } html[data-theme="light"] .header-search .tg-input { background: var(--panel-2); }
.header-tools { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.lang-switch { display: flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang-switch a { padding: .25rem .5rem; border-radius: 7px; font-size: .75rem; font-weight: 700; color: var(--muted); } .lang-switch a.active { background: var(--accent); color: #fff; }
@media (max-width: 760px) { .header-row { height: auto; flex-wrap: wrap; padding: .6rem 0; row-gap: .55rem; } .header-search { order: 3; flex-basis: 100%; } .header-tools { margin-left: auto; } .header-tools .tg-btn span { display: none; } .header-tools .tg-btn { width: 42px; padding: 0; } }

/* Навигация разделов — одинаковая на всех страницах */
.site-nav { border-bottom: 1px solid var(--border); background: var(--panel); }
.nav-row { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; } .nav-row::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem .9rem; font-weight: 600; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s; }
.nav-link .ico { color: var(--muted-2); transition: color .15s; } .nav-link:hover { color: var(--text); } .nav-link:hover .ico { color: var(--accent-2); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent); } .nav-link.active .ico { color: var(--accent-2); }
@media (max-width: 640px) { .nav-link { padding: .75rem .7rem; font-size: .85rem; } }

/* ---------- Hero на главной ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--border); background: radial-gradient(1200px 400px at 10% -20%, rgba(43,141,224,.35), transparent 60%), radial-gradient(800px 300px at 100% 120%, rgba(95,176,255,.18), transparent 60%), var(--panel); padding: 2.2rem; margin: 1.5rem 0; }
.hero h1 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 900; letter-spacing: -.02em; max-width: 720px; }
.hero p { color: var(--text-2); max-width: 640px; margin: .8rem 0 1.4rem; font-size: 1rem; }
.hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.4rem; } .hero-stat b { font-size: 1.35rem; font-weight: 800; display: block; letter-spacing: -.02em; } .hero-stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 640px) { .hero { padding: 1.5rem; } }

/* ---------- Карточки ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; position: relative; }
.card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.cover { position: relative; overflow: hidden; background: var(--panel-2); } .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; } .card:hover .cover img { transform: scale(1.04); }
.cover-3x4 { aspect-ratio: var(--cover-ratio, 3 / 4); } .cover-mh { aspect-ratio: var(--mh-ratio, 2 / 3); } .cover-16x10 { aspect-ratio: 16 / 10; } .cover-1x1 { aspect-ratio: 1; }
.cover-shade { position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(to top, rgba(5,10,16,.92), transparent); pointer-events: none; z-index: 2; }
.cover-title { position: absolute; left: .7rem; right: .7rem; bottom: .65rem; color: #fff; font-weight: 700; font-size: .92rem; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.6); z-index: 3; min-width: 0; overflow-wrap: anywhere; }
.cover-title .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-title small { display: block; font-weight: 500; font-size: .75rem; color: rgba(255,255,255,.75); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 700; padding: .22rem .5rem; border-radius: 7px; background: rgba(5,10,16,.78); color: #fff; backdrop-filter: blur(6px); letter-spacing: .02em; }
.badge-accent { background: var(--accent); } .badge-new { background: var(--ok); color: #052e1f; } .badge-top { background: var(--hot); color: #3b1203; }
.badges-tl { position: absolute; top: .55rem; left: .55rem; display: flex; gap: .3rem; flex-wrap: wrap; z-index: 2; } .badges-tr { position: absolute; top: .55rem; right: .55rem; display: flex; gap: .3rem; z-index: 2; } .badges-br { position: absolute; bottom: .55rem; right: .55rem; z-index: 2; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 500; padding: .22rem .6rem; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; } a.chip:hover { color: var(--accent-2); border-color: var(--accent); }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--panel-2); flex-shrink: 0; border: 2px solid var(--border); }
.avatar-lg { width: 96px; height: 96px; border-width: 3px; } .avatar-xl { width: 128px; height: 128px; border-width: 4px; }
.avatar-fallback { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }
.avatar-fallback.avatar-lg { font-size: 2.2rem; } .avatar-fallback.avatar-xl { font-size: 3rem; }
.grid { display: grid; gap: var(--grid-gap, 1rem); } .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-5, .grid-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid { gap: .7rem; } .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 480px) and (max-width: 760px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--r-lg); }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; } .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font-size: .85rem; align-items: center; } .meta > span, .meta > a { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; } .meta .ico { color: var(--muted-2); }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .82rem; color: var(--muted); margin: 1rem 0; } .crumbs a:hover { color: var(--accent-2); } .crumbs .cur { color: var(--text-2); }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; }

/* Профиль (канал / автор) */
.profile-cover { height: 220px; background: linear-gradient(135deg, var(--panel-3), var(--panel)); position: relative; } .profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { display: flex; gap: 1.25rem; align-items: flex-end; margin-top: -48px; padding: 0 1.5rem; position: relative; z-index: 2; } @media (max-width: 640px) { .profile-head { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 0 1rem; } .profile-cover { height: 150px; } }
.link-btns { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Баннер-воронка */
.reader-banner { position: relative; overflow: hidden; background: radial-gradient(600px 200px at 50% -30%, rgba(43,141,224,.45), transparent 70%), var(--panel); border: 1px solid rgba(43,141,224,.5); border-radius: var(--r-lg); padding: 2.4rem 1.5rem; text-align: center; box-shadow: var(--glow); background-size: cover; background-position: center; }
.reader-banner .bn-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-2); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.reader-banner h2 { font-size: 1.45rem; font-weight: 800; } .reader-banner p { color: var(--text-2); margin: .5rem auto 1.3rem; max-width: 520px; }
.float-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
@media (min-width: 640px) { .float-cta { display: none; } }
.prose { line-height: 1.7; font-size: 1rem; color: var(--text-2); } .prose p { margin: 0 0 1em; } .prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; } .prose img { max-width: 100%; border-radius: 12px; margin: 1em 0; }
.prose h2, .prose h3, .prose h4 { font-weight: 800; margin: 1.4em 0 .5em; color: var(--text); } .prose h2 { font-size: 1.4rem; } .prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; } .prose ul { list-style: disc; } .prose ol { list-style: decimal; } .prose blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); margin: 1em 0; }
.prose pre { background: var(--panel-2); padding: 1em; border-radius: 10px; overflow-x: auto; font-size: .85em; } .prose code { background: var(--panel-2); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95em; } .prose th, .prose td { border: 1px solid var(--border); padding: .45em .65em; } .prose figure { margin: 1em 0; } .prose figcaption { font-size: .85em; color: var(--muted); text-align: center; }
.spoiler { background: var(--panel-3); color: transparent; border-radius: 4px; cursor: pointer; } .spoiler:hover, .spoiler.open { color: inherit; }
.tg-embed { border-radius: var(--r); overflow: hidden; background: var(--panel-2); min-height: 120px; } .tg-embed iframe { width: 100% !important; border: 0; }

/* ---------- Читалка ---------- */
.reader-toolbar { padding: .6rem .75rem .65rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.rt-title { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.3; color: var(--text); padding: 0 .15rem; }
.rt-row { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.rt-select { flex: 1 1 120px; min-width: 0; width: auto; height: 38px; padding: 0 2rem 0 .7rem; font-size: .9rem; }
.rt-btn { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.rt-btn:hover { border-color: var(--accent); color: var(--accent-2); } .rt-btn.rt-tg { background: var(--accent); border-color: transparent; color: #fff; }
.rt-zoom { display: none; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; } .rt-zoom .rt-btn { border: 0; border-radius: 0; width: 34px; }
.rt-zoom-val { height: 38px; min-width: 52px; padding: 0 .3rem; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: .78rem; font-weight: 700; cursor: pointer; }
@media (min-width: 640px) { .rt-zoom { display: inline-flex; } .rt-title { font-size: 1.15rem; } }
.reader-wrap { --gap: 0px; --zoom: 1; border-radius: var(--r); padding: var(--gap) 0; } .reader-wrap[data-gap="small"] { --gap: 8px; } .reader-wrap[data-gap="big"] { --gap: 24px; }
.reader-wrap[data-bg="black"] { background: #000; } .reader-wrap[data-bg="light"] { background: #f3f4f6; } .reader-wrap[data-bg="sepia"] { background: #f1e7d0; } .reader-wrap[data-bg="dark"] { background: var(--bg-2); }
/* Лента */
.reader-scroll { margin: 0 auto; width: 100%; max-width: 880px; overflow-x: auto; } .reader-wrap[data-fit="narrow"] .reader-scroll { max-width: 560px; } .reader-wrap[data-fit="original"] .reader-scroll, .reader-wrap[data-fit="height"] .reader-scroll { max-width: none; }
.reader-scroll img { display: block; margin: 0 auto var(--gap); width: 100%; height: auto; background: var(--panel); min-height: 120px; }
.reader-wrap[data-fit="original"] .reader-scroll img { width: auto; max-width: 100%; } .reader-wrap[data-fit="height"] .reader-scroll img { width: auto; max-width: 100%; max-height: 100vh; }
.reader-wrap.zoomed { border-radius: 0; } .reader-wrap.zoomed .reader-scroll, .reader-wrap.zoomed .reader-paged .stage { overflow-x: auto; overscroll-behavior-x: contain; }
/* По страницам: вся страница видна целиком, масштаб — поверх */
.reader-paged { display: none; user-select: none; touch-action: pan-y pinch-zoom; }
.reader-wrap[data-mode="paged"] .reader-paged { display: block; } .reader-wrap[data-mode="paged"] .reader-scroll { display: none; }
.reader-paged .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; cursor: pointer; overflow-x: auto; }
.reader-paged .stage img { max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; object-fit: contain; display: block; }
.reader-wrap[data-fit="original"] .reader-paged .stage img { max-height: none; } .reader-wrap[data-fit="narrow"] .reader-paged .stage img { max-width: 560px; }
.reader-wrap.zoomed .reader-paged .stage { justify-content: flex-start; align-items: flex-start; } .reader-wrap.zoomed .reader-paged .stage img { margin: 0 auto; }
.paged-nav { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.paged-nav .counter { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; } .paged-nav .tg-btn, .paged-nav .tg-btn-ghost { height: 40px; min-width: 110px; } .paged-nav .dim { opacity: .35; }
@media (max-width: 480px) { .paged-nav .tg-btn, .paged-nav .tg-btn-ghost { min-width: 0; padding: 0 .8rem; } }
.reader-chnav { display: flex; justify-content: space-between; gap: .5rem; padding: .9rem .75rem; } .reader-chnav .tg-btn, .reader-chnav .tg-btn-ghost { height: 40px; }
/* Внутри полного экрана */
.reader-wrap.fs-inner { max-width: 100%; width: 100%; margin: 0; padding: 0; border-radius: 0; background: #000; min-height: 100%; }
.reader-wrap.fs-inner .reader-scroll { max-width: min(100%, 1100px); } .reader-wrap.fs-inner[data-fit="narrow"] .reader-scroll { max-width: 560px; }
.reader-wrap.fs-inner .reader-paged .stage { min-height: calc(100vh - 56px); } .reader-wrap.fs-inner .reader-paged .stage img { max-height: calc(100vh - 56px); }
.reader-wrap.fs-inner .paged-nav { background: rgba(0,0,0,.75); border-top-color: #222; } .reader-wrap.fs-inner .paged-nav .counter { color: #ccc; }
.reader-wrap.fs-inner .reader-chnav { background: #000; }
.reader-progress { position: fixed; left: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; z-index: 60; transition: width .1s; }
.blur-page { position: relative; overflow: hidden; } .blur-page img { filter: blur(14px); transform: scale(1.05); pointer-events: none; }
.blur-page .over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, transparent, var(--bg) 85%); }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(3,8,14,.75); display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); } .modal.open { display: flex; }
.modal > div { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.25rem; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.seg { display: flex; gap: .3rem; flex-wrap: wrap; } .seg label { flex: 1; text-align: center; padding: .5rem .5rem; border-radius: 10px; border: 1px solid var(--border); font-size: .8rem; cursor: pointer; white-space: nowrap; background: var(--panel-2); }
.seg input { display: none; } .seg label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.chapter-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem 1rem; border-top: 1px solid var(--border); transition: background .15s; } .chapter-row:hover { background: var(--panel-2); color: inherit; }
.watermark { position: absolute; right: .6rem; bottom: .6rem; font-size: .72rem; color: rgba(255,255,255,.65); text-shadow: 0 0 4px #000; pointer-events: none; }

/* ---------- Прочее ---------- */
#adult-gate { position: fixed; inset: 0; z-index: 100; background: rgba(3,8,14,.94); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(8px); }
.exit-popup { position: fixed; inset: 0; z-index: 95; background: rgba(3,8,14,.85); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ad-slot { margin: 1rem auto; text-align: center; overflow: hidden; } .ad-slot:empty { display: none; }
.ad-sticky { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 35; background: var(--panel); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; padding: .4rem 2rem .4rem .6rem; max-width: 100%; }
.ad-sticky .close { position: absolute; right: .3rem; top: .2rem; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.ad-popup { position: fixed; inset: 0; z-index: 90; background: rgba(3,8,14,.8); display: flex; align-items: center; justify-content: center; padding: 20px; } .ad-popup > div { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; position: relative; max-width: 640px; width: 100%; }
.edit-fab { position: fixed; right: 1rem; bottom: 5rem; z-index: 45; }
.alert-ok { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); color: var(--ok); } .alert-error { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); color: var(--danger); }
html[data-theme="light"] .alert-ok { color: #047857; } html[data-theme="light"] .alert-error { color: #b91c1c; }
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--panel); margin-top: 3rem; }
.site-footer { margin-top: 2.5rem; background: transparent; }
.site-footer .wrap { padding-top: .9rem; padding-bottom: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .1rem 1rem; font-size: .78rem; } .footer-links a { color: var(--muted); padding: .15rem 0; } .footer-links a:hover { color: var(--text); }
.footer-seo { font-size: .74rem; line-height: 1.45; color: var(--muted-2); margin: .5rem 0 0; max-width: 820px; }
.footer-bottom { margin-top: .5rem; font-size: .72rem; color: var(--muted-2); display: flex; gap: .3rem .9rem; flex-wrap: wrap; align-items: center; } .footer-bottom a { color: inherit; }
.footer-18 { border: 1px solid var(--border); border-radius: 5px; padding: 0 .3rem; font-weight: 700; font-size: .66rem; letter-spacing: .02em; }
@media (max-width: 640px) { .custom-block-footer { text-align: center; } .footer-links { justify-content: center; text-align: center; } .footer-seo { text-align: center; margin-left: auto; margin-right: auto; } .footer-bottom { justify-content: center; text-align: center; } }
.g-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 20; width: 44px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 10px; opacity: .7; } .g-nav:hover { opacity: 1; } .g-nav.l { left: .5rem; } .g-nav.r { right: .5rem; } @media (max-width: 640px) { .g-nav { display: none; } }

/* ---------- Админка ---------- */
.tab-link { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; transition: .15s; } .tab-link:hover { color: var(--text); background: var(--panel-2); } .tab-link.active { color: #fff; background: var(--accent); }
.admin-table { width: 100%; font-size: .875rem; border-collapse: collapse; } .admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: .6rem .75rem; background: var(--panel-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: .55rem .75rem; border-top: 1px solid var(--border); vertical-align: middle; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex-shrink: 0; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; }
.editor-toolbar button { padding: .3rem .6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: .8rem; cursor: pointer; } .editor-toolbar button:hover { border-color: var(--accent); }
.drag-handle { cursor: grab; color: var(--muted); } tr.dragging { opacity: .4; }
.badge-new { } .badge-top { }

/* Произвольные HTML-блоки из админки («Тексты») */
.custom-block { margin: 1rem auto; } .custom-block-top { margin-top: 1.25rem; margin-bottom: 0; } .custom-block-footer { padding: 0 0 1.2rem; margin: 0; } .custom-block p { margin: .4rem 0; }
.import-toast { position: fixed; right: 16px; bottom: 16px; z-index: 90; background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: .6rem .9rem; border-radius: 12px; font-size: .85rem; box-shadow: var(--shadow); }
.pager { display: flex; justify-content: center; align-items: center; gap: .35rem; flex-wrap: wrap; margin: 2rem 0 .5rem; }
.pager .pg { min-width: 40px; height: 40px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: .9rem; }
.pager a.pg:hover { border-color: var(--accent); color: var(--accent-2); } .pager .pg.active { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; border-color: transparent; }
.pager .pg-dots, .pager .pg-off { border-color: transparent; background: none; color: var(--muted-2); } .pager .pg-dots { min-width: 24px; padding: 0; }
.texts-row { display: grid; gap: .5rem; align-items: start; margin-bottom: .25rem; } @media (min-width: 900px) { .texts-row { grid-template-columns: 170px 1fr 1fr; } }
.texts-row > .text-xs { padding-top: .6rem; } .texts-cell { position: relative; } .texts-lang { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); font-size: .68rem; font-weight: 700; color: var(--muted-2); letter-spacing: .04em; pointer-events: none; } .texts-cell textarea + .texts-lang, .texts-cell:has(textarea) .texts-lang { top: 1rem; }

/* ---------- Полноэкранное чтение: остаётся только манга ---------- */
html.reader-fs, html.reader-fs body { background: #000; }
html.reader-fs .site-header, html.reader-fs .site-nav, html.reader-fs .crumbs, html.reader-fs .site-footer, html.reader-fs .ad-slot, html.reader-fs .ad-sticky, html.reader-fs .edit-fab, html.reader-fs .float-cta, html.reader-fs .custom-block, html.reader-fs .reader-progress, html.reader-fs .reader-toolbar { display: none !important; }
html.reader-fs main > .wrap { max-width: 100%; padding: 0; } html.reader-fs main { padding: 0; }
/* Мини-панель: появляется только по тапу на 3 секунды */
.fs-bar { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 70; align-items: center; gap: .3rem; padding: .45rem .6rem; background: linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,0)); color: #fff; opacity: 0; transition: opacity .2s; pointer-events: none; }
html.reader-fs.fs-show .fs-bar { opacity: 1; pointer-events: auto; }
.fs-bar .fs-zoom-val { width: auto; min-width: 56px; padding: 0 .4rem; font-size: .8rem; font-weight: 700; } .fs-bar .fs-ib { width: 40px; height: 40px; text-decoration: none; font: inherit; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer; } .fs-bar .fs-ib:hover { background: rgba(255,255,255,.26); }
.fs-bar .fs-title { font-size: .85rem; font-weight: 600; margin-left: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.6); } .fs-bar .fs-sp { flex: 1; }
html.reader-fs .fs-hint { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 71; background: rgba(0,0,0,.72); color: #fff; font-size: .8rem; padding: .5rem .9rem; border-radius: 999px; pointer-events: none; animation: fsHint 4s forwards; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
@keyframes fsHint { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
#fs-btn { padding: 0 .55rem; } #fs-btn span { display: inline-flex; } #fs-btn .fs-off { display: none; } html.reader-fs #fs-btn .fs-on { display: none; } html.reader-fs #fs-btn .fs-off { display: inline-flex; }
.fs-hint { display: none; } html.reader-fs .fs-hint { display: block; }
.sort-select { width: auto; min-width: 150px; height: 44px; padding: 0 2.2rem 0 .9rem; font-weight: 600; }
@media (max-width: 640px) { .sort-select { min-width: 0; flex: 0 0 46%; } }
.modal.open { z-index: 2147483003; }
@media (max-width: 480px) { .fs-bar .fs-title { display: none; } }

/* ============================================================
   Админка → 🧾 Посты из TG (v3.6)
   ============================================================ */
.tp-hub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tp-hub-head h2 { font-size: 1.25rem; font-weight: 800; }
.tp-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); margin-bottom: 16px; }
.tp-tabs a { padding: .55rem .95rem; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.tp-tabs a:hover { color: var(--text); background: var(--panel-2); } .tp-tabs a.on { color: #fff; background: var(--accent); }
.tp-tabs .sp { flex: 1; }
.tp-chips { display: flex; gap: 6px; flex-wrap: wrap; } .tp-chips a { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--panel); } .tp-chips a.on { color: #fff; background: var(--accent); border-color: var(--accent); } .tp-chips a:hover:not(.on) { color: var(--text); border-color: var(--border-2); }
.tp-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); margin-bottom: 12px; }
.tp-bar .tg-input, .tp-bar .tg-select { height: 36px; font-size: .85rem; border-radius: 9px; } .tp-bar .tg-input { flex: 1 1 180px; min-width: 140px; } .tp-bar .tg-select { width: auto; max-width: 210px; padding-right: 1.8rem; }
.tp-bar .tg-btn, .tp-bar .tg-btn-ghost { height: 36px; }
.tp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tp-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.tp-kpi .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.tp-kpi .v { font-size: 1.7rem; font-weight: 800; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; } .tp-kpi .v small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.tp-kpi .d { font-size: .75rem; color: var(--muted); margin-top: 3px; } .tp-kpi .up { color: var(--ok); font-weight: 700; } .tp-kpi .dn { color: var(--danger); font-weight: 700; }
.tp-kpi.acc { border-color: var(--accent); } .tp-kpi.acc .v { color: var(--accent-2); }
.tp-g2 { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; } @media (min-width: 1100px) { .tp-g2 { grid-template-columns: 1fr 1fr; } .tp-g2.wide-l { grid-template-columns: 3fr 2fr; } }
.tp-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; min-width: 0; }
.tp-card > h3 { font-size: .95rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; } .tp-card > h3 small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.tp-card.flush { padding: 0; overflow: hidden; } .tp-card.flush > h3 { padding: 14px 16px 0; }
/* столбики по дням */
.tp-chart { display: flex; align-items: flex-end; gap: 2px; height: 170px; padding-top: 18px; }
.tp-chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.tp-chart .bars { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.tp-chart .b1 { width: 62%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 0; } .tp-chart .b2 { width: 30%; background: var(--ok); border-radius: 3px 3px 0 0; }
.tp-chart .lb { font-size: 9.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; height: 12px; }
.tp-chart .pub { position: absolute; top: -16px; font-size: 9px; font-weight: 700; color: var(--warn); }
.tp-chart .tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 8px; padding: 5px 8px; font-size: 11px; white-space: nowrap; z-index: 5; box-shadow: var(--shadow-sm); }
.tp-chart .col:hover .tip { display: block; } .tp-chart .col:hover .b1 { filter: brightness(1.2); }
.tp-legend { display: flex; gap: 12px; font-size: .75rem; color: var(--muted); } .tp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
/* горизонтальные полоски */
.tp-hb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; font-size: .85rem; }
.tp-hb .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tp-hb .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; } .tp-hb .n small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.tp-hb .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-bottom: 7px; } .tp-hb .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.tp-hours { display: flex; align-items: flex-end; gap: 2px; height: 70px; } .tp-hours span { flex: 1; background: var(--accent); opacity: .85; border-radius: 2px 2px 0 0; min-height: 1px; }
.tp-hours-l { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 3px; }
.tp-empty { color: var(--muted); font-size: .85rem; padding: 8px 0; }
/* таблица постов */
.tp-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tp-table th { text-align: left; color: var(--muted); font-weight: 600; padding: .55rem .6rem; background: var(--panel-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tp-table td { padding: .55rem .6rem; border-top: 1px solid var(--border); vertical-align: middle; } .tp-table tr:hover td { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.tp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .tp-table .num b { font-size: .95rem; } .tp-table .num small { display: block; color: var(--muted); font-size: .72rem; }
.tp-th { position: relative; width: 52px; height: 52px; flex-shrink: 0; } .tp-th img, .tp-th .ph { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.tp-th .cnt { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 6px; }
.tp-tt { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .tp-tt:hover { color: var(--accent-2); }
.tp-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .74rem; color: var(--muted); margin-top: 3px; }
.tp-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 6px; font-size: .7rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.tp-tag.bl { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 40%, transparent); } .tp-tag.gr { color: var(--ok); } .tp-tag.yl { color: var(--warn); } .tp-tag.rd { color: var(--danger); }
.tp-qs { width: auto; max-width: 260px; height: 24px; padding: 0 20px 0 6px; font-size: .72rem; border-radius: 6px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
.tp-spark { display: flex; align-items: flex-end; gap: 1px; height: 26px; width: 70px; } .tp-spark i { flex: 1; background: var(--accent); opacity: .8; border-radius: 1px; min-height: 1px; }
.tp-acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.tp-ib { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 14px; } .tp-ib:hover { color: var(--text); border-color: var(--accent); } .tp-ib.dg:hover { color: var(--danger); border-color: var(--danger); }
.tp-ctr { font-weight: 700; } .tp-ctr.hi { color: var(--ok); } .tp-ctr.lo { color: var(--muted); }
@media (max-width: 900px) { .tp-table .hide-m { display: none; } }
.tp-bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); font-size: .82rem; background: var(--panel-2); }
.tp-bulk .tg-select { height: 30px; width: auto; font-size: .78rem; border-radius: 8px; padding-right: 1.6rem; }
.tp-pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; } .tp-pager a, .tp-pager span { min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); font-size: .85rem; font-weight: 600; } .tp-pager .on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* формы настроек и предпросмотр */
.tp-split { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1180px) { .tp-split { grid-template-columns: minmax(0, 1fr) 440px; } }
.tp-fs { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.tp-fs > h3 { font-size: 1rem; font-weight: 700; } .tp-fs > p.tp-desc { font-size: .8rem; color: var(--muted); margin: 3px 0 12px; line-height: 1.45; }
.tp-fields { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 640px) { .tp-fields { grid-template-columns: 1fr 1fr; } .tp-fields.c3 { grid-template-columns: 1fr 1fr 1fr; } }
.tp-fields .full { grid-column: 1 / -1; }
.tp-f { min-width: 0; } .tp-f .tp-hint { font-size: .73rem; color: var(--muted-2); margin-top: 4px; line-height: 1.4; }
.tp-f .tg-input, .tp-f .tg-select { height: 38px; font-size: .88rem; }
.tp-col { display: flex; gap: 6px; } .tp-col input[type=color] { width: 44px; height: 38px; padding: 2px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; flex-shrink: 0; }
.tp-chk { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; } .tp-chk:first-child { border-top: 0; }
.tp-chk input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; } .tp-chk b { display: block; font-size: .87rem; font-weight: 600; } .tp-chk small { display: block; font-size: .74rem; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.tp-checks { display: grid; grid-template-columns: 1fr; column-gap: 20px; } @media (min-width: 760px) { .tp-checks.c2 { grid-template-columns: 1fr 1fr; } .tp-checks.c2 .tp-chk:nth-child(2) { border-top: 0; } }
.tp-layouts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tp-lay { position: relative; display: block; border: 2px solid var(--border); border-radius: 14px; padding: 10px; cursor: pointer; background: var(--panel-2); transition: border-color .15s; }
.tp-lay:hover { border-color: var(--border-2); } .tp-lay input { position: absolute; opacity: 0; } .tp-lay:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tp-lay b { display: block; font-size: .85rem; margin-top: 8px; } .tp-lay small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.tp-lay .sch { height: 74px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px; overflow: hidden; }
.tp-lay .sch i { display: block; border-radius: 4px; }
.tp-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; margin: 0 -2px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--border); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.tp-save .tg-btn { flex: 1 1 180px; } .tp-save .note { font-size: .75rem; color: var(--muted); }
.tp-pv { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.tp-pv-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.tp-pv-bar .tg-select { height: 30px; font-size: .75rem; border-radius: 8px; flex: 1 1 120px; width: auto; min-width: 0; padding-right: 1.5rem; }
.tp-pv-bar button, .tp-pv-bar a { height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: .75rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; } .tp-pv-bar button.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.tp-pv-box { position: relative; height: calc(100vh - 110px); min-height: 520px; overflow: hidden; background: #000; }
.tp-pv-box iframe { position: absolute; left: 0; top: 0; border: 0; background: #fff; transform-origin: 0 0; }
.tp-pv-load { position: absolute; right: 10px; top: 10px; z-index: 2; font-size: .7rem; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; display: none; } .tp-pv.loading .tp-pv-load { display: block; }
.tp-clrow { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: .85rem; } .tp-clrow:first-child { border-top: 0; } .tp-clrow .tg-select { height: 34px; font-size: .8rem; }
.tp-acts3 { display: grid; gap: 10px; grid-template-columns: 1fr; } @media (min-width: 900px) { .tp-acts3 { grid-template-columns: 1fr 1fr 1fr; } }
.tp-act-box { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--panel-2); } .tp-act-box h4 { font-size: .8rem; font-weight: 700; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .tp-act-box .tp-f { margin-bottom: 8px; }
.tp-post-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; } .tp-post-head img, .tp-post-head .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--panel-2); flex-shrink: 0; }
.tp-post-head h2 { font-size: 1.1rem; font-weight: 800; line-height: 1.25; }
.tp-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tp-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .tp-mini div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; } .tp-mini b { display: block; font-size: 1.15rem; } .tp-mini small { color: var(--muted); font-size: .72rem; }
.tp-ok { color: var(--ok); font-size: .75rem; margin-left: 4px; }

/* ---------- 🤖 Нейросети ---------- */
.ai-h3 { font-weight: 700; margin: 6px 0 10px; } .ai-h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 6px; }
.ai-prov { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.ai-prov.st-ok { border-left-color: var(--ok); } .ai-prov.st-down, .ai-prov.st-bad { border-left-color: var(--danger); } .ai-prov.st-warn { border-left-color: var(--warn); } .ai-prov.st-new { border-left-color: var(--accent); } .ai-prov.st-off { opacity: .65; }
.ai-prov-h { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; } .ai-prov-t { flex: 1 1 260px; min-width: 0; } .ai-prov-t code { font-size: .78rem; word-break: break-all; }
.ai-prov-a { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ai-num { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--panel-2); border: 1px solid var(--border); }
.ai-prov-s { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 6px 0 0 36px; }
.ai-edit, .ai-add { margin-top: 8px; } .ai-edit > summary, .ai-add > summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--accent-2); }
.ai-edit[open] > summary { margin-bottom: 10px; } .ai-form .tp-fields { margin-top: 4px; }
.ai-model-row { display: flex; gap: 6px; flex-wrap: wrap; } .ai-model-row input { flex: 1 1 220px; min-width: 0; }
.ai-res { border: 1px solid var(--border); background: var(--panel-2); border-radius: 10px; padding: 9px 12px; margin-top: 8px; font-size: .85rem; word-break: break-word; }
.ai-res.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); } .ai-res.bad { border-color: color-mix(in srgb, var(--danger) 50%, transparent); } .ai-res.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.ai-err { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .74rem; color: var(--muted); margin-top: 4px; }
.ai-note { margin-top: 5px; font-size: .8rem; } .ai-tries { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.ai-out-text { margin-top: 6px; padding: 6px 9px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); } .ai-out-text small { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ai-warnbox { margin-bottom: 12px; font-size: .88rem; border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.ai-checklist { display: grid; gap: 8px; } .ai-ck { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; } .ai-ck > span { flex: 0 0 22px; }
.ai-days { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 6px; } .ai-days > div { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; padding-bottom: 14px; }
.ai-days i { display: block; border-radius: 2px 2px 0 0; } .ai-days i.g { background: var(--ok); } .ai-days i.b { background: var(--danger); }
.ai-days span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: .6rem; color: var(--muted); }
.ai-log td { vertical-align: top; } .ai-log details summary { cursor: pointer; }

/* ---------- 🩺 SEO-проверка ---------- */
.seo-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.seo-gauge { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; --c: var(--accent); }
.seo-gauge.gr { --c: var(--ok); } .seo-gauge.yl { --c: var(--warn); } .seo-gauge.rd { --c: var(--danger); }
.seo-gauge .n { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(closest-side, var(--panel) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-2) 0); }
.seo-gauge .n b { font-size: 1.6rem; line-height: 1; } .seo-gauge .n small { font-size: .62rem; color: var(--muted); }
.seo-gauge .k { font-size: .8rem; color: var(--muted); } .seo-gauge .g { font-size: 1.15rem; font-weight: 700; color: var(--c); } .seo-gauge .c { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .76rem; margin-top: 4px; }
.seo-ck { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); } .seo-ck:first-of-type { border-top: 0; }
.seo-ck .i { flex: 0 0 22px; font-size: 1rem; line-height: 1.4; } .seo-ck .b { min-width: 0; flex: 1; }
.seo-ck .t { font-weight: 600; font-size: .9rem; word-break: break-word; } .seo-ck .d { font-size: .82rem; color: var(--muted); margin-top: 2px; word-break: break-word; }
.seo-ck .f { font-size: .82rem; margin-top: 4px; padding: 6px 9px; border-radius: 8px; background: var(--panel-2); } .seo-ck .tg-btn-ghost { display: inline-flex; }
.seo-ck.ok .t { font-weight: 500; } .seo-main { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.seo-oks > summary { cursor: pointer; font-size: .85rem; color: var(--muted); padding: 6px 0; } .seo-oks[open] > summary { margin-bottom: 2px; }
.seo-badge { display: inline-flex; min-width: 40px; justify-content: center; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: .85rem; background: var(--panel-2); border: 1px solid var(--border); }
.seo-badge.gr { color: var(--ok); } .seo-badge.bl { color: var(--accent-2); } .seo-badge.yl { color: var(--warn); } .seo-badge.rd { color: var(--danger); }
.tp-hint { font-size: .75rem; color: var(--muted-2, var(--muted)); line-height: 1.4; } .tp-card > h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; } .tp-card > h3 small { font-weight: 400; color: var(--muted); font-size: .75rem; margin-left: 6px; }
.tp-card > p.tp-desc { font-size: .82rem; color: var(--muted); margin: 3px 0 12px; line-height: 1.45; } .ai-days > div { max-width: 44px; }
.ai-prov-t .tp-tag { white-space: normal; } .ai-prov-s { margin-left: 0; } @media (min-width: 640px) { .ai-prov-s { margin-left: 36px; } }
/* SauceNAO */
.sn-how { font-size: .82rem; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.sn-stat { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); } .sn-stat .bad b { color: var(--danger); }
.sn-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); font-size: .82rem; word-break: break-word; } .sn-row:first-of-type { border-top: 0; }
.sn-row img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; flex: 0 0 54px; background: var(--panel); }

/* ---------- v3.9: процессы, ошибки, пулы ключей, нейросеть в редакторах, вкладки «Мои / Из каналов» ---------- */
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; background: #64748b; }
.st-dot.ok { background: var(--ok, #22c55e); box-shadow: 0 0 6px color-mix(in srgb, var(--ok, #22c55e) 60%, transparent); } .st-dot.warn { background: var(--warn, #eab308); box-shadow: 0 0 6px color-mix(in srgb, var(--warn, #eab308) 60%, transparent); } .st-dot.down { background: var(--danger, #ef4444); box-shadow: 0 0 6px color-mix(in srgb, var(--danger, #ef4444) 60%, transparent); } .st-dot.off { background: #475569; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }
.svc-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.svc-card .st-dot { margin-top: 5px; flex-shrink: 0; } .svc-card .svc-n { font-weight: 600; font-size: .85rem; } .svc-card .svc-t { font-size: .74rem; color: var(--muted); line-height: 1.35; }
.svc-card.down { border-color: color-mix(in srgb, var(--danger, #ef4444) 50%, transparent); } .svc-card.warn { border-color: color-mix(in srgb, var(--warn, #eab308) 50%, transparent); }
.proc-log { font-size: .8rem; max-height: 420px; overflow: auto; } .proc-row { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--border); } .proc-row:first-child { border-top: 0; }
.proc-row .t { color: var(--muted); font-variant-numeric: tabular-nums; } .proc-row .k { font-weight: 600; } .proc-row .r { grid-column: 2; color: var(--muted); word-break: break-word; } .proc-row.bad .k { color: var(--danger, #ef4444); } .proc-row.ok .t { color: var(--ok, #22c55e); } .proc-row.wait .t { color: var(--warn, #eab308); }
.tp-bad { color: var(--danger, #ef4444); font-weight: 700; }
.err-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; } .err-card.unseen { border-left: 3px solid var(--danger, #ef4444); }
.err-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .err-msg { margin-top: 6px; font-size: .9rem; word-break: break-word; } .err-hint { margin-top: 6px; font-size: .8rem; color: var(--muted); background: var(--panel-2); border-radius: 8px; padding: 6px 10px; }
.err-ctx { margin-top: 6px; font-size: .75rem; } .err-ctx summary { cursor: pointer; color: var(--muted); } .err-ctx pre { white-space: pre-wrap; word-break: break-all; background: var(--panel-2); padding: 8px; border-radius: 8px; margin-top: 4px; }
.pool-table td { vertical-align: middle; } .pool-table .tg-input { padding: 6px 8px; font-size: .82rem; }
.ai-tools { font-size: .85rem; } .ai-tools .ai-sep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; } .tg-select-sm { padding: 5px 26px 5px 8px; font-size: .8rem; height: auto; }
.ai-filled { outline: 2px solid var(--ok, #22c55e); transition: outline-color .4s; }
.imgedit-wrap { position: relative; } .imgedit-wrap .imgedit-btn { position: absolute; right: 6px; top: 6px; padding: 2px 6px; font-size: .8rem; opacity: .75; } .imgedit-wrap .imgedit-btn:hover { opacity: 1; } .imgedit-wrap textarea, .imgedit-wrap input { padding-right: 40px; }
.tr-table .tr-txt { font-size: .78rem; color: var(--text); opacity: .85; margin-top: 3px; line-height: 1.4; } .tr-table .tr-en { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.tp-kpi.bad .v { color: var(--danger, #ef4444); }
.tp-log { background: var(--panel-2); border-radius: 12px; padding: 10px; font-size: .75rem; margin-top: 10px; max-height: 240px; overflow: auto; white-space: pre-wrap; }
/* Вкладки «Мои / Из каналов» на главной */
.src-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); margin: 0 0 14px; }
.src-tabs a { padding: 6px 14px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; } .src-tabs a.active { background: var(--accent); color: #fff; } .src-tabs a small { font-weight: 500; opacity: .75; margin-left: 4px; }
.lang-alt { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; margin: 6px 0 0; } .lang-alt:hover { border-color: var(--accent); }

/* ---------- v3.9.1: правовое — примечание под материалом, подвал, кредиты, форма жалоб ---------- */
.legal-note { display: flex; gap: 8px; align-items: flex-start; margin: 22px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); font-size: .78rem; line-height: 1.45; }
.legal-note .ico { flex-shrink: 0; margin-top: 2px; } .legal-note a { color: var(--accent-2); text-decoration: underline; margin-left: 4px; }
.footer-legal { font-size: .74rem; color: var(--muted); line-height: 1.45; margin: 10px 0 0; opacity: .85; } .footer-legal a { color: var(--accent-2); }
.credits { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; font-size: .85rem; color: var(--text-2); } .credits > span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- v3.9.2: лента в стиле Telegram ---------- */
.feed { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.feed-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; } .feed-card.pinned { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.fc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; } .fc-head-min { padding-bottom: 0; justify-content: space-between; }
.fc-ava { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: block; } .fc-ava img { width: 100%; height: 100%; object-fit: cover; display: block; } .fc-ava .avatar-fallback { width: 40px; height: 40px; font-size: 1rem; }
.fc-who { min-width: 0; flex: 1; display: flex; flex-direction: column; } .fc-name { font-weight: 700; font-size: .95rem; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fc-sub { font-size: .74rem; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; } .fc-sub b { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-2); font-weight: 600; }
.fc-edit { color: var(--muted); padding: 6px; border-radius: 8px; } .fc-edit:hover { background: var(--panel-2); color: var(--text); }
.fc-media { display: grid; gap: 2px; background: var(--panel-2); } .fc-media a { position: relative; display: block; overflow: hidden; background: var(--panel-2); } .fc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-media.one a { max-height: 640px; } .fc-media.one img { height: auto; max-height: 640px; object-fit: contain; background: #000; }
.fc-media.two { grid-template-columns: 1fr 1fr; } .fc-media.two a { aspect-ratio: 1; }
.fc-media.three { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .fc-media.three a:first-child { grid-row: 1 / 3; aspect-ratio: auto; } .fc-media.three a { aspect-ratio: 1; }
.fc-media.four { grid-template-columns: 1fr 1fr; } .fc-media.four a { aspect-ratio: 1; }
.fc-more { z-index: 2; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); color: #fff; font-size: 1.6rem; font-weight: 800; }
.fc-video { grid-column: 1 / -1; aspect-ratio: 16 / 9; } .fc-play { z-index: 2; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid #fff; color: #fff; display: flex; align-items: center; justify-content: center; } .fc-play .ico { margin-left: 3px; } .fc-dur { z-index: 2; position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; padding: 2px 7px; border-radius: 6px; }
.fc-file { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--accent-2); font-size: .9rem; }
.fc-text { padding: 12px 14px 4px; position: relative; } .fc-body { font-size: .95rem; line-height: 1.5; word-break: break-word; } .fc-body p { margin: 0 0 .6em; } .fc-body p:last-child { margin-bottom: 0; } .fc-body .tp-hash { color: var(--accent-2); }
.fc-text.clamp .fc-body { display: -webkit-box; -webkit-line-clamp: var(--lines); -webkit-box-orient: vertical; overflow: hidden; } .fc-text.clamp.open .fc-body { display: block; -webkit-line-clamp: unset; }
.fc-expand { background: none; border: 0; color: var(--accent-2); font-size: .85rem; font-weight: 600; padding: 4px 0 0; cursor: pointer; }
.fc-foot { padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 8px; } .fc-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; } .fc-tags a { color: var(--accent-2); }
.fc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .fc-views { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem; margin-right: auto; }
.lb-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; } .lb-ov img { max-width: 96vw; max-height: 92vh; object-fit: contain; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.lb-ov button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; } .lb-ov .lb-x { top: 14px; right: 14px; } .lb-ov .lb-p { left: 10px; top: 50%; transform: translateY(-50%); } .lb-ov .lb-n { right: 10px; top: 50%; transform: translateY(-50%); } .lb-ov .lb-c { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; opacity: .8; }
/* манхва: вертикальная читалка без зазоров, узкая колонка */
.reader-wrap[data-format="manhwa"] .reader-scroll { max-width: var(--manhwa-w, 720px); } .reader-wrap[data-format="manhwa"][data-fit="narrow"] .reader-scroll { max-width: min(var(--manhwa-w, 720px), 560px); }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 6px; } .thumb-grid .tg-item { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--border); }
.thumb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; } .thumb-grid .n { position: absolute; left: 4px; top: 4px; font-size: .65rem; background: rgba(0,0,0,.6); color: #fff; padding: 1px 5px; border-radius: 5px; }
.thumb-grid button { position: absolute; bottom: 3px; border: 0; border-radius: 6px; font-size: .75rem; padding: 2px 5px; cursor: pointer; background: rgba(0,0,0,.65); color: #fff; } .thumb-grid .e { left: 3px; } .thumb-grid .x { right: 3px; } .thumb-grid .x:hover { background: #b91c1c; }


/* ---------- v3.9.3: 🎨 Внешний вид — сетки каталога, стили карточек, шапка ---------- */
.grid-cards { grid-template-columns: repeat(var(--cols-pc, 5), minmax(0, 1fr)); } .grid-mh { grid-template-columns: repeat(var(--mh-pc, 5), minmax(0, 1fr)); } .grid-wide { grid-template-columns: repeat(var(--colsw-pc, 3), minmax(0, 1fr)); } .grid-au { grid-template-columns: repeat(var(--colsa-pc, 4), minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-cards { grid-template-columns: repeat(var(--cols-tab, 3), minmax(0, 1fr)); } .grid-mh { grid-template-columns: repeat(var(--mh-tab, 3), minmax(0, 1fr)); } .grid-wide { grid-template-columns: repeat(var(--colsw-tab, 2), minmax(0, 1fr)); } .grid-au { grid-template-columns: repeat(var(--colsa-tab, 3), minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-cards { grid-template-columns: repeat(var(--cols-ph, 2), minmax(0, 1fr)); } .grid-mh { grid-template-columns: repeat(var(--mh-ph, 2), minmax(0, 1fr)); } .grid-wide { grid-template-columns: repeat(var(--colsw-ph, 1), minmax(0, 1fr)); } .grid-au { grid-template-columns: repeat(var(--colsa-ph, 2), minmax(0, 1fr)); } }
.lk-cards-below .cover-title, .lk-cards-below .cover-shade { display: none; } .card-below { display: none; padding: .55rem .7rem .7rem; font-weight: 700; font-size: .9rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; color: var(--text); } .card-below small { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lk-cards-below .card-below { display: block; } .card-below .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .lk-cards-below .card { display: flex; flex-direction: column; } .lk-cards-below .card .cover { flex: none; } .lk-cards-below a.card:hover .card-below .t { color: var(--accent-2); } .lang-alt-muted { color: var(--muted); }
.lk-cardtitle-big .cover-title, .lk-cardtitle-big .card-below { font-size: 1.02rem; }
/* манхва: своё расположение названия (🎨 Внешний вид → Манхва) */
.lk-mhcards-below .grid-mh .cover-title, .lk-mhcards-below .grid-mh .cover-shade { display: none; } .lk-mhcards-below .grid-mh .card-below { display: block; } .lk-mhcards-below .grid-mh .card { display: flex; flex-direction: column; }
.lk-mhcards-overlay .grid-mh .cover-title { display: block; } .lk-mhcards-overlay .grid-mh .cover-shade { display: block; } .lk-mhcards-overlay .grid-mh .card-below { display: none; }
.lk-nohover .card:hover { transform: none; box-shadow: none; } .lk-nozoom .card:hover .cover img { transform: none; }
.lk-nosticky .site-header { position: static; } .lk-noicons .nav-link .ico { display: none; } .lk-navcenter .nav-row { justify-content: center; }
.lk-nav-pills .nav-row { padding: .4rem 0; gap: .25rem; } .lk-nav-pills .nav-link { border-bottom: 0; border-radius: 999px; padding: .5rem .95rem; } .lk-nav-pills .nav-link.active { background: var(--accent-soft); color: var(--accent-2); }
body.lk-bg-gradient { background: radial-gradient(1100px 500px at 50% -120px, var(--accent-soft), transparent 70%), var(--bg); }
.lk-footer-compact .footer-seo { display: none; } .lk-footer-compact .site-footer .wrap { padding-top: .5rem; }
.scroll-top { position: fixed; right: 16px; bottom: 84px; z-index: 35; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border-2); color: var(--text); display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); } .scroll-top.on { display: flex; } @media (min-width: 761px) { .scroll-top { bottom: 24px; } }

/* ---------- v3.9.3: лента — варианты оформления, плейсхолдеры, разделители дней, «показать ещё» ---------- */
.feed-wrap { padding: 0; } .lk-feedbg .feed-wrap { padding: 12px; } @media (max-width: 640px) { .lk-feedbg .feed-wrap { padding: 8px; margin: 0 -6px; } }
.feed { max-width: var(--feed-w, 680px); } .art-wrap .feed { max-width: var(--art-w, 760px); }
.feed-day { align-self: center; background: color-mix(in srgb, var(--panel-3) 80%, transparent); color: var(--text-2); font-size: .74rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin: 2px 0; backdrop-filter: blur(6px); }
.lk-feedbg .feed-day { background: rgba(0,0,0,.35); color: #fff; }
.fc-media a::before { content: ''; position: absolute; inset: 0; background: var(--panel-2) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%238b99a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/36px no-repeat; }
.fc-media img { position: relative; z-index: 1; color: transparent; font-size: 0; } .fc-media img.broken, .cover img.broken, img.thumb.broken, .avatar.broken { visibility: hidden; } .cover::before { content: ''; position: absolute; inset: 0; background: var(--panel-2) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%238b99a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/32px no-repeat; } .cover img { position: relative; z-index: 1; color: transparent; } .fc-media a:has(img.ok)::before { display: none; } .fc-media a[hidden] { display: none; }
.fc-media.one a { aspect-ratio: var(--ph-ratio, var(--feed-ratio, 4 / 3)); max-height: var(--feed-media-max, 560px); background: #000; } .fc-media.one img { height: 100%; max-height: none; object-fit: var(--feed-media-fit, contain); }
.fc-media.one a.natural { aspect-ratio: auto; max-height: none; } .fc-media.one a.natural img { height: auto; }
.lk-feed-ratio .fc-media.one a { aspect-ratio: var(--feed-ratio, 4 / 3); } .lk-feed-ratio .fc-media.one img { object-fit: cover; }
.lk-feed-sqmedia .feed-card { border-radius: var(--r-sm); }
.lk-feed-compact .fc-head { padding: 8px 12px 6px; } .lk-feed-compact .fc-text { padding: 8px 12px 2px; } .lk-feed-compact .fc-foot { padding: 6px 12px 10px; } .lk-feed-compact .feed { gap: 8px; }
.lk-feed-big .fc-body { font-size: 1.05rem; line-height: 1.55; } .lk-art-big .art-wrap .fc-body { font-size: 1.08rem; line-height: 1.6; }
.lk-ava-square .fc-ava, .lk-ava-square .fc-ava .avatar-fallback { border-radius: 10px; } .lk-name-plain .fc-name { color: var(--text); } .fc-name { color: var(--accent-2); }
.fc-title { font-weight: 700; margin-bottom: .35em; display: block; }
/* стили ленты: bubble — как сообщения в Telegram (без рамки, тень), flat — без карточек, разделители */
.lk-feed-bubble .feed-card, .lk-art-bubble .art-wrap .feed-card { border: 0; box-shadow: var(--shadow-sm); border-radius: var(--r-lg); } .lk-feed-bubble .feed-card.pinned { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-sm); }
.lk-feed-flat .feed-card, .lk-art-flat .art-wrap .feed-card { background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--border); padding-bottom: 6px; } .lk-feed-flat .feed, .lk-art-flat .art-wrap .feed { gap: 4px; } .lk-feed-flat .fc-media, .lk-art-flat .art-wrap .fc-media { border-radius: var(--r-sm); overflow: hidden; }
.lk-fbtn-filled .fc-actions .tg-btn-ghost { background: var(--accent); color: #fff; border-color: var(--accent); } .lk-fbtn-text .fc-actions .tg-btn-ghost, .lk-fbtn-text .fc-actions .tg-btn { background: none; border: 0; padding: 0 4px; color: var(--accent-2); box-shadow: none; } .lk-fbtn-hidden .fc-actions a { display: none; }
.lk-feed-click .feed-card { cursor: pointer; }
.feed-more { display: flex; justify-content: center; margin: 14px 0 6px; } .feed-more a { min-width: 220px; justify-content: center; } .feed-more.loading a { opacity: .6; pointer-events: none; }
.feed-end { text-align: center; color: var(--muted); font-size: .85rem; padding: 10px; }
/* лента сайта: обложка */
.art-wrap .fc-cover-none .fc-media { display: none; }

/* 🎨 Внешний вид — админка: форма слева, предпросмотр справа */
.lk-admin { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; } @media (max-width: 1100px) { .lk-admin { grid-template-columns: 1fr; } .lk-preview { order: -1; } }
.lk-preview { position: sticky; top: 70px; } .lk-frame { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: auto; height: calc(100vh - 150px); min-height: 480px; } .lk-frame iframe { width: 100%; height: 100%; border: 0; display: block; margin: 0 auto; background: var(--bg); transition: width .2s; }

/* ---------- v4.1: карточка материала — обложка не растягивается, описание и теги сворачиваются ---------- */
.item-head { align-items: flex-start; }
.item-head > .cover { align-self: flex-start; flex: none; border-radius: var(--r); }
.item-head > .cover img { transition: none; }
@media (max-width: 639px) { .item-head > .cover { width: min(220px, 62vw); margin: 0 auto; } }
.item-head h1 { overflow-wrap: anywhere; }
.clamp { position: relative; }
.clamp-body { overflow-wrap: anywhere; }
.clamp:not(.open) .clamp-body { display: -webkit-box; -webkit-line-clamp: var(--lines, 4); -webkit-box-orient: vertical; overflow: hidden; }
.clamp:not(.open).has-more .clamp-body { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }
.clamp.has-more .clamp-btn { display: inline-flex; }
.clamp-btn { display: none; align-items: center; gap: .3rem; background: none; border: 0; padding: .35rem 0 0; color: var(--accent-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.clamp-btn::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.clamp.open .clamp-btn::after { transform: translateY(2px) rotate(-135deg); }
.clamp-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.clamp .prose p:last-child { margin-bottom: 0; }
.tags-fold .tags-toggle { cursor: pointer; font: inherit; font-size: .74rem; font-weight: 600; color: var(--accent-2); border-style: dashed; }
.tags-fold .tags-toggle:hover { border-color: var(--accent); }
.tag-extra[hidden] { display: none !important; }
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* окно 18+: если согласие уже дано — не рисуем вовсе (класс ставится до отрисовки страницы, см. layout.php) */
html.adult-ok #adult-gate { display: none !important; }
/* обложки в смешанных сетках (манга + манхва в «Читайте также») — одной высоты */
.cover-mh { aspect-ratio: var(--cover-ratio, 3 / 4); } .grid-mh .cover-mh, .grid-mh .cover-3x4 { aspect-ratio: var(--mh-ratio, 2 / 3); }
.chapter-row > .min-w-0 { overflow: hidden; }
.crumbs .cur { min-width: 0; }
