/* Shared content pages and responsive global navigation */
.portal-menu-toggle { display: none; width: 62px; height: 100%; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.portal-menu-toggle span { width: 20px; height: 1px; display: block; margin: 5px auto; background: var(--white); }
.portal-menu-scrim { position: fixed; z-index: 130; inset: 0; visibility: hidden; background: rgba(0,0,0,.72); opacity: 0; transition: .25s; }
.portal-menu { position: fixed; z-index: 140; inset: 0 auto 0 0; width: min(330px,88vw); display: flex; flex-direction: column; padding: 0 18px 24px; border-right: 1px solid var(--line); background: #080909; box-shadow: 24px 0 80px #000; transform: translateX(-105%); transition: transform .28s cubic-bezier(.22,1,.36,1); }
.portal-menu.open { transform: none; }
.portal-menu-scrim.open { visibility: visible; opacity: 1; }
.portal-menu-open { overflow: hidden; }
.portal-menu-head { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.portal-menu-head strong { font: italic 900 23px var(--ui); letter-spacing: -2px; }
.portal-menu-head strong b { color: var(--red); }
.portal-menu-head button { width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; color: var(--white); font-size: 25px; cursor: pointer; }
.portal-menu nav { display: grid; margin-top: 24px; }
.portal-menu nav a { display: grid; grid-template-columns: 40px 1fr; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); color: #a4a7a6; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-menu nav a span { color: var(--red); font: 17px serif; }
.portal-menu nav a[aria-current="page"] { color: white; }
.portal-menu-foot { margin-top: auto; padding: 18px; border: 1px solid var(--line); color: #747877; font-size: 9px; line-height: 1.65; }

.content-page-main { min-height: calc(100vh - var(--header)); }
.content-hero { min-height: 390px; position: relative; isolation: isolate; display: flex; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); }
.content-hero::before { content: ''; position: absolute; z-index: -3; inset: 0; background: var(--content-art,url('assets/webp/anime-23.webp')) center 38%/cover no-repeat; filter: grayscale(.2) saturate(.7) contrast(1.1); }
.content-hero::after { content: ''; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg,#050606 0%,rgba(5,6,6,.9) 34%,rgba(5,6,6,.24) 74%),linear-gradient(0deg,#060707,transparent 54%); }
.content-hero-grid { width: min(1500px,100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 340px; align-items: end; }
.content-hero-copy { padding: 70px clamp(24px,6vw,90px) 58px; }
.content-hero-copy h1 { margin: 14px 0 18px; font: 400 clamp(72px,9vw,126px)/.76 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
.content-hero-copy h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(255,255,255,.62); }
.content-hero-copy p { max-width: 650px; margin: 0; color: #a1a5a4; font-size: 12px; line-height: 1.8; }
.content-hero-note { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; padding: 45px 34px 58px; border-left: 1px solid var(--line); background: rgba(5,6,6,.58); }
.content-hero-note small { color: var(--red); font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.content-hero-note strong { margin: 15px 0 10px; font: 34px/1 var(--display); text-transform: uppercase; }
.content-hero-note span { color: #777b7a; font-size: 9px; line-height: 1.6; }
.content-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(20px,calc((100vw - 1400px)/2)); border-bottom: 1px solid var(--line); background: #090a0a; }
.content-toolbar > span { color: var(--red); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.content-toolbar p { margin: 0; color: #737776; font-size: 8px; }
.content-shell { width: min(1400px,calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.signal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.signal-card { min-width: 0; display: grid; grid-template-rows: 250px 1fr; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.signal-card.featured { grid-column: span 2; grid-row: span 2; grid-template-rows: 430px 1fr; }
.signal-card-media { position: relative; overflow: hidden; background: #151717; }
.signal-card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(4,5,5,.72),transparent 52%); }
.signal-card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); transition: .45s; }
.signal-card:hover img { transform: scale(1.025); filter: saturate(.95); }
.signal-card-media > span { position: absolute; z-index: 2; right: 12px; bottom: 12px; padding: 7px 9px; background: var(--red); color: white; font-size: 7px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.signal-card-copy { display: flex; flex-direction: column; padding: 22px; }
.signal-card-copy > small { color: var(--red); font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.signal-card-copy h2 { margin: 11px 0; overflow-wrap: anywhere; font: 30px/1 var(--display); text-transform: uppercase; }
.signal-card.featured h2 { font-size: clamp(38px,4vw,62px); }
.signal-card-copy h2 a:hover { color: var(--red); }
.signal-card-copy p { margin: 0 0 20px; overflow: hidden; color: #8e9291; font-size: 10px; line-height: 1.7; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.signal-card-copy > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.signal-card-copy > div span { padding: 5px 7px; border: 1px solid var(--line); color: #777b7a; font-size: 7px; }
.content-empty { grid-column: 1/-1; min-height: 360px; display: grid; place-content: center; justify-items: center; text-align: center; border: 1px solid var(--line); }
.content-empty > span { color: rgba(239,35,52,.28); font: 90px/1 serif; }
.content-empty h2 { margin: -10px 0 8px; font: 38px var(--display); text-transform: uppercase; }
.content-empty p { max-width: 500px; color: #777; font-size: 10px; line-height: 1.7; }
.content-empty button { height: 42px; margin-top: 12px; padding: 0 20px; border: 1px solid var(--red); background: transparent; color: var(--red); font-size: 8px; font-weight: 900; cursor: pointer; }

@media (max-width: 1100px) {
  .portal-nav { padding-left: 8px; }
  .portal-nav a { min-width: 76px; font-size: 9px; }
  .signal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .portal-header { grid-template-columns: 62px minmax(135px,1fr) auto; }
  .portal-menu-toggle { display: block; }
  .portal-brand { padding-inline: 18px; border-right: 0; }
  .portal-nav { display: none; }
  .portal-header-meta { padding-inline: 16px; }
  .portal-profile b { display: none; }
  .content-hero-grid { grid-template-columns: 1fr 260px; }
}
@media (max-width: 700px) {
  .portal-header-meta .live-signal { display: none; }
  .content-hero { min-height: 480px; }
  .content-hero::after { background: linear-gradient(0deg,#060707 4%,rgba(6,7,7,.9) 48%,rgba(6,7,7,.15)); }
  .content-hero-grid { grid-template-columns: 1fr; }
  .content-hero-copy { padding: 150px 20px 30px; }
  .content-hero-copy h1 { font-size: 68px; }
  .content-hero-note { min-height: 112px; padding: 22px 20px; border-top: 1px solid var(--line); border-left: 0; }
  .content-hero-note strong { margin: 8px 0 5px; font-size: 25px; }
  .content-toolbar { align-items: flex-start; flex-direction: column; gap: 6px; padding: 15px 12px; }
  .content-shell { width: calc(100% - 20px); padding-top: 26px; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-card,.signal-card.featured { grid-column: auto; grid-row: auto; grid-template-rows: 250px 1fr; }
  .signal-card.featured h2 { font-size: 38px; }
}
@media (max-width: 430px) {
  .portal-header { grid-template-columns: 54px minmax(120px,1fr) 52px; }
  .portal-menu-toggle { width: 54px; }
  .portal-header-meta { padding: 0 9px; }
  .portal-profile span { width: 32px; height: 32px; }
  .content-hero-copy h1 { font-size: 58px; }
}

/* Schedule board */
.schedule-board { display: grid; gap: 12px; }
.schedule-day { border: 1px solid var(--line); background: var(--panel); }
.schedule-day.today { border-color: rgba(239,35,52,.55); }
.schedule-day.idle { opacity: .62; }
.schedule-day > header { display: flex; align-items: baseline; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.schedule-day > header b { font: 26px/1 var(--display); text-transform: uppercase; }
.schedule-day.today > header b { color: var(--red); }
.schedule-day > header span { color: #8e9291; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.schedule-day > header i { margin-left: auto; color: #737776; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.schedule-quiet { margin: 0; padding: 18px 20px; color: #6f7471; font-size: 10px; }
.schedule-row { display: grid; grid-template-columns: 58px 44px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); transition: background .2s; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row:hover { background: rgba(239,35,52,.06); }
.schedule-row time { color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.schedule-thumb { width: 44px; height: 58px; overflow: hidden; background: #151717; }
.schedule-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.schedule-copy { min-width: 0; display: grid; gap: 4px; }
.schedule-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.schedule-row:hover .schedule-copy b { color: var(--red); }
.schedule-copy small { color: #777b7a; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.schedule-row > i { color: #8e9291; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

/* Manga roadmap */
.roadmap-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 46px; }
.roadmap-card { position: relative; padding: 26px 22px; border: 1px solid var(--line); background: var(--panel); }
.roadmap-card > span { position: absolute; top: 18px; right: 18px; padding: 6px 8px; border: 1px solid var(--line); color: #777b7a; font-size: 7px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.roadmap-card.live > span { border-color: rgba(239,35,52,.6); color: var(--red); }
.roadmap-card > b { display: block; color: rgba(239,35,52,.5); font: 30px/1 serif; }
.roadmap-card h2 { margin: 14px 0 10px; font: 27px/1 var(--display); text-transform: uppercase; }
.roadmap-card p { margin: 0; color: #8e9291; font-size: 10px; line-height: 1.7; }

/* Clans page */
.clan-layout { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 12px; align-items: start; }
.clan-codex { display: grid; gap: 12px; }
.clan-codex article { padding: 26px 24px; border: 1px solid var(--line); background: var(--panel); display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 18px; }
.clan-codex article > span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(239,35,52,.4); color: var(--red); font: 19px serif; }
.clan-codex h2 { margin: 0 0 8px; font: 25px/1 var(--display); text-transform: uppercase; }
.clan-codex p { margin: 0; color: #8e9291; font-size: 10px; line-height: 1.7; }
.clan-codex article > div > small { display: inline-block; margin-top: 12px; padding: 5px 8px; border: 1px solid var(--line); color: #737776; font-size: 7px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.clan-gate { position: sticky; top: calc(var(--header) + 16px); padding: 30px 26px; border: 1px solid var(--line); background: #0b0c0c; }
.clan-gate > small { color: var(--red); font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.clan-gate > h2 { margin: 12px 0 18px; font: 34px/1 var(--display); text-transform: uppercase; }
.clan-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border: 1px solid var(--line); }
.clan-tabs button { padding: 12px; border: 0; background: transparent; color: #8e9291; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.clan-tabs button.active { background: var(--red); color: white; }
.clan-form { display: grid; gap: 14px; }
.clan-form label { display: grid; gap: 7px; color: #8e9291; font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.clan-form input { height: 46px; padding: 0 14px; border: 1px solid var(--line); background: #070808; color: var(--white); font-size: 12px; }
.clan-form input:focus { border-color: var(--red); outline: none; }
.clan-form button { height: 48px; margin-top: 4px; border: 0; background: var(--red); color: white; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.clan-form button:disabled { opacity: .55; cursor: wait; }
.clan-message { min-height: 16px; margin: 14px 0 0; color: #8e9291; font-size: 9px; line-height: 1.6; }
.clan-message.error { color: var(--red); }
.clan-session { display: grid; gap: 16px; }
.clan-session > p { margin: 0; color: #8e9291; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.clan-session > strong { font: 40px/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.clan-session-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clan-session-stats div { padding: 16px; border: 1px solid var(--line); }
.clan-session-stats b { display: block; color: var(--red); font: 30px/1 var(--display); }
.clan-session-stats span { color: #777b7a; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.clan-session > button { height: 46px; border: 1px solid var(--line); background: transparent; color: var(--white); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.clan-session > button:hover { border-color: var(--red); color: var(--red); }
.hidden { display: none !important; }

@media (max-width: 1100px) {
  .roadmap-grid { grid-template-columns: 1fr; }
  .clan-layout { grid-template-columns: 1fr; }
  .clan-gate { position: static; }
}
@media (max-width: 700px) {
  .schedule-row { grid-template-columns: 46px 38px minmax(0,1fr); padding: 10px 12px; }
  .schedule-row > i { display: none; }
  .schedule-copy b { white-space: normal; font-size: 11px; }
  .schedule-day > header { flex-wrap: wrap; gap: 8px 12px; padding: 14px 12px; }
}

/* Global header search (content pages) */
.portal-search { display: flex; align-items: center; height: 38px; border: 1px solid var(--line); background: #070808; transition: border-color .25s; }
.portal-search:focus-within { border-color: rgba(239,35,52,.65); }
.portal-search input { width: 168px; height: 100%; padding: 0 12px; border: 0; background: transparent; color: var(--white); font-size: 10px; outline: none; }
.portal-search input::placeholder { color: #6d7270; }
.portal-search button { width: 36px; height: 100%; border: 0; border-left: 1px solid var(--line); background: transparent; color: #8f9392; font-size: 15px; cursor: pointer; transition: color .2s, background .2s; }
.portal-search button:hover { background: var(--red); color: white; }
.portal-menu .portal-search { margin-top: 20px; height: 46px; }
.portal-menu .portal-search input { flex: 1; font-size: 12px; }

/* Header meta must survive small screens: КЛАН и «К архиву» остаются иконками */
@media (max-width: 900px) { .portal-header .portal-search { display: none; } }
@media (max-width: 760px) {
  .portal-header-meta { display: flex; gap: 10px; padding: 0 12px; }
  .back-to-archive { padding: 8px 10px; font-size: 8px; white-space: nowrap; }
}

/* Scroll reveal */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1); }
.reveal-ready [data-reveal].revealed { opacity: 1; transform: none; }
.reveal-ready .content-toolbar[data-reveal] { transform: none; transition: opacity .8s; }

/* Card life: подъём, свечение печати, зум постера */
.signal-card, .archive-card, .roadmap-card, .clan-codex article { transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s, opacity .65s cubic-bezier(.22,1,.36,1); }
.signal-card:hover, .roadmap-card:hover, .clan-codex article:hover { transform: translateY(-4px); border-color: rgba(239,35,52,.45); box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(239,35,52,.12); }
.schedule-row time { transition: letter-spacing .25s; }
.schedule-row:hover time { letter-spacing: .18em; }
.schedule-day.today { animation: today-pulse 3.2s ease-in-out infinite; }
@keyframes today-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,35,52,0); }
  50% { box-shadow: 0 0 26px 0 rgba(239,35,52,.14); }
}

/* Auth pages */
.auth-stage { min-height: calc(100vh - var(--header) - 120px); display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,460px) minmax(0,1fr); align-items: center; padding: 60px 20px; }
.auth-stage .clan-gate { grid-column: 2; position: static; }
.auth-stage-side { display: grid; gap: 10px; align-content: center; justify-items: center; padding: 0 40px; }
.auth-stage-side span { color: rgba(239,35,52,.24); font: 120px/1 serif; }
.auth-stage-side p { max-width: 250px; margin: 0; color: #6f7471; font-size: 9px; line-height: 1.8; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.auth-alt { margin: 18px 0 0; color: #8e9291; font-size: 10px; }
.auth-alt a { color: var(--red); font-weight: 800; }
.auth-alt a:hover { text-decoration: underline; }
@media (max-width: 1100px) {
  .auth-stage { grid-template-columns: 1fr; }
  .auth-stage .clan-gate { grid-column: 1; width: min(460px, 100%); margin: 0 auto; }
  .auth-stage-side { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-card, .archive-card, .roadmap-card, .clan-codex article, .schedule-row time { transition: none; }
  .schedule-day.today { animation: none; }
}

/* Shell v3: единый компонент шапки и футера */
.portal-search { position: relative; }
.portal-menu-local { display: grid; margin-top: 4px; }
.portal-menu-local a { display: grid; grid-template-columns: 40px 1fr; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); color: #7c807f; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.portal-menu-local a span { color: rgba(239,35,52,.6); text-align: center; }
.portal-menu-local a:hover { color: var(--white); }
.portal-menu-foot a { color: var(--red); font-weight: 800; }
.portal-footer-body { display: grid; gap: 12px; padding: 26px 45px; }
.portal-footer-body nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.portal-footer-body nav a { color: #8f9392; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; transition: color .2s; }
.portal-footer-body nav a:hover { color: var(--red); }
.portal-footer-body p { padding: 0; }
.portal-footer-top { align-self: stretch; padding: 0 30px; border: 0; border-left: 1px solid var(--line); background: transparent; color: #8f9392; font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer; transition: color .2s; }
.portal-footer-top:hover { color: var(--red); }
@media (max-width: 760px) {
  .portal-footer { grid-template-columns: 1fr auto; }
  .portal-footer-body { grid-column: 1 / -1; order: 2; padding: 20px 24px; }
}
body.motion-off [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Главная внутри shell: сайдбар начинается под общей шапкой */
body[data-page="home"] .sidebar { top: var(--header, 72px); }
@media (min-width: 961px) {
  body[data-page="home"] .portal-footer { margin-left: var(--sidebar, 248px); }
}

/* ===== Манга: каталог, досье, читалка ===== */
.manga-search { display: flex; gap: 0; margin-top: 22px; max-width: 460px; border: 1px solid var(--line); background: #070808; }
.manga-search input { flex: 1; height: 46px; padding: 0 16px; border: 0; background: transparent; color: var(--white); font-size: 12px; outline: none; }
.manga-search input::placeholder { color: #6d7270; }
.manga-search button { padding: 0 22px; border: 0; border-left: 1px solid var(--line); background: var(--red); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.manga-search button:hover { background: #ff3742; }

.manga-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.manga-grid .archive-skeleton { aspect-ratio: 7 / 10; }
.manga-tile { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.manga-tile-cover { position: relative; aspect-ratio: 7 / 10; overflow: hidden; border: 1px solid var(--line); background: #151717; }
.manga-tile-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22,1,.36,1), filter .3s; filter: saturate(.85); }
.manga-tile:hover .manga-tile-cover img { transform: scale(1.05); filter: saturate(1.05); }
.manga-tile-cover i { position: absolute; inset: auto 0 0 0; padding: 20px 10px 9px; background: linear-gradient(0deg, rgba(4,5,5,.94), transparent); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: .25s; }
.manga-tile:hover .manga-tile-cover i { opacity: 1; transform: none; }
.manga-tile b { overflow: hidden; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.manga-tile:hover b { color: var(--red); }
.manga-tile small { color: #777b7a; font-size: 9px; letter-spacing: .04em; }

.manga-hero { position: relative; isolation: isolate; padding: clamp(40px, 6vw, 78px) 0; overflow: hidden; border-bottom: 1px solid var(--line); }
.manga-hero::before { content: ''; position: absolute; z-index: -2; inset: 0; background: var(--content-art) center 22%/cover no-repeat; filter: grayscale(.35) saturate(.6) blur(3px); opacity: .3; }
.manga-hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, var(--void) 4%, rgba(6,7,7,.82) 60%, rgba(6,7,7,.5)); }
.manga-hero-grid { width: min(1400px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 54px); align-items: start; }
.manga-hero-cover { aspect-ratio: 7 / 10; border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.manga-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.manga-hero-copy h1 { margin: 12px 0 6px; font: 400 clamp(38px, 5vw, 68px)/.92 var(--display); text-transform: uppercase; }
.manga-hero-alt { margin: 0 0 14px; color: #8a8f8d; font-size: 12px; }
.manga-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.manga-hero-meta span { padding: 5px 10px; border: 1px solid var(--line); color: #c7cbca; font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.manga-hero-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.manga-hero-genres i { padding: 4px 9px; background: rgba(239,35,52,.1); color: #f0a0a4; font-size: 9px; font-style: normal; letter-spacing: .05em; }
.manga-hero-summary { max-width: 720px; color: #a1a5a4; font-size: 12px; line-height: 1.8; }
.manga-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.manga-read-btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 26px; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: background .2s; }
.manga-read-btn b { font-weight: 700; opacity: .85; }
.manga-read-btn:hover { background: #ff3742; }
.manga-back-btn { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border: 1px solid var(--line-strong); color: #c7cbca; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transition: border-color .2s, color .2s; }
.manga-back-btn:hover { border-color: var(--red); color: var(--red); }

.chapter-list { display: grid; gap: 2px; }
.chapter-row { display: grid; grid-template-columns: 240px 1fr auto; gap: 16px; align-items: center; padding: 15px 18px; border: 1px solid var(--line); background: var(--panel); transition: border-color .2s, transform .2s, background .2s; }
.chapter-row:hover { border-color: rgba(239,35,52,.5); transform: translateX(4px); }
.chapter-row.current { border-left: 3px solid var(--red); }
.chapter-row b { font-size: 12px; letter-spacing: .03em; }
.chapter-row span { min-width: 0; overflow: hidden; color: #9a9e9d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chapter-row small { color: #6d7270; font-size: 9px; letter-spacing: .05em; }
@media (max-width: 720px) {
  .manga-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .manga-hero-grid { grid-template-columns: 150px minmax(0, 1fr); }
  .chapter-row { grid-template-columns: 1fr auto; }
  .chapter-row span { display: none; }
}
@media (max-width: 460px) { .manga-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Читалка */
body[data-page="reader"] { --reader-bg: #0a0b0b; }
/* Иммерсия: глобальную шапку прячем, читалка сама рулит верхней панелью. */
body[data-page="reader"] .portal-header,
body[data-page="reader"] .portal-progress { display: none; }
.reader-page-body { background: var(--reader-bg, #0a0b0b); transition: background .3s; }
.reader-shell { position: relative; }
.reader-progress { position: sticky; top: 0; z-index: 41; height: 3px; background: rgba(255,255,255,.05); }
.reader-progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .12s linear; }
.reader-bar { position: sticky; top: 3px; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, calc((100vw - 900px) / 2)); border-bottom: 1px solid var(--line); background: rgba(8,9,9,.96); backdrop-filter: blur(14px); transition: transform .3s ease; }
.reader-bar.hidden { transform: translateY(-140%); }
.reader-back { color: #c7cbca; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.reader-back:hover { color: var(--red); }
.reader-select { flex: 1; min-width: 0; }
.reader-select select { width: 100%; max-width: 340px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); background: #0c0e0e; color: #e8e9e8; font-size: 11px; outline: none; cursor: pointer; }
.reader-select select:focus { border-color: var(--red); }
.reader-tools { display: flex; align-items: center; gap: 8px; }
.reader-counter { min-width: 58px; color: #8f9392; font-size: 10px; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reader-tool { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); background: transparent; color: #c7cbca; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.reader-tool:hover, .reader-tool[aria-expanded="true"], .reader-tool.playing { border-color: var(--red); color: var(--red); }
.reader-tool.playing { background: rgba(239,35,52,.12); animation: reader-pulse 1.6s ease-in-out infinite; }
@keyframes reader-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,35,52,0); } 50% { box-shadow: 0 0 0 4px rgba(239,35,52,.12); } }

/* Панель настроек чтения */
.reader-panel { position: sticky; top: 60px; z-index: 39; width: min(560px, calc(100% - 24px)); margin: 8px auto 0; display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line-strong); background: #0c0e0e; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.reader-panel[hidden] { display: none; }
.reader-panel-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; }
.reader-panel-row[hidden] { display: none; }
.reader-panel-row > span { color: #8f9392; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.reader-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.reader-seg button { flex: 1; min-width: 48px; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); background: transparent; color: #b7bab8; font-size: 10px; font-weight: 700; cursor: pointer; transition: .18s; }
.reader-seg button:hover { color: #fff; border-color: #4a4d4c; }
.reader-seg button.active { background: var(--red); border-color: var(--red); color: #fff; }
.reader-range { width: 100%; accent-color: var(--red); cursor: pointer; }
.reader-range-wrap { display: grid; grid-template-columns: 1fr 42px; align-items: center; gap: 10px; }
.reader-range-wrap b { color: #c7cbca; font-size: 10px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.reader-chapter-label { width: min(900px, calc(100% - 32px)); margin: 14px auto 4px; color: #7c817f; font-size: 10px; letter-spacing: .04em; text-align: center; }

.reader-stage { display: flex; flex-direction: column; align-items: center; gap: var(--reader-gap, 8px); width: 100%; max-width: var(--reader-width, 900px); margin: 0 auto; padding: 6px 0 20px; }
.reader-page { position: relative; width: 100%; min-height: 40px; background: rgba(255,255,255,.02); }
.reader-page::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,.02) 30%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.02) 70%); background-size: 200% 100%; animation: reader-shimmer 1.4s linear infinite; }
.reader-page.loaded::before { display: none; }
.reader-page img { width: 100%; height: auto; display: block; opacity: 0; transition: opacity .35s ease; }
.reader-page.loaded img { opacity: 1; }
@keyframes reader-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.reader-page-num { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 2px; background: rgba(4,5,5,.72); color: #b7bab8; font-size: 9px; font-weight: 700; opacity: 0; transition: opacity .2s; font-variant-numeric: tabular-nums; }
.reader-page:hover .reader-page-num { opacity: 1; }

/* Постраничный режим: видна только активная страница. */
.reader-stage[data-mode="paged"] { max-width: none; min-height: calc(100vh - 120px); justify-content: center; padding: 10px 0; }
.reader-stage[data-mode="paged"] .reader-page { display: none; width: auto; max-width: 100%; min-height: 0; }
.reader-stage[data-mode="paged"] .reader-page.active { display: flex; justify-content: center; }
.reader-stage[data-mode="paged"] .reader-page-num { opacity: 1; }
.reader-stage[data-mode="paged"][data-fit="height"] .reader-page img { width: auto; max-width: min(100%, 900px); max-height: calc(100vh - 90px); object-fit: contain; }
.reader-stage[data-mode="paged"][data-fit="width"] .reader-page img { width: min(100%, 1000px); height: auto; max-height: none; }

/* Затемняющий слой яркости и кнопка «наверх». */
.reader-dim { position: fixed; inset: 0; z-index: 45; pointer-events: none; background: #000; opacity: 0; transition: opacity .2s; }
.reader-top { position: fixed; right: 18px; bottom: 22px; z-index: 46; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(8,9,9,.9); color: #e8e9e8; font-size: 18px; cursor: pointer; transition: border-color .2s, color .2s; }
.reader-top:hover { border-color: var(--red); color: var(--red); }
.reader-top[hidden] { display: none; }

/* Зоны клика (постранично): края листают, центр прячет панель. */
.reader-tap { position: fixed; top: 60px; bottom: 84px; z-index: 30; cursor: pointer; }
.reader-tap-prev { left: 0; width: 30%; }
.reader-tap-next { right: 0; width: 30%; }
.reader-tap-center { left: 30%; width: 40%; cursor: default; }
.reader-tap-prev::after, .reader-tap-next::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .2s; background: linear-gradient(90deg, rgba(239,35,52,.12), transparent); }
.reader-tap-next::after { background: linear-gradient(270deg, rgba(239,35,52,.12), transparent); }
.reader-tap-prev:hover::after, .reader-tap-next:hover::after { opacity: 1; }

.reader-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: min(900px, calc(100% - 32px)); margin: 0 auto 60px; }
.reader-nav a { display: flex; align-items: center; justify-content: center; height: 52px; padding: 0 18px; border: 1px solid var(--line-strong); color: #e8e9e8; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: center; transition: border-color .2s, color .2s, background .2s; }
.reader-nav a:hover { border-color: var(--red); color: var(--red); }
.reader-nav .reader-nav-index { background: #111414; }
.reader-nav .reader-nav-end { display: flex; align-items: center; justify-content: center; height: 52px; color: #5f6461; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 700px) {
  .reader-bar { gap: 8px; padding: 8px 12px; }
  .reader-select select { height: 34px; }
  .reader-panel-row { grid-template-columns: 74px 1fr; }
  .reader-tap-prev, .reader-tap-next { width: 34%; }
  .reader-tap-center { left: 34%; width: 32%; }
  .reader-top { right: 12px; bottom: 16px; width: 42px; height: 42px; }
}
@media (max-width: 600px) {
  .reader-nav { grid-template-columns: 1fr; }
  .reader-nav a { height: 46px; }
}

/* ===== Профиль пользователя ===== */
.profile-hero { width: min(1400px, calc(100% - 40px)); margin: 40px auto 0; }
.profile-id { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(18px, 3vw, 34px); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line-strong); background: linear-gradient(120deg, rgba(239,35,52,.08), transparent 60%), var(--panel); }
.profile-avatar { width: clamp(72px, 10vw, 104px); height: clamp(72px, 10vw, 104px); display: grid; place-items: center; border: 1px solid var(--red); border-radius: 50%; background: #0b0c0c; color: var(--red); font: 900 clamp(34px, 5vw, 48px)/1 var(--display, sans-serif); }
.profile-id-copy { min-width: 0; }
.profile-id-copy h1 { margin: 10px 0 6px; font: 400 clamp(34px, 5vw, 58px)/.92 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.profile-id-copy p { margin: 0; color: #a1a5a4; font-size: 12px; overflow-wrap: anywhere; }
.profile-id-copy small { display: block; margin-top: 8px; color: #6d7270; font-size: 10px; letter-spacing: .04em; }
.profile-logout { align-self: start; height: 42px; padding: 0 20px; border: 1px solid var(--line-strong); background: transparent; color: #c7cbca; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s; }
.profile-logout:hover { border-color: var(--red); color: var(--red); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 14px; background: var(--line); border: 1px solid var(--line); }
.profile-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; background: var(--panel); }
.profile-stats b { font: 400 34px/1 var(--display); color: #fff; }
.profile-stats span { color: #777b7a; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 720px) {
  .profile-id { grid-template-columns: auto 1fr; }
  .profile-logout { grid-column: 1 / -1; justify-self: start; }
  .profile-stats { grid-template-columns: 1fr; }
}

/* ===== Страница новости ===== */
.news-hero { position: relative; isolation: isolate; min-height: 340px; display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.news-hero::before { content: ''; position: absolute; z-index: -2; inset: 0; background: var(--content-art) center 28%/cover no-repeat; filter: grayscale(.25) saturate(.7) contrast(1.05); }
.news-hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#050606 4%,rgba(5,6,6,.86) 42%,rgba(5,6,6,.3) 82%),linear-gradient(0deg,#060707,transparent 55%); }
.news-hero-copy { width: min(1400px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 46px; }
.news-kind { display: inline-block; margin-bottom: 14px; padding: 6px 11px; background: var(--red); color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.news-hero-copy h1 { margin: 10px 0 8px; font: 400 clamp(38px,6vw,78px)/.92 var(--display); text-transform: uppercase; }
.news-alt { margin: 0 0 14px; color: #9a9e9d; font-size: 13px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.news-meta span { padding: 5px 10px; border: 1px solid var(--line-strong); color: #c7cbca; font-size: 9px; font-weight: 700; letter-spacing: .05em; }

.news-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: clamp(24px,3vw,44px); align-items: start; }
.news-body h2 { margin: 0 0 16px; font: 400 30px/1 var(--display); text-transform: uppercase; }
.news-text { margin: 0; color: #b6bab9; font-size: 13px; line-height: 1.9; white-space: pre-line; }
.news-shots { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 26px; }
.news-shots img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--line); filter: saturate(.8); }
.news-watch { margin-top: 30px; }
.news-watch-btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border: 0; background: var(--red); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.news-watch-btn:hover { background: #ff3742; }
.news-watch-btn span { font-size: 14px; }
.news-player { margin-top: 18px; aspect-ratio: 16/9; border: 1px solid var(--line-strong); background: #000; }
.news-player.hidden { display: none; }
.news-player iframe { width: 100%; height: 100%; border: 0; }

.news-aside { display: grid; gap: 14px; position: sticky; top: calc(var(--header,72px) + 16px); }
.news-anime-card { display: grid; grid-template-columns: 96px minmax(0,1fr); overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: border-color .2s, transform .2s; }
.news-anime-card:hover { border-color: rgba(239,35,52,.5); transform: translateY(-2px); }
.news-anime-poster { background: #151717; }
.news-anime-poster img { width: 96px; height: 100%; object-fit: cover; }
.news-anime-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 16px; }
.news-anime-copy small { color: var(--red); font-size: 7px; font-weight: 900; letter-spacing: .16em; }
.news-anime-copy b { overflow: hidden; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-anime-copy i { color: #777b7a; font-size: 9px; font-style: normal; }
.news-anime-copy em { margin-top: auto; color: var(--red); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.news-back { display: flex; align-items: center; justify-content: center; height: 46px; border: 1px solid var(--line-strong); color: #c7cbca; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: border-color .2s,color .2s; }
.news-back:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 860px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-aside { position: static; grid-template-columns: 1fr 1fr; }
  .news-shots { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) { .news-aside { grid-template-columns: 1fr; } }
