:root { --bg:#080811; --card:#111124; --card2:#17152b; --accent:#9180ff; --accent-bright:#c3b9ff; --text:#f4f2ff; --muted:#aaa8c3; --line:#302b53; }
* { box-sizing:border-box; }
body { margin:0; background:radial-gradient(circle at 55% -10%,#332b79 0,transparent 31%),radial-gradient(circle at 0 45%,#17134b 0,transparent 38%),var(--bg); color:var(--text); font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; }
button { font:inherit; color:inherit; cursor:pointer; border:0; }
.app-shell { min-height:100vh; max-width:680px; margin:auto; padding:18px 16px 150px; }
.topbar { position:relative; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; margin:3px 0 22px; }
.brand { display:flex; align-items:center; justify-content:center; background:none; padding:0; grid-column:2; }.brand img { width:42px; height:42px; object-fit:contain; filter:brightness(0) invert(1) drop-shadow(0 0 9px rgba(158,143,255,.72)); }
.back { justify-self:start; background:#15142b; border:1px solid var(--line); border-radius:12px; padding:8px 10px; font-size:13px; font-weight:700; }.back:disabled { visibility:hidden; }
.topbar .pill { justify-self:end; }.pill,.tag { color:#cbc4ff; border:1px solid #4b4386; background:#17142f; border-radius:999px; padding:5px 10px; font-size:12px; }
h1 { font-size:31px; margin:0 0 8px; line-height:1.1; } h2 { font-size:22px; margin:25px 0 14px; } p { color:var(--muted); line-height:1.55; }
.hero,.card { border:1px solid var(--line); background:linear-gradient(135deg,rgba(29,25,58,.96),rgba(12,12,27,.96)); box-shadow:0 14px 35px rgba(0,0,0,.25); border-radius:22px; padding:22px; }
.hero { min-height:220px; display:flex; flex-direction:column; justify-content:end; background:radial-gradient(circle at 80% 14%,rgba(149,129,255,.42),transparent 27%),linear-gradient(125deg,#201b51,#111124 70%); }.kicker { color:var(--accent-bright); text-transform:uppercase; letter-spacing:3px; font-size:12px; font-weight:800; }
.primary { background:linear-gradient(135deg,#a99bff,#6855de); box-shadow:0 7px 20px rgba(102,82,218,.32); border-radius:12px; padding:13px 17px; font-weight:800; margin-top:12px; align-self:flex-start; }.outline { border:1px solid #514984; background:rgba(19,17,44,.7); border-radius:12px; padding:11px 14px; font-weight:700; }
.list { display:grid; gap:11px; }.title-card { display:flex; align-items:center; gap:13px; text-align:left; width:100%; padding:12px; border:1px solid transparent; border-radius:16px; background:var(--card2); }.title-card:hover { border-color:#5a4ca3; }.cover { width:51px; height:66px; flex:0 0 auto; overflow:hidden; border-radius:10px; background:linear-gradient(145deg,#9d8dff,#3c3278 55%,#101022); display:grid; place-items:center; font-size:19px; font-weight:900; }.cover img,.detail-cover img { width:100%; height:100%; object-fit:cover; display:block; }.placeholder { color:#ddd8ff; }.title-card strong { display:block; font-size:16px; }.meta { display:block; color:var(--muted); font-size:13px; margin-top:5px; }
.profile-card { margin-bottom:16px; }.profile-card h2 { margin:8px 0; }.profile-favorites { display:grid; gap:10px; }.favorite-row { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid var(--line); border-radius:17px; background:var(--card2); }.favorite-open { min-width:0; flex:1; display:flex; align-items:center; gap:12px; text-align:left; background:transparent; padding:0; }.favorite-open .cover { width:46px; height:60px; }.favorite-open strong,.favorite-open small { display:block; }.favorite-open strong { font-size:15px; }.favorite-open small { margin-top:4px; color:var(--muted); font-size:12px; }.favorite-remove { flex:0 0 auto; padding:8px 10px; color:#e5dcff; border:1px solid #514984; border-radius:10px; background:#17142f; font-size:12px; font-weight:700; }.empty-favorites { padding:28px 20px; text-align:center; border:1px dashed #514984; border-radius:20px; background:rgba(25,22,52,.52); }.empty-favorites span { display:block; color:var(--accent-bright); font-size:34px; }.empty-favorites h2 { margin:8px 0; font-size:20px; }.empty-favorites .outline { margin-top:8px; }
.updates { display:grid; gap:12px; }.update-card { display:flex; align-items:flex-start; gap:13px; width:100%; padding:13px; text-align:left; border:1px solid var(--line); border-radius:18px; background:linear-gradient(135deg,#191630,#111124); }.update-card:hover { border-color:#5a4ca3; }.update-cover { flex:0 0 62px; width:62px; padding:0; background:transparent; border-radius:11px; }.update-cover .cover { width:62px; min-width:62px; max-width:62px; height:82px; min-height:82px; max-height:82px; aspect-ratio:auto; }.update-cover .cover img { width:100%; height:100%; object-fit:cover; }.update-cover:hover .cover { outline:2px solid var(--accent-bright); }.update-content { flex:1; min-width:0; }.update-title { display:block; padding:0; margin:1px 0 8px; text-align:left; background:transparent; font-weight:800; font-size:17px; }.update-row { display:flex; width:100%; align-items:center; justify-content:space-between; gap:8px; padding:4px 3px; border-radius:7px; text-align:left; background:transparent; font-size:14px; }.update-row:hover { background:rgba(139,122,255,.13); }.update-row b { color:#e6e3ff; }.update-row:first-of-type b::after { content:'  ✦'; color:var(--accent-bright); font-size:11px; }.update-row small { color:var(--muted); white-space:nowrap; font-size:12px; }
.catalog-head { display:flex; gap:10px; justify-content:space-between; align-items:center; }.search { background:#111124; border:1px solid var(--line); color:var(--text); border-radius:12px; padding:11px; width:58%; font-size:16px; }
.support-card { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; padding:18px; border:1px solid #4a417b; border-radius:20px; background:linear-gradient(135deg,#1d183e,#111124); box-shadow:0 12px 30px rgba(0,0,0,.28); }.support-card h2 { margin:7px 0 5px; font-size:19px; }.support-card p { margin:0 0 9px; font-size:13px; }.support-card .primary { flex:0 0 auto; margin:0; }.support-card a.primary { display:inline-flex; align-items:center; justify-content:center; color:var(--text); text-decoration:none; line-height:1.2; }.support-progress { width:100%; height:7px; overflow:hidden; border:1px solid #403868; border-radius:99px; background:#0d0c1d; }.support-progress i { display:block; width:4%; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7663ed,#b9adff); }.support-options { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:9px 0 18px; }.support-options button { display:flex; flex-direction:column; gap:4px; min-width:0; padding:11px 8px; text-align:left; border:1px solid var(--line); border-radius:13px; background:#15132c; }.support-options b { font-size:13px; }.support-options span { color:var(--muted); font-size:10px; }.home-search { display:flex; align-items:center; gap:9px; margin:18px 0 8px; padding:0 14px; border:1px solid #463e75; border-radius:17px; background:#111024; }.home-search span { color:var(--muted); font-size:24px; }.home-search input { width:100%; padding:14px 0; color:var(--text); border:0; outline:0; background:transparent; font:inherit; }.layout-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }.layout-heading h2 { margin:18px 0 12px; }.layout-switch { display:flex; gap:5px; padding:4px; border:1px solid var(--line); border-radius:13px; background:#111024; }.layout-switch button { width:38px; height:34px; border-radius:9px; color:var(--muted); background:transparent; font-size:20px; }.layout-switch .active-layout { color:#f2efff; background:#5b4cb2; }.title-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:14px 10px; }.title-grid-card { min-width:0; padding:0; text-align:left; background:transparent; }.title-grid-card .cover { display:block; width:100%; min-width:100%; max-width:100%; height:auto; aspect-ratio:3 / 4; overflow:hidden; border-radius:13px; }.title-grid-card .cover img { width:100%; height:100%; object-fit:cover; }.title-grid-card strong { display:-webkit-box; overflow:hidden; margin:8px 2px 4px; font-size:13px; line-height:1.25; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.title-grid-card > span:last-child { margin-left:2px; color:#a99cff; font-size:11px; }.title-grid-card:hover .cover { outline:2px solid #8877ec; }
.support-project-card{position:relative;align-items:center;overflow:hidden;padding:15px;background:radial-gradient(circle at 100% 0,rgba(132,105,255,.28),transparent 42%),linear-gradient(135deg,#211a4b,#111124)}.support-project-cover{width:62px;height:82px;flex:0 0 62px;overflow:hidden;border:1px solid #7665b8;border-radius:13px;background:linear-gradient(135deg,#9889ff,#312563);box-shadow:0 10px 22px rgba(0,0,0,.35)}.support-project-cover img{display:block;width:100%;height:100%;object-fit:cover}.support-project-cover span{display:grid;width:100%;height:100%;place-items:center;color:#f3efff;font-weight:900}.support-project-content{min-width:0;flex:1}.support-project-content h2{display:-webkit-box;overflow:hidden;margin:5px 0 6px;font-size:17px;line-height:1.2;-webkit-box-orient:vertical;-webkit-line-clamp:2}.support-project-content p{margin:0 0 8px;font-size:12px}.support-project-content small{display:block;margin-top:8px;color:#bfb7dc;font-size:11px;font-weight:700}.support-project-card .primary{align-self:center;padding:11px 12px;font-size:12px}
.banner-carousel { position:relative; overflow:hidden; margin:0 -16px 22px; padding:4px 0 24px; }.carousel-stage { position:relative; aspect-ratio:16 / 9; }.banner-slide { position:absolute; inset:0 auto 0 6%; width:88%; overflow:hidden; padding:0; border:1px solid #49417a; border-radius:18px; background:#111124; box-shadow:0 12px 28px rgba(0,0,0,.4); opacity:.45; transition:transform .48s cubic-bezier(.22,.7,.25,1),opacity .48s ease,border-color .48s ease; }.banner-slide.active-slide { z-index:3; opacity:1; transform:translateX(0) scale(1); border-color:#7063bd; }.banner-slide.prev-slide { z-index:1; transform:translateX(-92%) scale(.9); }.banner-slide.next-slide { z-index:2; transform:translateX(92%) scale(.9); }.banner-slide img { width:100%; height:100%; display:block; object-fit:cover; object-position:center; }.banner-slide::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,transparent 58%,rgba(5,5,12,.3)); }.carousel-dots { position:absolute; z-index:5; display:flex; gap:6px; left:50%; bottom:7px; transform:translateX(-50%); }.carousel-dots button { width:7px; height:7px; padding:0; border-radius:99px; background:rgba(238,235,255,.5); transition:.2s; }.carousel-dots .active-dot { width:22px; background:#c1b7ff; }
.detail-cover { height:300px; max-width:225px; overflow:hidden; border-radius:20px; background:linear-gradient(135deg,#9786ff,#312569 55%,#101022); box-shadow:0 12px 35px rgba(87,65,203,.28); display:grid; place-items:center; font-size:54px; font-weight:900; margin:15px auto; }.chapter-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }.chapter-heading h2 { margin:25px 0 14px; }.sort-chapters { background:#16142d; color:#cbc4ff; border:1px solid #49417a; border-radius:12px; padding:9px 11px; white-space:nowrap; font-size:13px; font-weight:700; }.chapters button { width:100%; text-align:left; color:var(--text); background:var(--card); border:1px solid var(--line); padding:15px; border-radius:13px; margin-bottom:8px; }.chapter-line { display:flex; align-items:center; justify-content:space-between; gap:10px; }.chapter-line b { font-size:16px; }.chapter-views { color:var(--muted); border:1px solid #403860; border-radius:999px; padding:5px 9px; white-space:nowrap; font-size:13px; }.reader-head { padding:20px 0 8px; }.reader-head h2 { margin:8px 0; }.comic-pages { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:#0b0a0a; margin:12px 0 18px; }.comic-pages img { display:block; width:100%; height:auto; margin:0; }
.reader-chapter-nav { position:sticky; top:calc(var(--bb-content-top, 0px) + 8px); z-index:40; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; margin:0 0 14px; padding:8px; border:1px solid #49417a; border-radius:15px; background:rgba(17,16,36,.96); box-shadow:0 10px 24px rgba(0,0,0,.3); backdrop-filter:blur(12px); }.reader-chapter-nav .outline { min-width:0; padding:9px 12px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.reader-chapter-nav > span { min-width:76px; color:#dcd6ff; font-size:12px; font-weight:800; text-align:center; white-space:nowrap; }.reader-chapter-nav button:last-child { text-align:right; }.reader-chapter-nav button:disabled { opacity:.42; cursor:default; }

/* Читалка занимает всю ширину, а закреплённая панель всегда остаётся ниже кнопок Telegram. */
body.reader-mode .app-shell { max-width:none; padding-right:0; padding-bottom:calc(98px + env(safe-area-inset-bottom)); padding-left:0; }
body.reader-mode .topbar { display:none; }
body.reader-mode .nav { display:none; }
body.reader-mode::after { position:fixed; z-index:49; right:0; bottom:0; left:0; height:28px; content:""; background:#101023; pointer-events:none; }
body.reader-mode .reader-chapter-nav { position:fixed; z-index:50; right:12px; bottom:max(10px, calc(env(safe-area-inset-bottom) + 8px)); left:12px; top:auto; width:auto; grid-template-columns:42px auto minmax(0,1fr) auto; gap:12px; margin:0; padding:9px; border:1px solid #514984; border-radius:18px; background:rgba(16,15,35,.98); box-shadow:0 10px 28px rgba(0,0,0,.42); }
body.reader-mode .reader-chapter-nav .outline { height:40px; padding:8px 12px; border-color:#534a86; background:#171532; }
body.reader-mode .reader-chapter-nav .reader-return { width:42px; padding:8px 0; font-size:22px; line-height:1; }
body.reader-mode .reader-chapter-nav > span { min-width:66px; text-align:center; }
body.reader-mode .comic-pages { width:100%; margin:12px 0 18px; border:0; border-radius:0; background:#fff; }
body.reader-mode .comic-pages img { width:100%; max-width:none; content-visibility:auto; contain-intrinsic-size:900px 1400px; }
body.reader-mode.reader-clean .reader-chapter-nav { opacity:0; pointer-events:none; transform:translateY(18px); }
body.reader-mode.reader-clean::after { display:none; }
body.reader-mode.reader-edge-navigation .reader-chapter-nav { display:none; }
body.reader-mode.reader-edge-navigation .app-shell { padding-bottom:18px; }
.reader-edge-return{display:none}body.reader-mode.reader-edge-navigation .reader-edge-return{position:fixed;z-index:50;bottom:max(14px,calc(env(safe-area-inset-bottom) + 10px));left:14px;display:block;padding:11px 16px;border:1px solid #514984;border-radius:14px;background:rgba(16,15,35,.98);box-shadow:0 10px 28px rgba(0,0,0,.42);color:#f3f0ff;font-size:14px;font-weight:800}
body.reader-mode.reader-clean .app-shell { padding-bottom:0; }
@media (max-width:430px) { body.reader-mode .app-shell { padding-right:0; padding-left:0; } body.reader-mode .reader-chapter-nav { padding-right:9px; padding-left:9px; } }

/* iOS не увеличивает страницу при фокусе, если размер текста поля не меньше 16px. */
.chapter-tools input { font-size:16px; }
.chapter-tools input[data-chapter-search] { width:auto; flex:1; }
.support-contact { display:flex; width:100%; align-items:center; justify-content:center; margin:24px 0 0; color:#fff; text-decoration:none; }
.chapters .chapter-line.read-chapter{color:var(--text);border-color:var(--line);background:var(--card);opacity:1}
.chapters .chapter-line{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;padding:6px 7px 6px 15px;border:1px solid var(--line);border-radius:13px;margin-bottom:8px;background:var(--card);transition:border-color .16s ease,background .16s ease}.chapters .chapter-open{min-width:0;flex:1;margin:0;padding:8px 0;border:0;border-radius:0;background:transparent;color:inherit;text-align:left}.chapters .chapter-open b{font-size:16px}.chapters .chapter-read-toggle{width:auto;min-width:102px;margin:0;padding:6px 8px;border:1px solid #4e466f;border-radius:999px;background:#18152f;color:#bcb5d6;font-size:11px;font-weight:800;text-align:center;white-space:nowrap}.chapters .chapter-read-toggle.is-read{border-color:#347d68;background:#17352e;color:#72dfa0}.chapters .chapter-read-toggle:disabled{opacity:.6}.chapters .chapter-line.read-chapter .chapter-read-toggle{opacity:1}.chapters .chapter-line.read-chapter .chapter-open{color:inherit}@media(max-width:390px){.chapters .chapter-read-toggle{min-width:94px;padding-right:7px;padding-left:7px;font-size:10px}}
.project-stats { display:flex; flex-wrap:wrap; gap:10px 14px; color:var(--muted); font-size:13px; margin:5px 0 18px; }.project-tabs { display:grid; grid-template-columns:1fr 1fr; padding:5px; border:1px solid var(--line); border-radius:15px; background:#111024; }.project-tabs button { padding:10px; border-radius:11px; background:transparent; color:var(--muted); font-weight:700; }.project-tabs .active-tab { color:#f0edff; background:linear-gradient(135deg,#806cf2,#5543bb); }.project-description { margin:18px 0 12px; color:#c8c3d8; font-size:16px; line-height:1.55; }.project-description p { margin:0; }.description-toggle { display:inline-flex; margin:5px 0 0; padding:0; color:#a98dff; background:transparent; font-size:15px; font-weight:800; text-align:left; }.project-status { display:grid; gap:8px; margin:12px 0; color:var(--muted); font-size:14px; }.project-status span { display:flex; justify-content:space-between; gap:12px; }.project-status b.active { color:#72dfa0; }.project-status b.break { color:#ffd566; }.project-status b.abandoned { color:#ff7b8c; }.read-first { display:grid; grid-template-columns:auto 1fr; column-gap:12px; align-items:center; width:100%; margin:16px 0 4px; padding:15px; text-align:left; border:1px solid #5b4ca4; border-radius:16px; background:linear-gradient(135deg,#211a48,#15132c); }.read-first span { grid-row:1 / 3; display:grid; width:42px; height:42px; place-items:center; border-radius:12px; background:linear-gradient(135deg,#ad9fff,#6651dc); font-size:18px; }.read-first b { color:#ddd8ff; }.read-first small { color:var(--muted); margin-top:3px; }.chapter-tools { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 10px; }.chapter-tools input { min-width:0; width:52%; padding:10px; color:var(--text); border:1px solid var(--line); border-radius:11px; background:#121126; }.chapter-tools span { color:var(--muted); white-space:nowrap; font-size:13px; }
.alternative-titles { display:flex; flex-wrap:wrap; gap:4px 8px; margin:-1px 0 10px; color:var(--muted); font-size:13px; }.alternative-titles span:not(:last-child)::after { content:' /'; color:#66617e; margin-left:8px; }
.title-page { position:relative; isolation:isolate; }.title-page::before { position:absolute; z-index:-1; content:""; inset:-28px -24px 18px; background-image:linear-gradient(180deg,rgba(8,8,17,.16),var(--bg) 52%),var(--cover-bg); background-repeat:no-repeat; background-size:cover; background-position:center top; filter:blur(28px) saturate(1.25); opacity:.5; pointer-events:none; }
.title-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px; }.title-actions .outline { padding:9px 11px; font-size:13px; }.title-actions .selected-action { color:#f0edff; border-color:#9789f5; background:rgba(113,91,220,.25); }
.title-interest{position:relative;display:flex;align-items:center;width:100%;gap:12px;overflow:hidden;margin:16px 0;padding:14px;border:1px solid #5b4d95;border-radius:17px;background:linear-gradient(135deg,rgba(56,42,110,.92),rgba(16,14,35,.98));box-shadow:0 12px 28px rgba(0,0,0,.2);text-align:left}.title-interest:before{content:"";position:absolute;inset:auto -25px -45px auto;width:120px;height:120px;border-radius:50%;background:var(--interest-glow,rgba(137,105,255,.2));filter:blur(24px)}.title-interest>*{position:relative}.title-interest:active{transform:scale(.985);border-color:#a99bff}.title-interest-dot{width:15px;height:15px;flex:0 0 15px;border-radius:50%;background:var(--interest-color,#858199);box-shadow:0 0 18px var(--interest-color,#858199)}.title-interest-copy{min-width:0;flex:1}.title-interest .kicker{display:block;margin-bottom:3px;font-size:9px}.title-interest strong{display:block;color:#f3efff;font-size:14px}.title-interest small{display:block;margin-top:3px;color:#b7afcf;font-size:11px}.title-interest-open{display:inline-flex;flex:0 0 auto;align-items:center;gap:5px;margin-left:auto;padding:6px 8px;border:1px solid rgba(179,161,255,.35);border-radius:999px;background:rgba(12,10,27,.32);color:#e5dfff;font-size:10px;font-weight:800;line-height:1;white-space:nowrap}.title-interest-open b{color:var(--interest-color,#858199);font-size:15px;line-height:1}.title-interest-emerald{--interest-color:#42dc78;--interest-glow:rgba(66,220,120,.23)}.title-interest-violet{--interest-color:#b45aff;--interest-glow:rgba(180,90,255,.24)}.title-interest-blue{--interest-color:#4e83ff;--interest-glow:rgba(78,131,255,.22)}.title-interest-gold{--interest-color:#ffd45c;--interest-glow:rgba(255,212,92,.2)}.title-interest-orange{--interest-color:#ff9a34;--interest-glow:rgba(255,154,52,.2)}.title-interest-red{--interest-color:#ff5e68;--interest-glow:rgba(255,94,104,.18)}.title-interest-muted{--interest-color:#857ca6;--interest-glow:rgba(133,124,166,.15)}@media(max-width:390px){.title-interest{gap:9px;padding:12px}.title-interest-open{padding:6px}.title-interest-open span{display:none}}
.interest-guide-overlay{position:fixed;z-index:120;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:20px 16px max(28px,calc(env(safe-area-inset-bottom) + 14px));background:rgba(5,4,15,.78);backdrop-filter:blur(8px)}.interest-guide-card{position:relative;width:min(100%,500px);overflow:hidden;padding:24px 19px 18px;border:1px solid #6e5cc0;border-radius:25px;background:radial-gradient(circle at 100% 0,rgba(142,116,255,.34),transparent 36%),linear-gradient(145deg,#27204d,#0d0c1e 68%);box-shadow:0 25px 70px rgba(0,0,0,.62)}.interest-guide-card:before{position:absolute;inset:0;content:"";pointer-events:none;opacity:.27;background-image:linear-gradient(rgba(207,195,255,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(207,195,255,.13) 1px,transparent 1px);background-size:17px 17px;mask-image:linear-gradient(180deg,black,transparent 70%)}.interest-guide-card>*{position:relative}.interest-guide-card .kicker{font-size:9px}.interest-guide-card h2{margin:8px 0 5px;font-size:25px}.interest-guide-card p{margin:0 0 17px;font-size:13px;line-height:1.45}.interest-guide-close{position:absolute;top:12px;right:12px;z-index:1;display:grid;width:34px;height:34px;place-items:center;border:1px solid #62579d;border-radius:12px;background:#17142f;color:#f1edff;font-size:24px;line-height:1}.interest-guide-scale{display:grid;gap:7px}.interest-guide-row{display:grid;grid-template-columns:13px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 11px;border:1px solid rgba(121,107,188,.4);border-radius:13px;background:rgba(10,9,24,.48)}.interest-guide-row i{width:11px;height:11px;border-radius:50%;background:var(--guide-color);box-shadow:0 0 13px var(--guide-color)}.interest-guide-row b{font-size:13px}.interest-guide-row span{color:#bdb5dc;font-size:10px;text-align:right}.interest-guide-row.emerald{--guide-color:#42dc78}.interest-guide-row.violet{--guide-color:#b45aff}.interest-guide-row.blue{--guide-color:#4e83ff}.interest-guide-row.gold{--guide-color:#ffd45c}.interest-guide-row.orange{--guide-color:#ff9a34}.interest-guide-row.red{--guide-color:#ff5e68}.interest-guide-note{display:block;margin-top:13px;color:#a9a0c8;text-align:center;font-size:11px}

/* Единый ритм интерфейса: небольшие отступы внутри блока, заметные — между блоками. */
:root{--space-xs:8px;--space-sm:12px;--space-md:18px;--space-lg:26px;--space-xl:34px}
#view>section+section{margin-top:var(--space-lg)}
.catalog-head{margin-bottom:var(--space-sm)}
.title-page .project-stats{margin:var(--space-md) 0}
.title-page .project-tabs{margin:var(--space-md) 0}
.title-page .project-description{margin:var(--space-md) 0}
.title-page .project-status{margin:var(--space-md) 0}
.title-page .title-actions{gap:var(--space-sm);margin:var(--space-md) 0}
.title-page .read-first{margin:var(--space-lg) 0 var(--space-md)}
.title-page .chapter-tools{margin:var(--space-lg) 0 var(--space-sm)}
.profile-section{margin:var(--space-xl) 0}.profile-section>h2{margin-bottom:var(--space-md)}
.schedule-page h1,.title-order-page h1{margin:0 0 var(--space-sm)}
.schedule-card,.schedule-empty{margin-top:var(--space-lg)}
.title-order-info{margin:var(--space-lg) 0 var(--space-xl)}
.feedback-choice{margin:var(--space-lg) 0}.feedback-form .field{margin-bottom:var(--space-md)}
.card>h2:first-child,.card>h3:first-child{margin-top:0}
@media(max-width:430px){.app-shell{padding-left:18px;padding-right:18px}.profile-section{margin:28px 0}.title-page .read-first{margin-top:22px}}

/* Главная: отдельный, спокойный ритм для сбора и ленты обновлений. */
.support-card{margin:12px 0 30px;padding:22px;gap:22px}
.support-card h2{margin:9px 0 8px;line-height:1.3}
.support-card p{margin:0 0 13px}
.layout-heading{margin:0 0 16px}.layout-heading h2{margin:0}
.updates{gap:16px}.update-card{padding:16px;gap:15px}
.update-title{margin:2px 0 12px;line-height:1.25}.update-row{padding:5px 3px}
@media(max-width:430px){.support-card{margin:8px 0 26px;padding:18px}.update-card{padding:14px;gap:13px}.updates{gap:14px}}
.empty-catalog{padding:32px 22px;text-align:center;border:1px dashed #514984;border-radius:20px;background:rgba(25,22,52,.52)}.empty-catalog>span{display:block;color:var(--accent-bright);font-size:30px}.empty-catalog h2{margin:10px 0 7px;font-size:20px}.empty-catalog p{margin:0;color:var(--muted);line-height:1.5}
.payment { margin:13px 0; }.payment h2 { margin:5px 0; }.payment .primary { width:100%; }.price { color:#d2ccff; font-size:25px; font-weight:900; }
.nav { position:fixed; z-index:30; bottom:max(10px,calc(env(safe-area-inset-bottom) + 8px)); left:50%; transform:translateX(-50%); width:min(648px,calc(100% - 32px)); display:grid; grid-template-columns:repeat(4,1fr); gap:4px; padding:8px; border:1px solid #373162; border-radius:25px; background:rgba(15,14,34,.94); backdrop-filter:blur(12px); box-shadow:0 10px 30px rgba(0,0,0,.32); }.nav button { background:transparent; padding:7px 3px; border-radius:15px; color:var(--muted); font-size:17px; }.nav button:not(.nav-logo) { min-height:58px; padding:8px 3px; font-size:20px; }.nav button.active { color:#e0dcff; background:linear-gradient(135deg,#6254bb,#3e347d); }.nav small { display:block; margin-top:2px; font-size:9px; }.nav button:not(.nav-logo) small { margin-top:3px; font-size:11px; }
@media (min-width:700px){.app-shell{padding-top:34px}.hero{min-height:270px}}
@media (max-width:430px){.support-card{align-items:stretch;flex-direction:column}.support-card .primary{width:100%}.support-options{grid-template-columns:1fr}.title-grid{gap:13px 8px}}
@media (max-width:430px){.support-project-card{display:grid;grid-template-columns:62px minmax(0,1fr);align-items:center}.support-project-card .primary{grid-column:1/-1;width:100%;margin-top:2px}.support-project-content h2{-webkit-line-clamp:2}}

.vk-access-card { margin-top:18px; padding:20px; border:1px solid #4b4480; border-radius:22px; background:radial-gradient(circle at 100% 0,rgba(78,118,255,.2),transparent 42%),linear-gradient(145deg,#1d193b,#111024); box-shadow:0 20px 45px rgba(0,0,0,.28); }
.vk-access-head { display:flex; align-items:center; gap:13px; }
.vk-access-head h2 { margin:3px 0 0; }
.vk-mark { display:grid; width:48px; height:48px; place-items:center; border-radius:15px; background:#2787f5; color:white; font-size:18px; font-weight:800; box-shadow:0 8px 24px rgba(39,135,245,.3); }
.vk-access-points { display:grid; gap:8px; margin:16px 0; padding:0; list-style:none; color:#c9c3e8; }
.vk-access-points li::before { margin-right:8px; color:#8e7cff; content:'✓'; font-weight:800; }
.vk-status { display:flex; align-items:center; gap:9px; margin:15px 0; padding:12px 14px; border:1px solid #3d3765; border-radius:14px; background:#0d0c1d; color:#b8b2d2; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#8a839e; box-shadow:0 0 0 4px rgba(138,131,158,.12); }
.vk-status.active { border-color:#456f60; color:#bff4dd; }
.vk-status.active .status-dot { background:#54d7a1; box-shadow:0 0 0 4px rgba(84,215,161,.14),0 0 14px rgba(84,215,161,.5); }
.vk-auth-message { margin:10px 0; padding:12px 14px; border:1px solid #5b4ea0; border-radius:13px; background:#1a1735; color:#ddd7ff; }
.vk-connect { width:100%; }
.vk-connect:disabled { cursor:wait; opacity:.65; }
.vk-group-link { display:block; margin-top:13px; color:#9ea9ff; text-align:center; text-decoration:none; }
.boosty-access-card { border-color:#8d4a73; background:radial-gradient(circle at 100% 0,rgba(255,107,89,.2),transparent 42%),linear-gradient(145deg,#1d193b,#111024); }
.boosty-access-card .kicker { color:#ffc2ae; }.boosty-mark { padding:0; overflow:hidden; background:#fa5b31; box-shadow:0 8px 24px rgba(250,91,49,.3); }.boosty-mark img { display:block; width:100%; height:100%; object-fit:cover; mix-blend-mode:normal; }.boosty-access-points li::before { color:#ff9674; }
.boosty-group-actions { display:grid; gap:10px; }.boosty-open-chat { background:linear-gradient(100deg,#ff8e72,#f35d41); box-shadow:0 12px 28px rgba(250,91,49,.3); }
.payment-muted { opacity:.7; }
.boosty-steps { margin-top:16px; padding:15px; border:1px solid #55497f; border-radius:15px; background:#121026; }.boosty-steps h3 { margin:8px 0; }.boosty-steps .field { display:grid; gap:7px; margin:14px 0; color:#cbc4e5; font-size:13px; }.boosty-steps input { width:100%; padding:10px; border:1px solid #443a70; border-radius:11px; background:#0d0c1d; color:#f5f2ff; }.boosty-steps .actions { display:flex; gap:9px; }.boosty-steps .actions button { flex:1; }.boosty-steps .secondary { border:1px solid #514984; border-radius:12px; background:#18152f; color:#ece8ff; font-weight:700; }

/* Единая защита мобильной вёрстки: элементы формы не могут выйти за карточку. */
html,body{max-width:100%;overflow-x:hidden}
.community-welcome{position:fixed;z-index:180;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom));background:radial-gradient(circle at 50% 34%,rgba(106,78,220,.24),transparent 32%),linear-gradient(180deg,rgba(11,10,25,.97),rgba(9,8,19,.985));text-align:center}.community-welcome:before{position:absolute;inset:0;content:"";pointer-events:none;opacity:.32;background-image:linear-gradient(rgba(189,174,255,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(189,174,255,.055) 1px,transparent 1px);background-size:28px 28px;mask-image:linear-gradient(180deg,transparent,black 24%,black 75%,transparent)}.community-welcome-character{position:relative;z-index:1;width:min(100%,350px);max-height:42vh;object-fit:contain;object-position:center bottom;margin:0 auto -4px;filter:drop-shadow(0 20px 26px rgba(0,0,0,.45))}.community-welcome-copy{position:relative;z-index:1;width:min(100%,420px)}.community-welcome-copy .kicker{display:block;margin-bottom:10px;color:#b7aaff;font-size:10px;letter-spacing:.24em}.community-welcome-copy h1{margin:0;color:#f7f4ff;font-size:clamp(28px,8vw,38px);line-height:1.05;letter-spacing:-.045em}.community-welcome-copy p{margin:15px auto 23px;max-width:340px;color:#c4bddc;font-size:15px;line-height:1.48}.community-welcome-join{display:flex;width:min(100%,340px);min-height:54px;align-items:center;justify-content:center;gap:14px;margin:0 auto;padding:13px 20px;border-radius:17px;box-shadow:0 13px 30px rgba(113,77,233,.36);font-size:15px}.community-welcome-join b{font-size:22px;line-height:0}.community-welcome-later{margin-top:13px;padding:8px 13px;background:transparent;color:#aaa3c6;font-size:13px}.community-welcome-close{position:absolute;z-index:2;top:max(16px,env(safe-area-inset-top));right:18px;display:grid;width:38px;height:38px;place-items:center;border:1px solid rgba(152,139,212,.34);border-radius:50%;background:rgba(18,16,39,.5);color:#eeeaff;font-size:27px;line-height:1}@media(max-height:650px){.community-welcome{justify-content:flex-start}.community-welcome-character{max-height:32vh}.community-welcome-copy p{margin:10px auto 15px}}
.app-shell,#view,.card,.hero,.vk-access-card,.boosty-steps,.field,label,.actions{min-width:0;max-width:100%}
.activation-code-card{position:relative;overflow:hidden;border-color:rgba(156,118,255,.72);background:radial-gradient(circle at 10% 0,rgba(189,142,255,.2),transparent 43%),radial-gradient(circle at 100% 100%,rgba(87,65,205,.26),transparent 52%),linear-gradient(145deg,#211844,#111024)}.activation-code-glow{position:absolute;inset:auto -40px -68px auto;width:190px;height:190px;border-radius:999px;background:rgba(121,87,255,.25);filter:blur(28px);pointer-events:none}.activation-code-card>:not(.activation-code-glow){position:relative}.activation-code-mark{color:#fff;background:linear-gradient(135deg,#7656ed,#bd8dff);box-shadow:0 8px 20px rgba(116,79,236,.4)}.activation-code-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-top:17px}.activation-code-entry .field{margin:0}.activation-code-entry .field span{font-weight:700;letter-spacing:.02em}.activation-code-entry input{height:48px;padding:0 13px;border-color:#6651a7;border-radius:14px;background:rgba(8,7,23,.72);font-size:14px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.activation-code-entry input:focus{border-color:#ab8cff;box-shadow:0 0 0 3px rgba(156,112,255,.15)}.activation-code-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;height:48px;margin:0;padding:0 17px;white-space:nowrap;border-radius:14px;box-shadow:0 10px 24px rgba(109,75,231,.28)}.activation-code-button b{font-size:20px;line-height:1}.activation-code-hint{display:flex;align-items:center;gap:7px;margin-top:12px;color:#bfb5e6;font-size:11px}.activation-code-hint span{color:#ba95ff;font-size:14px}@media(max-width:430px){.activation-code-entry{grid-template-columns:1fr}.activation-code-button{width:100%}}
input,select,textarea,button{max-width:100%;min-width:0}
.field input,.field select,.field textarea,.boosty-steps input{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
input[type="date"]{min-width:0!important;max-width:100%!important}
.boosty-steps{overflow:hidden}
input[type="file"]{font-size:16px}
/* Mobile browsers zoom the entire Mini App when a text field is smaller than
   16px.  Keep every editable control at that threshold so focusing any form
   never changes the page scale. */
input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px}
.boosty-steps [data-boosty-date]{font-size:16px;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.profile-facts>div b{white-space:nowrap}

/* Уведомления повторяют карточки истории чтения: обложка, проект и глава. */
.notification-list{display:grid;gap:12px}
.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-title-row h1{margin:0}.notification-mark-all{flex:0 0 auto;padding:9px 12px;font-size:12px;white-space:nowrap}
.notification-card{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#191630,#111124)}
.notification-open{display:flex;width:100%;align-items:center;gap:12px;padding:12px;background:transparent;text-align:left}
.notification-open .cover{width:48px;height:62px}
.notification-open>span{min-width:0;flex:1}
.notification-open strong,.notification-open small,.notification-open b{display:block}
.notification-open strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.notification-open small{margin-top:4px;color:var(--muted);font-size:12px}
.notification-open b{margin-top:2px;color:#d8d1ff;font-size:14px}
.notification-open i{color:var(--accent-bright);font-size:29px;font-style:normal;line-height:1}
.notification-seen{width:calc(100% - 24px);margin:0 12px 12px;padding:10px 12px;border:1px solid #514984;border-radius:11px;background:#16142d;color:#e8e4ff;font-size:12px;font-weight:800}
.notification-open:active{background:rgba(124,104,239,.13)}
.notification-seen:active{background:#5b4cb2}
.notification-badge[hidden]{display:none!important}
.nav button:not(.nav-logo){min-height:62px!important;padding:8px 3px!important;font-size:23px!important;line-height:1!important}.nav button:not(.nav-logo) small{margin-top:5px!important;font-size:11px!important;line-height:1!important}
.nav{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)!important}.nav button:not(.nav-logo){min-width:0!important;min-height:54px!important;overflow:hidden}.nav button:not(.nav-logo) .nav-icon{display:block;height:23px;color:#e7e2ff;font-size:23px!important;font-weight:900;line-height:23px;text-shadow:0 0 7px rgba(161,145,255,.3)}.nav button:not(.nav-logo) small{overflow:hidden;margin-top:5px!important;color:#d8d2ed;font-size:10px!important;font-weight:800;line-height:1;white-space:nowrap;text-overflow:ellipsis}.nav button.active:not(.nav-logo) .nav-icon{color:#fff;text-shadow:0 0 9px rgba(189,177,255,.65)}
.nav button:not(.nav-logo) .nav-icon svg{display:block;width:23px;height:23px;margin:0 auto;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* Unified BB navigation: crisp line icons, a restrained violet active tile,
   and immediate touch feedback instead of platform glyphs. */
.nav{gap:5px!important;padding:7px!important;border-color:rgba(112,96,184,.5)!important;background:linear-gradient(180deg,rgba(24,21,52,.96),rgba(12,11,29,.98))!important;box-shadow:0 14px 38px rgba(0,0,0,.44),inset 0 1px 0 rgba(255,255,255,.035)!important}
.nav button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background .14s ease,color .14s ease,transform .1s ease!important}
.nav button:active{transform:scale(.94)}
.nav button:not(.nav-logo) .nav-icon{display:grid!important;width:30px;height:28px!important;place-items:center;margin:0 auto;color:#aaa2ca!important;font-size:0!important;line-height:1!important;text-shadow:none!important}
.nav button:not(.nav-logo) .nav-icon svg{width:22px;height:22px;filter:drop-shadow(0 0 0 transparent);transition:filter .14s ease,transform .14s ease}
.nav button:not(.nav-logo) small{color:#aaa3c3!important;font-size:9px!important;font-weight:750!important;letter-spacing:-.01em}
.nav button.active:not(.nav-logo){background:linear-gradient(145deg,#7562df,#49399c)!important;box-shadow:0 7px 18px rgba(82,61,181,.34),inset 0 1px 0 rgba(255,255,255,.16)}
.nav button.active:not(.nav-logo) .nav-icon,.nav button.active:not(.nav-logo) small{color:#fff!important}
.nav button.active:not(.nav-logo) .nav-icon svg{transform:translateY(-1px);filter:drop-shadow(0 0 7px rgba(220,212,255,.55))}
.nav-logo{border:1px solid rgba(131,111,226,.28)!important;border-radius:16px!important;background:radial-gradient(circle at 50% 30%,rgba(124,98,232,.23),rgba(25,21,55,.42))!important}
.nav-logo.active{border-color:rgba(173,153,255,.64)!important;background:linear-gradient(145deg,#6d59d3,#453593)!important;box-shadow:0 7px 18px rgba(82,61,181,.3)}
.nav-logo img{width:31px!important;height:31px!important;filter:brightness(0) invert(1) drop-shadow(0 0 7px rgba(195,182,255,.8))!important}
.notification-badge{top:1px!important;right:calc(50% - 22px)!important;box-shadow:0 3px 9px rgba(236,100,125,.42)}

/* Skip layout and paint work for cards far outside the viewport. */
.title-card,.title-grid-card,.update-card,.chapter-line,.notification-card,.history-entry{content-visibility:auto;contain-intrinsic-size:auto 82px}
.title-grid-card{contain-intrinsic-size:auto 190px}
.chapter-line{contain-intrinsic-size:auto 55px}
.update-row{margin:6px 0 0!important;padding:9px 10px!important;border:1px solid rgba(103,89,177,.5)!important;border-radius:11px!important;background:rgba(12,11,30,.74)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}.update-row small{padding-left:8px}.chapter-new-badge{display:inline-flex;width:22px;height:22px;align-items:center;margin-left:8px;vertical-align:-5px}.chapter-new-badge svg{width:100%;height:100%;fill:#aa91ff;filter:drop-shadow(0 0 6px rgba(169,143,255,.95))}.project-description{padding:15px 16px!important;border:1px solid rgba(93,82,151,.52)!important;border-radius:16px!important;background:linear-gradient(135deg,rgba(27,23,56,.92),rgba(15,14,33,.92))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}.project-status{padding:13px 15px!important;border:1px solid rgba(93,82,151,.48)!important;border-radius:14px!important;background:rgba(14,13,31,.82)!important}.project-status span{align-items:center!important}.project-status b{padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.055);white-space:nowrap}

/* Desktop reader: keep comic pages at a comfortable reading width.  Mobile
   remains edge-to-edge, which preserves the existing Telegram phone view. */
@media (min-width:700px){
  body.reader-mode .app-shell{max-width:920px;margin:0 auto;padding-right:24px;padding-left:24px}
  body.reader-mode .comic-pages{width:min(100%,820px);margin:16px auto 24px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
  body.reader-mode .comic-pages img{max-width:820px;margin-right:auto;margin-left:auto}
  body.reader-mode .reader-chapter-nav{right:auto;left:50%;width:min(calc(100% - 48px),860px);transform:translateX(-50%)}
  body.reader-mode.reader-clean .reader-chapter-nav{transform:translate(-50%,18px)}
}

/* Chapter ending actions and discussion. */
.reader-finish,.chapter-comments{width:min(calc(100% - 28px),820px);margin:20px auto;padding:22px;border:1px solid #4e427c;border-radius:22px;background:radial-gradient(circle at 100% 0,rgba(139,105,255,.18),transparent 38%),linear-gradient(145deg,#18152f,#0e0d1e);box-shadow:0 18px 38px rgba(0,0,0,.28)}
.reader-finish{text-align:center}.reader-finish h2,.chapter-comments h2{margin:5px 0 8px}.reader-finish>p{margin:0 auto;color:#aaa3c5;font-size:13px;line-height:1.5}.reader-finish-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.reader-finish-actions button,.chapter-comments form>button{min-height:48px;border:0;border-radius:14px;color:#fff;font-weight:850}.reader-read-button{background:linear-gradient(135deg,#7658ee,#a37aff);box-shadow:0 9px 24px rgba(115,82,232,.28)}.reader-read-button.is-read{background:linear-gradient(135deg,#268b71,#52c79b)}.reader-pdf-button{border:1px solid #615499!important;background:#17142d}.reader-finish>[data-reader-action-message]{display:block;min-height:18px;margin-top:11px;color:#bfb7dc;font-size:12px}
.chapter-comments-title{display:flex;align-items:end;justify-content:space-between}.chapter-comments h2 small{display:inline-grid;min-width:25px;height:25px;margin-left:5px;place-items:center;border-radius:999px;background:#31295a;color:#dcd4ff;font-size:11px;vertical-align:3px}.chapter-comments form{display:grid;grid-template-columns:1fr auto;gap:9px;margin:17px 0 22px}.chapter-comments textarea{width:100%;min-height:92px;padding:13px;border:1px solid #49406e;border-radius:15px;outline:0;background:#0b0a18;color:#f7f4ff;resize:vertical}.chapter-comments textarea:focus{border-color:#9076ef;box-shadow:0 0 0 3px rgba(141,112,239,.13)}.chapter-comments form>button{align-self:end;padding:0 17px;background:linear-gradient(135deg,#7255eb,#9a68ff)}.comment-reply-target{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:9px 11px;border-radius:11px;background:#242044;color:#cfc6ed;font-size:12px}.comment-reply-target[hidden]{display:none}.comment-reply-target button{border:0;background:transparent;color:#fff;font-size:20px}.chapter-comments-list{display:grid;gap:12px}.chapter-comment{padding:14px;border:1px solid #373151;border-radius:15px;background:rgba(10,9,23,.7)}.chapter-comment.is-reply{margin-left:22px;border-left:3px solid #8069db}.chapter-comment-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.chapter-comment-head a,.chapter-comment-head b{overflow:hidden;color:#f5f1ff;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.chapter-comment-head time{flex:0 0 auto;color:#827c9a;font-size:10px}.chapter-comment p{margin:8px 0;color:#ddd8ec;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.chapter-comment>button{border:0;padding:3px 0;background:transparent;color:#9d94bd;font-size:11px}.chapter-comment-replying{margin-bottom:7px;color:#9389b8;font-size:10px}.chapter-comments-empty,.chapter-comments-error{margin:0;padding:18px;border:1px dashed #40375f;border-radius:14px;color:#9f97ba;font-size:12px;text-align:center}.chapter-comments-error{color:#ffadbc}
@media(max-width:520px){.reader-finish,.chapter-comments{width:calc(100% - 20px);padding:17px}.reader-finish-actions{grid-template-columns:1fr}.chapter-comments form{grid-template-columns:1fr}.chapter-comments form>button{width:100%}.chapter-comment.is-reply{margin-left:12px}}

/* Reader controls mirror Telegram's compact top toolbar. */
body.reader-mode::after{display:none}
body.reader-mode .reader-chapter-nav{position:fixed;z-index:70;top:max(8px,calc(var(--bb-content-top,0px) + 8px));right:10px;bottom:auto;left:10px;display:grid;width:auto;grid-template-columns:48px minmax(132px,1fr) 48px 58px;gap:9px;margin:0;padding:9px;border:1px solid rgba(104,91,165,.72);border-radius:20px;background:rgba(20,17,40,.94);box-shadow:0 12px 34px rgba(0,0,0,.46);backdrop-filter:blur(16px);transition:opacity .18s ease,transform .18s ease}
body.reader-mode .reader-toolbar-button{display:flex;height:46px;align-items:center;justify-content:center;gap:4px;padding:0;border:1px solid #51467f;border-radius:14px;background:#18142f;color:#f7f4ff;font-size:25px;font-weight:500;line-height:1}
body.reader-mode .reader-toolbar-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body.reader-mode .reader-chapter-stepper{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;overflow:hidden;border:1px solid #51467f;border-radius:999px;background:#18142f}
body.reader-mode .reader-chapter-stepper button{height:44px;padding:0;background:transparent;color:#e8e3ff;font-size:28px;line-height:1}body.reader-mode .reader-chapter-stepper button:disabled{opacity:.3}body.reader-mode .reader-chapter-stepper strong{text-align:center;color:#fff;font-size:14px;white-space:nowrap}
body.reader-mode .reader-comments-jump small{color:#f2efff;font-size:12px;font-weight:850}
body.reader-mode.reader-clean .reader-chapter-nav{opacity:0;pointer-events:none;transform:translateY(-18px)}
body.reader-mode.reader-edge-navigation .reader-chapter-nav{display:grid}
.reader-finish-actions{grid-template-columns:1fr}.reader-finish-actions .reader-read-button{width:100%}
@media(min-width:700px){body.reader-mode .reader-chapter-nav{right:auto;left:50%;width:min(calc(100% - 48px),860px);transform:translateX(-50%)}body.reader-mode.reader-clean .reader-chapter-nav{transform:translate(-50%,-18px)}}
@media(max-width:420px){body.reader-mode .reader-chapter-nav{grid-template-columns:44px minmax(118px,1fr) 44px 53px;gap:6px;padding:7px}body.reader-mode .reader-toolbar-button{height:43px}.reader-chapter-stepper{height:43px}}
.telegram-fullscreen.reader-mode .reader-chapter-nav{top:max(148px,calc(var(--bb-content-top,0px) + 72px))}
@media(min-width:700px){.telegram-fullscreen.reader-mode .reader-chapter-nav{top:max(112px,calc(var(--bb-content-top,0px) + 54px))}}

/* Full-width two-level header: Telegram owns the first row, BB Manga the second. */
body.reader-mode .reader-chapter-nav{top:0;right:0;bottom:auto;left:0;width:100%;height:86px;grid-template-columns:56px minmax(150px,210px) 56px 68px;align-items:end;justify-content:center;gap:10px;margin:0;padding:16px max(16px,calc((100% - 430px)/2));border:0;border-bottom:1px solid #33294f;border-radius:0;background:#171426;box-shadow:0 8px 24px rgba(0,0,0,.34);backdrop-filter:none}
.telegram-fullscreen.reader-mode .reader-chapter-nav{top:0;height:max(230px,calc(var(--bb-content-top,0px) + 150px));padding-top:max(92px,calc(var(--bb-content-top,0px) + 58px));padding-bottom:14px}
body.reader-mode .reader-toolbar-button{height:56px;border:1px solid #4b3b78;border-radius:15px;background:#18132e;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 7px 18px rgba(0,0,0,.18);font-size:29px}
body.reader-mode .reader-chapter-stepper{height:56px;grid-template-columns:50px minmax(58px,1fr) 50px;border-color:#4b3b78;background:#18132e;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 7px 18px rgba(0,0,0,.18)}
body.reader-mode .reader-chapter-stepper button{height:54px;font-size:29px}body.reader-mode .reader-chapter-stepper strong{font-size:16px}
body.reader-mode .reader-comments-jump{font-size:14px}body.reader-mode .reader-comments-jump small{font-size:14px}
body.reader-mode.reader-clean .reader-chapter-nav{transform:translateY(-100%)}
@media(min-width:700px){body.reader-mode .reader-chapter-nav,.telegram-fullscreen.reader-mode .reader-chapter-nav{right:0;left:0;width:100%;transform:none}.telegram-fullscreen.reader-mode .reader-chapter-nav{height:max(190px,calc(var(--bb-content-top,0px) + 124px));padding-top:max(76px,calc(var(--bb-content-top,0px) + 45px))}body.reader-mode.reader-clean .reader-chapter-nav{transform:translateY(-100%)}}
@media(max-width:390px){body.reader-mode .reader-chapter-nav{grid-template-columns:50px minmax(126px,1fr) 50px 60px;gap:7px;padding-right:12px;padding-left:12px}body.reader-mode .reader-toolbar-button,body.reader-mode .reader-chapter-stepper{height:52px}body.reader-mode .reader-chapter-stepper button{height:50px}}

/* Compact proportions matching the reference reader. */
body.reader-mode .reader-chapter-nav{height:76px;grid-template-columns:52px minmax(146px,194px) 52px 64px;gap:8px;padding:10px max(14px,calc((100% - 410px)/2));background:#171426}
.telegram-fullscreen.reader-mode .reader-chapter-nav{height:max(150px,calc(var(--bb-content-top,0px) + 84px));padding-top:max(72px,calc(var(--bb-content-top,0px) + 44px));padding-bottom:10px}
body.reader-mode .reader-toolbar-button{height:50px;border-radius:13px}body.reader-mode .reader-toolbar-button svg{width:22px;height:22px;stroke-width:1.8}
body.reader-mode .reader-chapter-stepper{height:50px;grid-template-columns:44px minmax(54px,1fr) 44px}body.reader-mode .reader-chapter-stepper button{display:grid;height:48px;place-items:center}body.reader-mode .reader-chapter-stepper button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}body.reader-mode .reader-chapter-stepper strong{font-size:15px}
@media(min-width:700px){.telegram-fullscreen.reader-mode .reader-chapter-nav{height:max(132px,calc(var(--bb-content-top,0px) + 76px));padding-top:max(58px,calc(var(--bb-content-top,0px) + 36px));padding-bottom:10px}}
@media(max-width:390px){body.reader-mode .reader-chapter-nav{grid-template-columns:48px minmax(124px,1fr) 48px 58px;gap:6px;padding-right:10px;padding-left:10px}}
.reader-download-button{position:relative}.reader-download-button:active{border-color:#9b86ff!important;background:#282047!important}.reader-download-button.is-loading svg{opacity:0}.reader-download-button.is-loading:after{position:absolute;width:19px;height:19px;border:2px solid rgba(255,255,255,.25);border-top-color:#c5b9ff;border-radius:50%;content:"";animation:reader-download-spin .7s linear infinite}@keyframes reader-download-spin{to{transform:rotate(360deg)}}
.reader-toolbar-toast{position:absolute;right:14px;bottom:-39px;max-width:min(280px,calc(100vw - 28px));overflow:hidden;padding:9px 12px;border:1px solid #554683;border-radius:12px;background:rgba(20,16,40,.96);box-shadow:0 8px 22px rgba(0,0,0,.38);color:#e9e4ff;font-size:11px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.reader-toolbar-toast[hidden]{display:none}
.telegram-fullscreen.reader-mode .reader-chapter-nav{height:max(162px,calc(var(--bb-content-top,0px) + 96px))}
body.reader-mode .comic-pages{overflow-anchor:none}.chapter-comments{scroll-margin-top:12px;overflow-anchor:auto}

/* Flat, avatar-led comments feed. */
.chapter-comments{border-color:#29253b;background:#0c0b11;box-shadow:none}.chapter-comments-list{gap:0}.chapter-comment{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;margin:0;padding:14px 0;border:0;border-bottom:1px solid rgba(77,68,103,.24);border-radius:0;background:transparent}.chapter-comment:last-child{border-bottom:0}.chapter-comment.is-reply{margin-left:30px;border-left:0}.chapter-comment-avatar{display:grid;width:32px;height:32px;overflow:hidden;place-items:center;border-radius:50%;background:linear-gradient(145deg,#7e69ef,#3a2e82);color:#fff;font-size:12px;font-weight:900}.chapter-comment-avatar img{display:block;width:100%;height:100%;object-fit:cover}.chapter-comment-body{min-width:0}.chapter-comment-head{display:block;min-height:18px}.chapter-comment-head>div{display:flex;align-items:center;gap:7px;min-width:0}.chapter-comment-head a,.chapter-comment-head b{color:#fff;font-size:12px;font-weight:850;text-decoration:none}.chapter-comment-head em{flex:0 0 auto;padding:2px 6px;border:1px solid #7352b4;border-radius:999px;background:rgba(111,77,186,.16);color:#b79aff;font-size:8px;font-style:normal;font-weight:800}.chapter-comment p{margin:4px 0 6px;color:#f0edf6;font-size:14px;line-height:1.45}.chapter-comment-meta{display:flex;align-items:center;gap:10px}.chapter-comment-meta button{border:0;padding:0;background:transparent;color:#8f899e;font-size:10px}.chapter-comment-meta time{color:#676273;font-size:9px}.chapter-comment-replying{margin:0 0 3px;color:#817992;font-size:9px}.chapter-comments-empty,.chapter-comments-error{margin-top:8px}
@media(max-width:430px){.chapter-comment.is-reply{margin-left:18px}}
.desktop-window-preference{margin-top:14px}.desktop-window-preference>small{display:block;margin-top:11px;color:#8f88aa;font-size:10px;line-height:1.45}
.chapter-comment-meta button{display:inline-flex;min-height:27px;align-items:center;justify-content:center;padding:5px 9px;border:1px solid rgba(126,103,203,.46);border-radius:9px;background:rgba(84,63,151,.16);color:#bdb1e7;font-size:10px;font-weight:800;line-height:1;transition:border-color .16s ease,background .16s ease,color .16s ease,transform .12s ease}.chapter-comment-meta button:active{transform:scale(.97);border-color:#9d87ec;background:rgba(112,84,196,.3);color:#f0ebff}
.chapter-comment-meta button{gap:5px}.chapter-comment-meta button svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Chapter artwork is fetched strictly in story order. Unloaded slots keep
   the document stable without exposing later pages while the first loads. */
.comic-page-slot{position:relative;display:grid;place-items:center;min-height:min(145vw,1180px);overflow:hidden;background:linear-gradient(110deg,#0b0a12 25%,#171329 42%,#0b0a12 60%);background-size:240% 100%;animation:reader-page-pulse 1.5s linear infinite}.comic-page-slot>span{position:absolute;color:#8f88a8;font-size:12px;font-weight:700}.comic-page-slot>img{position:relative;z-index:1;opacity:0}.comic-page-slot.is-loaded{min-height:0;animation:none;background:#fff}.comic-page-slot.is-loaded>img{opacity:1}.comic-page-slot.is-loaded>span{display:none}.comic-page-slot.is-error{min-height:120px;animation:none}.comic-page-slot.is-error>span{font-size:0}.comic-page-slot.is-error>span::after{content:'Страница временно не загрузилась';font-size:12px}.comic-page-slot.is-error>img{display:none}@keyframes reader-page-pulse{to{background-position:-240% 0}}

/* Bulk reading action, kept separate from chapter search and notifications. */
.chapter-bulk-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 12px}
.chapter-bulk-actions .outline{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 15px;border:1px solid rgba(144,120,240,.48);border-radius:14px;background:linear-gradient(145deg,rgba(58,43,113,.64),rgba(24,19,49,.88));color:#e4dcff;font-size:13px;font-weight:800}
.chapter-bulk-actions .outline:focus-visible{outline:2px solid var(--accent-bright);outline-offset:3px}
.chapter-bulk-actions .outline:disabled{cursor:default;opacity:.65}
.chapter-bulk-actions .outline.is-read{border-color:rgba(69,164,127,.5);background:rgba(20,70,53,.35);color:#78e2a9;opacity:1}
.chapter-bulk-actions p{flex:1 1 200px;margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.chapter-bulk-actions p.is-error{color:#ffadbc}
@media(max-width:520px){.chapter-bulk-actions .outline{width:100%}.chapter-bulk-actions p{flex-basis:100%;text-align:center}}
