/* Public library polish. Keep reader/admin typography independent of compact browsing. */
.hero-text, .series-info, .series-main, .series-side { min-width: 0; }
.hero-actions { gap: 10px; align-items: center; }
.hero-save { width: 48px; flex: none; padding: 0; }
.hero-save.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.hero-save.on .i { fill: currentColor; }
.hero-details { display: inline-flex; align-items: center; min-height: 44px; gap: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.hero-genres { margin-block: 10px; }
.hero-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.series-top { overflow: visible; isolation: isolate; }
.series-top .banner-bg { inset: 0; width: 100%; height: 100%; max-width: 100%; }
.series-top::after { pointer-events: none; z-index: -1; }
.series-top .banner-bg { z-index: -2; }
.series-top:has(.follow-menu[open]) { z-index: 35; }
.series-actions .follow-menu { min-width: 0; }
.series-actions .follow-menu[open] { z-index: 40; }
.series-actions .follow-menu .menu-pop { z-index: 45; max-width: min(280px, calc(100vw - 32px)); max-height: min(370px, 60dvh); overflow-y: auto; }
.series-actions .follow-menu .menu-pop button { min-height: 44px; }
.series-aliases { margin-block: 8px 12px; padding: 0; border: 0; border-radius: 0; color: var(--muted); font-size: 12px; text-align: start; }
.series-aliases summary { min-height: 32px; padding-block: 5px; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.series-aliases dl { display: grid; gap: 7px; margin: 4px 0 8px; }
.series-aliases dl > div { display: grid; grid-template-columns: minmax(90px, 130px) minmax(0, 1fr); gap: 10px; }
.series-aliases dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.series-aliases .series-alias-label { font-size: 11px; }
.series-info .series-genres { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-block: 12px 16px; padding-block: 3px; }
.series-genres::-webkit-scrollbar { display: none; }
.series-genres .chip { flex: none; font-size: 12px; min-height: 38px; padding: 7px 12px; white-space: nowrap; }
.series-main .tl-teaser { gap: 10px; padding: 12px 14px; border-radius: 12px; }
.series-main .tl-teaser b { font-size: 14px; }
.series-main .tl-teaser .muted { font-size: 12px; line-height: 1.4; }
.tl-page .tl-head h1 { font-size: clamp(22px, 3vw, 30px); }
.tl-page .tl-head p { font-size: 13px; }
.tl-col h2 { font-size: 16px; }
.tl-head { gap: 14px; margin-bottom: 16px; }
.tl-fav { gap: 9px; padding: 8px 12px 8px 8px; border-radius: 12px; font-size: 13px; }
.tl-row { min-height: 68px; border-radius: 10px; }
.tl-label { width: 42px; font-size: 20px; }
.tl-items { gap: 5px; padding: 5px; }
.tl-pool { gap: 7px; padding: 10px; border-radius: 12px; }
.tl-char { width: 58px; }
.tl-char img { width: 58px; height: 74px; }
.tl-char i { font-size: 10px; }
.char-portrait { display: block; position: relative; width: 58px; height: 74px; overflow: hidden; border-radius: 9px; flex: none; background: var(--card2); }
.char-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.char-name-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 5px; text-align: center; font-size: 10px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; color: var(--text); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 18%, var(--card2)), color-mix(in srgb, var(--blue) 16%, var(--card))); }
.char-portrait-compact { width: 30px; height: 30px; border-radius: 50%; margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.char-portrait-compact .char-name-fallback { padding: 2px; font-size: 9px; }
.tl-faces .char-portrait img { width: 100%; height: 100%; margin-left: 0; border-radius: inherit; box-shadow: none; }
.tl-char.sel .char-portrait, .tl-char:focus-visible .char-portrait { box-shadow: 0 0 0 3px var(--accent); transform: translateY(-2px); }
.tl-fav .char-portrait { width: 48px; height: 64px; }
.tl-actions .btn { font-size: 13px; }
.cm-home { padding: 20px; border-radius: 16px; }
.cm-home .sec-head { margin-bottom: 12px; }
.cm-home .sec-head h2 { font-size: 18px; }
.cm-preview { padding: 13px; gap: 12px; }
.cm-preview-content b { font-size: 13px; }
.cm-preview-content .muted { font-size: 11px; }
.ct { width: 246px; height: 268px; padding: 14px; gap: 8px; border-radius: 14px; }
.ct-body b { font-size: 15px; }
.ct-body span { font-size: 13px; -webkit-line-clamp: 4; }
.ct-quote .ct-body span { font-size: 17px; -webkit-line-clamp: 6; }
.ct-prompt b { font-size: 18px; }
.ct-prompt > span:not(.btn):not(.ct-prompt-ico) { font-size: 13px; }
.ct-prompt-ico { width: 38px; height: 38px; border-radius: 10px; }
.ct-poll { width: 280px; }
.ct-more { width: 180px; }
.community-nav { gap: 6px; padding-bottom: 14px; margin-bottom: 18px; }
.community-nav a { font-size: 12px; padding-inline: 12px; }
.community-intro { margin-bottom: 18px; }
.community-intro h1 { font-size: clamp(25px, 3.5vw, 32px); }
.community-intro p { font-size: 14px; }
.comm-tile { gap: 10px; padding: 12px; border-radius: 12px; }
.comm-tile b { font-size: 14px; }
.pc-title { font-size: 16px; }
.pc-text.big { font-size: 15px; -webkit-line-clamp: 5; }
.pc-quote .pc-text.big { font-size: clamp(16px, 2vw, 19px); }

@media (max-width: 860px) {
  .hero { min-height: 0; margin-bottom: 16px; }
  .hero-in { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 0; padding-bottom: 58px; }
  .hero-poster { display: block; order: -1; margin-inline: -16px; position: relative; isolation: isolate; background: var(--bg2); }
  .hero-poster img { width: 100%; height: clamp(290px, 76vw, 430px); aspect-ratio: auto; object-fit: cover; object-position: center 23%; border-radius: 0; transform: none; box-shadow: none; }
  .hero-poster::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 12%, transparent 55%), linear-gradient(90deg, color-mix(in srgb, var(--bg) 28%, transparent), transparent 45%, color-mix(in srgb, var(--bg) 28%, transparent)); pointer-events: none; }
  .hero-bg { display: none; }
  .hero-slide::after { background: none; pointer-events: none; }
  .hero-text { position: relative; z-index: 2; max-width: none; padding-top: 20px; }
  .hero-poster + .hero-text, .hero-in:has(.hero-poster) .hero-text { margin-top: -56px; padding-top: 0; }
  .hero-tags { gap: 6px; margin-bottom: 8px; }
  .hero-tags .pill, .hero-tags .kind, .hero-tags .rating { font-size: 10px; }
  .hero-tags .pill .i, .hero-tags .rating .i { width: 12px; height: 12px; }
  .hero h1 { font-size: clamp(24px, 5.6vw, 32px); margin-bottom: 8px; max-width: 26ch; text-wrap: balance; }
  .hero-genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-block: 6px 10px; gap: 12px; }
  .hero-genres .chip { flex: none; border: 0; padding: 3px 0; min-height: 44px; border-radius: 0; font-size: 11px; color: var(--muted); }
  .hero-desc { font-size: 13px; line-height: 1.6; -webkit-line-clamp: 3; margin-bottom: 14px; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 8px; }
  .hero-read { height: 46px; font-size: 13px; border-radius: 11px; }
  .hero-save { width: 46px; height: 46px; border-radius: 11px; }
  .hero-details { grid-column: 1 / -1; justify-self: start; min-height: 44px; font-size: 11px; }
  .hero-dots { bottom: 10px; gap: 4px; justify-content: center; }
  .hero-dots button, .hero-dots button.on { flex: 1; max-width: 58px; }
  .hero-dots button::before { width: 32px; height: 4px; }
  .hero-dots button.on::before { width: 40px; }
  .stack > * + * { margin-top: 30px; }
  .shelf .sec-head { margin-bottom: 11px; }
  .shelf .sec-head h2, .stack > section > .sec-head h2 { font-size: 17px; gap: 6px; }
  .shelf .sec-head h2 .i { width: 16px; height: 16px; }
  .shelf .sec-head p { font-size: 11px; line-height: 1.5; margin-top: 5px; max-width: 50ch; }
  .see-all { font-size: 11px; min-height: 44px; align-items: center; }
  .shelf .row, .shelf .row-wrap > .row { gap: 12px; margin-right: -16px; padding-right: 16px; }
  .shelf .row > .card { width: clamp(144px, 42vw, 190px); }
  .card .poster { border-radius: 9px; }
  .card h3 { font-size: 12px; line-height: 1.45; margin-top: 8px; -webkit-line-clamp: 2; min-height: 35px; }
  .card p { font-size: 10.5px; line-height: 1.45; }
  .card-meta { gap: 2px; }
  .card-save { width: 40px; min-width: 40px; min-height: 44px; }
  .card .poster-tags .kind { font-size: 9px; }
  .card .card-ch, .card .card-rating { font-size: 10px; }
  .fresh b { font-size: 12px; }
  .fresh div .muted, .fresh > a > .sm { font-size: 11px; }
  .cta { padding: 20px; border-radius: 16px; gap: 20px; }
  .cta h2 { font-size: 21px; }
  .cta p { font-size: 13px; }
  .cta-stats { gap: 24px; }
  .cta-stats b { font-size: 23px; }
  .series-head { padding-top: 20px; padding-bottom: 20px; gap: 18px; }
  .series-poster { width: 148px; border-radius: 12px; }
  .series-info { width: 100%; }
  .series-info h1 { font-size: clamp(24px, 5.6vw, 32px); }
  .series-info > p { font-size: 12px; margin-bottom: 8px; }
  .series-info .stats { font-size: 11px; gap: 7px 12px; margin-block: 10px; }
  .series-info .stats .i { width: 14px; height: 14px; }
  .series-info .hero-tags { justify-content: center; font-size: 10px; }
  .series-info .origin-note { font-size: 10px; }
  .series-info .series-genres { margin-block: 9px 13px; }
  .series-genres .chip { min-height: 44px; font-size: 11px; padding: 6px 11px; }
  .series-info .series-actions { max-width: 540px; }
  .series-actions .btn-lg { font-size: 13px; min-height: 46px; height: 46px; }
  .series-actions .btn-ghost:not(.hero-save) { padding-inline: 14px; }
  .series-aliases { margin-block: 4px 8px; }
  .series-aliases summary { font-size: 11px; min-height: 44px; display: list-item; align-content: center; }
  .series-aliases dl > div { grid-template-columns: minmax(80px, 100px) minmax(0, 1fr); }
  .series-main .desc { font-size: 13px; line-height: 1.7; }
  .series-main .tl-teaser { padding: 11px 12px; gap: 8px; }
  .series-main .tl-teaser b { font-size: 13px; }
  .series-main .tl-teaser .muted { font-size: 11px; }
  .an-link > .tl-faces { padding-inline: 10px 0; }
  .tl-faces img { width: 24px; height: 24px; margin-left: -7px; }
  .tl-faces .char-portrait-compact { width: 24px; height: 24px; margin-left: -7px; }
  .tl-page { padding-top: 20px; }
  .tl-head h1 { font-size: 22px; }
  .tl-page .tl-head p { font-size: 12px; }
  .tl-col h2 { font-size: 16px; }
  .tl-grid { gap: 20px; }
  .tl-row { min-height: 60px; }
  .tl-label { width: 34px; font-size: 18px; }
  .tl-char { width: 54px; }
  .tl-char img { width: 54px; height: 70px; }
  .tl-char .char-portrait { width: 54px; height: 70px; }
  .tl-char .char-portrait img { width: 100%; height: 100%; }
  .tl-char i { max-width: 54px; font-size: 9.5px; }
  .tl-pool { gap: 6px; padding: 8px; }
  .tl-fav { font-size: 12px; }
  .cm-home { padding: 14px; border-radius: 14px; }
  .cm-home .sec-head h2 { font-size: 16px; }
  .cm-home .sec-head .see-all { min-height: 44px; }
  .cm-preview-grid { gap: 9px; }
  .cm-preview { padding: 11px; gap: 10px; }
  .cm-preview-content { gap: 8px; }
  .cm-preview-content b { font-size: 13px; }
  .cm-preview-content .muted { font-size: 11px; }
  .cm-home-actions { margin-top: 12px; }
  .cm-home-actions > .btn { font-size: 12px; }
  .ct { width: 70vw; max-width: 270px; height: 256px; }
  .ct-poll { width: 78vw; max-width: 300px; }
  .ct-more { width: 44vw; }
  .community-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 12px; margin-bottom: 16px; }
  .community-nav a { flex: none; min-height: 44px; white-space: nowrap; font-size: 11px; padding: 9px 11px; }
  .community-nav a:last-child:nth-child(odd) { grid-column: auto; }
  .community-intro h1 { font-size: 25px; }
  .community-intro p { font-size: 12px; }
  .comm-tile { padding: 10px; gap: 8px; }
  .comm-tile .muted { font-size: 11px; }
  .pc-title { font-size: 15px; }
  .post-card .md, .pc-text { font-size: 13px; }
  .pc-text.big { font-size: 14px; }
  .pc-quote .pc-text.big { font-size: 16px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 24px; }
  .hero-poster img { height: 290px; }
  .series-info .stats { gap: 6px 9px; }
  .tl-teaser .tl-faces { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-poster img, .card .poster img { transition: none; }
}
