/* Luminare theme styles */
:root {
  --bg: #0B0B0F;
  --bg-2: #09090C;
  --surface: #131318;
  --surface-2: #15151B;
  --surface-3: #1A1A21;
  --line: #24242C;
  --line-2: #2E2E38;
  --text: #F4F4F6;
  --text-2: #D4D4D8;
  --muted: #A1A1AA;
  --faint: #8B8B95;
  --accent: #7C4DFF;
  --accent-2: #A78BFA;
  --accent-soft: #2A1F4D;
  --accent-text: #C4B5FD;
  --accent-text-2: #DDD6FE;
  --manga: #0F766E;
  --ok: #34D399;
  --ok-soft: rgba(16,185,129,0.16);
  --ok-text: #6EE7B7;
  --radius: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-text-2); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(11,11,15,0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #1F1F27; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { color: var(--accent-2); }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.header-search { position: relative; flex: 1 1 240px; max-width: 440px; margin-left: auto; }
.header-search label { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid #2A2A33; color: var(--muted); }
.header-search label:focus-within { border-color: var(--accent); }
.header-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; }
.header-search input::-webkit-search-cancel-button { display: none; }
kbd { font-family: inherit; font-size: 12px; color: var(--muted); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 420px; overflow-y: auto; padding: 6px; border-radius: 14px; background: #17171D; border: 1px solid #2A2A33; box-shadow: 0 20px 48px rgba(0,0,0,0.5); list-style: none; margin: 0; }
.search-results li a, .search-results li > span { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.search-results li a:hover, .search-results li a.is-active { background: var(--accent-soft); }
.search-results img { width: 36px; height: 50px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-3); }
.search-results .sr-type { font-size: 12px; color: var(--muted); font-weight: 500; }
.header-actions { display: flex; gap: 8px; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-lg { height: 52px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6D3DF0; color: #fff; }
.btn-soft { background: #2B2245; color: var(--text); }
.btn-soft:hover { background: #352A57; color: var(--text); }
.btn-glass { background: rgba(255,255,255,0.12); color: var(--text); }
.btn-glass:hover { background: rgba(255,255,255,0.18); color: var(--text); }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255,255,255,0.22); }
.btn-outline:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-ghost { background: transparent; color: var(--accent-text); padding: 0 6px; }
.btn-stack { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }
.btn-stack small { font-size: 12px; font-weight: 500; opacity: 0.85; }
.btn[aria-pressed="true"] svg path { fill: currentColor; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: #45455A; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-lg { height: 44px; padding: 0 18px; font-size: 14px; }
.chip .count { font-size: 12px; opacity: 0.75; }
.chip-remove { background: var(--accent-soft); border-color: transparent; color: var(--accent-text-2); height: 32px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #0F0F14; border: 1px solid var(--line); }
.seg button { height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: #2B2245; color: var(--text); }
.seg.seg-icons button { width: 40px; padding: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: #fff; white-space: nowrap; }
.badge-ln { background: var(--accent); }
.badge-manga { background: var(--manga); }
.badge-wn { background: #B45309; }
.badge-new { background: var(--accent-soft); color: var(--accent-text); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; }
.badge-live { background: var(--ok-soft); color: var(--ok-text); font-size: 12px; letter-spacing: 0; }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }
.tag { display: inline-flex; padding: 4px 9px; border-radius: 6px; background: rgba(255,255,255,0.1); color: #E4E4E7; font-size: 12px; font-weight: 600; text-decoration: none; }
a.tag:hover { background: rgba(255,255,255,0.16); color: #fff; }
.pill-tag { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: #E4E4E7; font-size: 13px; font-weight: 600; text-decoration: none; }
.pill-tag:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ---------- generic ---------- */
.section { margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.section-head .push { margin-left: auto; }
.panel { padding: 22px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.panel h2 { margin: 0; font-size: 17px; font-weight: 800; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 24px; border-radius: 16px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); }
.empty strong { color: var(--text); font-size: 16px; }
.cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #2B2245, #17171D); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .badge { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 3px 7px; }
.cover .time { position: absolute; top: 8px; right: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(11,11,15,0.82); color: var(--text); font-size: 12px; font-weight: 600; }
.cover .fallback-title { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: #1F1F27; border: 1px solid #34343F; color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,0.5); transition: opacity .2s, transform .2s; z-index: 100; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.skeleton { background: linear-gradient(90deg, #15151B 0%, #1E1E26 50%, #15151B 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.data-note { font-size: 12px; color: var(--faint); }

/* ---------- footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid #1F1F27; background: var(--bg-2); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.footer-grid .about { flex: 2 1 260px; display: flex; flex-direction: column; gap: 12px; }
.footer-grid .about p { margin: 0; font-size: 14px; color: var(--muted); max-width: 320px; }
.footer-grid nav { flex: 1 1 140px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid nav span { font-weight: 700; }
.footer-grid nav a { color: var(--muted); text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.footer-base { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--surface-3); font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- home ---------- */
.notice { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.notice .beta { padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.notice .msg { flex: 1 1 300px; color: var(--text-2); }
.notice a { font-weight: 600; text-decoration: none; }
.featured { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.hero { position: relative; overflow: hidden; flex: 999 1 640px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding: 32px; border-radius: 20px; background: #120E1E; border: 1px solid #2B2245; min-height: 390px; }
.hero-bg { position: absolute; inset: -60px; background-size: cover; background-position: center 30%; filter: blur(48px) saturate(1.3); opacity: 0.6; transition: background-image .4s; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,11,24,0.5) 0%, rgba(14,11,24,0.8) 42%, rgba(14,11,24,0.9) 100%); }
.hero-cover { position: relative; flex: none; width: 228px; aspect-ratio: 228 / 324; border-radius: 14px; overflow: hidden; outline: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 48px rgba(0,0,0,0.55); background: #2B2245; }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-info { position: relative; flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hero-info .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-info .meta .when { color: #B4B4BE; font-size: 13px; font-weight: 500; }
.hero-info h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.hero-info .full { margin: 0; font-size: 14px; color: var(--muted); max-width: 620px; }
.hero-info .blurb { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); }
.hero-controls .icon-btn { background: rgba(255,255,255,0.1); color: var(--text); }
.hero-controls .icon-btn:hover { background: rgba(255,255,255,0.18); }
.dots { display: flex; align-items: center; }
.dots button { width: 28px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; padding: 0; }
.dots button span { display: block; height: 8px; width: 8px; border-radius: 999px; background: #4A4060; transition: width .2s, background .2s; }
.dots button[aria-current="true"] span { width: 22px; background: var(--accent-2); }
.popular { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.popular-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.popular ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.popular li a { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); }
.popular li a:hover { background: var(--surface-3); }
.popular .rank { flex: none; width: 28px; text-align: center; font-size: 24px; font-weight: 800; color: var(--faint); line-height: 1; }
.popular li:nth-child(-n+3) .rank { color: var(--accent-2); }
.popular .thumb { flex: none; width: 40px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--surface-3); }
.popular .t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.popular .m { font-size: 12px; color: var(--muted); }
.release-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 20px; }
.release { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.release .title { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 700; line-height: 1.35; min-height: 40px; }
.release .title:hover { color: var(--accent-text-2); }
.ch-links { display: flex; flex-direction: column; gap: 6px; }
.ch-links a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; background: #17171C; color: #E4E4E7; text-decoration: none; font-size: 13px; }
.ch-links a + a { color: #B4B4BE; }
.ch-links a:hover { background: #1F1F27; color: var(--text); }
.view-all-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 3 / 4; border-radius: 12px; border: 1px dashed #34343F; background: #111116; color: var(--text); text-decoration: none; text-align: center; padding: 20px; }
.view-all-tile:hover { border-color: var(--accent); color: var(--text); }
.view-all-tile .circle { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.community { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.community .panel { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.community .panel svg { color: var(--accent-2); }
.community h3 { margin: 0; font-size: 18px; }
.community p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.community .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- series ---------- */
.series-hero { position: relative; overflow: hidden; background: #0E0B18; }
.series-hero .bg { position: absolute; inset: -80px; background-size: cover; background-position: center 30%; filter: blur(56px) saturate(1.3); opacity: 0.55; }
.series-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,11,24,0.55) 0%, rgba(14,11,24,0.82) 60%, var(--bg) 100%); }
.series-hero .container { position: relative; padding-top: 28px; padding-bottom: 48px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #B4B4BE; margin-bottom: 28px; }
.crumbs a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--text); }
.series-top { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.series-cover { flex: none; width: 248px; aspect-ratio: 248 / 352; border-radius: 16px; overflow: hidden; outline: 1px solid rgba(255,255,255,0.12); box-shadow: 0 28px 56px rgba(0,0,0,0.6); background: #2B2245; }
.series-cover img { width: 100%; height: 100%; object-fit: cover; }
.series-info { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.series-info .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.series-info h1 { margin: 0; font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; max-width: 820px; }
.series-info .subtitle { margin: 0; font-size: 18px; line-height: 1.45; color: var(--text-2); max-width: 760px; }
.series-info .byline { margin: 0; font-size: 15px; color: #B4B4BE; }
.series-info .byline a { font-weight: 600; text-decoration: none; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--text-2); }
.stats > span { display: inline-flex; align-items: center; gap: 6px; }
.stats > span > svg { color: var(--accent-2); }
.synopsis { max-width: 760px; display: flex; flex-direction: column; gap: 4px; }
.synopsis p { margin: 0; font-size: 16px; line-height: 1.65; color: #E4E4E7; }
.synopsis.is-clamped p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.series-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.aka { max-width: 760px; font-size: 14px; color: #B4B4BE; }
.aka summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 8px 0; }
.aka div { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 0 16px; }
.series-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 8px; }
.series-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.series-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.chapters-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.field { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid #2A2A33; color: var(--muted); }
.field:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.volume { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.volume > button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.volume > button:hover { background: #17171D; }
.vol-tile { flex: none; width: 48px; height: 64px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: #22222B; color: var(--text-2); }
.vol-tile small { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.vol-tile b { font-size: 22px; }
.volume.is-live .vol-tile { background: var(--accent); color: #fff; }
.vol-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vol-text .name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.vol-text .sub { font-size: 13px; color: var(--muted); }
.vol-status { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; background: #22222B; color: #B4B4BE; }
.volume.is-live .vol-status { background: var(--ok-soft); color: var(--ok-text); }
.chev { flex: none; color: var(--muted); transition: transform .2s; }
.volume.is-open .chev { transform: rotate(180deg); }
.ch-list { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #1F1F27; }
.ch-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.ch-row:hover { background: #1A1A21; color: var(--text); }
.ch-row .kind { flex: none; width: 92px; }
.ch-row .kind span { display: inline-flex; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #22222B; color: var(--text-2); }
.ch-row .kind span.k-ch { background: var(--accent-soft); color: var(--accent-text); }
.ch-row .kind span.k-extra { background: #10302C; color: #5EEAD4; }
.ch-row .ttl { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }
.ch-row .when { flex: none; width: 56px; text-align: right; font-size: 13px; color: var(--muted); }
.ch-row.is-read .ttl { color: var(--muted); }
.ch-row .readmark { flex: none; color: var(--ok); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; font-size: 14px; }
.facts div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.progress-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.progress-list li { display: flex; flex-direction: column; gap: 6px; }
.progress-list .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar > span.is-done { background: var(--ok); }
.bar > span.is-live { background: repeating-linear-gradient(90deg, var(--ok) 0 10px, transparent 10px 16px); }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini-grid a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.35; }
.mini-grid a:hover { color: var(--accent-text-2); }
.comment-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.comment-box textarea { resize: vertical; min-height: 88px; padding: 12px 14px; border-radius: 10px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; }
.rules { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); padding: 0 16px; font-size: 14px; color: var(--text-2); }
.rules summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.rules ul { margin: 0; padding: 0 0 16px 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; color: #B4B4BE; }
.popover { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 280px; padding: 14px; border-radius: 14px; background: #17171D; border: 1px solid #2A2A33; box-shadow: 0 20px 48px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 10px; }
.popover h3 { margin: 0; font-size: 14px; }
.popover .opts { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.popover form { display: flex; gap: 8px; }
.popover input[type=text] { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; }

/* ---------- explore ---------- */
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 36px 0 24px; }
.page-title h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.page-title p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.tabs-pill { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tabs-pill button { height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tabs-pill button:hover { color: #fff; }
.tabs-pill button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.tabs-pill .count { opacity: 0.7; font-weight: 500; margin-left: 4px; }
.explore-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.filters { flex: 1 1 240px; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) { .filters { position: sticky; top: 92px; max-width: 300px; } }
.filters details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 4px 18px 18px; }
.filters summary { cursor: pointer; padding: 14px 0; font-size: 16px; font-weight: 800; }
.filters .label { margin: 18px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.filters .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.request-card { padding: 18px; border-radius: 16px; background: #15121F; border: 1px solid #2B2245; display: flex; flex-direction: column; gap: 10px; }
.request-card strong { font-size: 15px; }
.request-card span { font-size: 13px; line-height: 1.55; color: #B4B4BE; }
.results { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.results-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters .lead { font-size: 13px; color: var(--muted); font-weight: 600; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 18px; }
.s-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
.s-card:hover { color: var(--text); }
.s-card:hover .cover img { transform: scale(1.03); }
.s-card .cover img { transition: transform .25s; }
.s-card .name { font-size: 14px; font-weight: 700; line-height: 1.35; min-height: 38px; }
.s-card .sub { display: flex; flex-direction: column; gap: 3px; margin-top: -4px; font-size: 12px; }
.s-card .sub b { color: var(--text-2); font-weight: 600; }
.s-card .sub span { color: var(--muted); }
.series-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s-row { display: flex; align-items: center; gap: 16px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.s-row:hover { border-color: #3A3058; color: var(--text); }
.s-row img { flex: none; width: 64px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.s-row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.s-row .top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.s-row .nm { font-size: 15px; font-weight: 700; line-height: 1.35; }
.s-row .ex { font-size: 13px; color: var(--muted); }
.s-row .end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 12px; color: var(--muted); }
.s-row .end b { font-size: 13px; color: var(--text-2); }

/* ---------- library ---------- */
.lib-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #1F1F27; }
.lib-tabs button { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.lib-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.lib-tabs .n { padding: 2px 7px; border-radius: 999px; font-size: 12px; background: var(--surface-3); color: var(--muted); }
.lib-tabs button[aria-selected="true"] .n { background: var(--accent-soft); color: var(--accent-text-2); }
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lib-tools .left { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .bm-grid { grid-template-columns: 1fr; } }
.bm { display: flex; gap: 16px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.bm .act .btn span { min-width: 0; }
@media (max-width: 420px) { .bm { gap: 12px; padding: 12px; } .bm .c { width: 76px; height: 108px; } }
.bm .c { flex: none; width: 96px; height: 136px; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: block; }
.bm .c img { width: 100%; height: 100%; object-fit: cover; }
.bm .b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bm .nm { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); text-decoration: none; }
.bm .nm:hover { color: var(--accent-text-2); }
.bm .lr { font-size: 13px; color: var(--muted); }
.bm .st { align-self: flex-start; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text-2); }
.bm .st.is-done { background: var(--ok-soft); color: var(--ok-text); }
.bm .st.is-idle { background: #22222B; color: #B4B4BE; }
.bm .prog { display: flex; align-items: center; gap: 10px; }
.bm .prog .bar { flex: 1; }
.bm .prog b { flex: none; min-width: 38px; text-align: right; font-size: 12px; color: var(--text-2); }
.bm .act { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.bm .act .btn { flex: 1; min-width: 0; height: 40px; font-size: 13px; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; }
.bm .act .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line-2); color: var(--muted); }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.rl { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.rl .fan { position: relative; height: 150px; }
.rl .fan img { position: absolute; width: 94px; height: 132px; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,0.5); background: var(--surface-3); }
.rl .fan img:nth-child(1) { left: 0; top: 10px; transform: rotate(-9deg); z-index: 3; }
.rl .fan img:nth-child(2) { left: 60px; top: 6px; transform: rotate(-2deg); z-index: 2; }
.rl .fan img:nth-child(3) { left: 116px; top: 14px; transform: rotate(8deg); z-index: 1; opacity: 0.85; }
.rl .fan .none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; }
.rl .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rl .hd b { font-size: 17px; }
.rl .mt { font-size: 13px; color: var(--muted); margin-top: -8px; }
.rl .titles { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rl .titles a { text-decoration: none; }
.rl-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px; border-radius: 16px; border: 1px dashed #34343F; padding: 18px; text-align: center; }
.rl-new form { display: flex; gap: 8px; width: 100%; max-width: 280px; }
.rl-new input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; }
.hist { display: flex; flex-direction: column; gap: 24px; max-width: 880px; }
.hist h2 { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.hist section { display: flex; flex-direction: column; gap: 8px; }
.h-row { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.h-row:hover { border-color: #3A3058; color: var(--text); }
.h-row img { flex: none; width: 44px; height: 62px; object-fit: cover; border-radius: 6px; background: var(--surface-3); }
.h-row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.h-row .mid b { font-size: 15px; }
.h-row .mid span { font-size: 13px; color: var(--muted); }
.h-row .tm { flex: none; font-size: 13px; color: var(--muted); }
.h-row .go { flex: none; display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; background: #22222B; font-size: 13px; font-weight: 700; }
.local-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 20px; gap: 20px; }
  .hero-cover { width: 150px; }
  .hero-info h1 { font-size: 30px; }
  .series-cover { width: 170px; }
  .series-info h1 { font-size: 30px; }
  .page-title h1 { font-size: 30px; }
  .ch-row .kind { width: 78px; }
  .ch-row .when { display: none; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .s-row .end { display: none; }
}

/* ---------- WordPress additions ---------- */
body.luminare { margin: 0; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header .custom-logo, .site-header .brand img { height: 40px; width: auto; display: block; }
.account { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; max-width: 200px; }
.account:hover { color: var(--text); border-color: var(--line-2); }
.account .avatar { width: 36px; height: 36px; border-radius: 999px; }
.btn-square { width: 52px; padding: 0; }
.btn-sm { height: 40px; font-size: 13px; align-self: flex-start; }
.btn-quiet { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-quiet:hover { color: var(--text); border-color: #45455A; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.btn-stack .row { display: inline-flex; align-items: center; gap: 8px; }
.btn-stack small { max-width: 240px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-strong { font-size: 14px; font-weight: 600; text-decoration: none; }
.small { font-size: 13px; }
.strong { font-weight: 600; color: var(--text-2); }
.strong-15 { font-size: 15px; font-weight: 600; }
.stack-12, .stack-14, .stack-18 { display: flex; flex-direction: column; }
.stack-12 { gap: 12px; } .stack-14 { gap: 14px; } .stack-18 { gap: 18px; }
.h-row-base { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.h-row-base h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.crumb-current { max-width: 50vw; }
.more-row { display: flex; justify-content: center; padding-top: 12px; }
.badge-status { background: #22222B; color: #B4B4BE; letter-spacing: 0; font-size: 12px; }
.pop-wrap { position: relative; display: inline-flex; }
.toast a { color: var(--accent-text); margin-left: 8px; font-weight: 700; }
.toast.is-on { pointer-events: auto; }

/* hero carousel: each slide is its own layout */
.hero { display: block; padding: 0; gap: 0; }
.hero .slide { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding: 32px 32px 84px; min-height: 390px; }
.hero .slide[hidden] { display: none; }
.hero .slide > .hero-cover, .hero .slide > .hero-info { position: relative; }
.hero-info h2 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.hero-info h2 a { color: inherit; text-decoration: none; }
.hero-info h2 a:hover { color: var(--accent-text-2); }
.hero-controls { position: absolute; left: 296px; right: 32px; bottom: 20px; margin: 0; z-index: 2; }
.hero-actions .btn-primary { max-width: 100%; }

/* popular */
.popular-head { align-items: center; flex-wrap: wrap; }
.popular-head h2 { font-size: 20px; }
.popular-head .seg button { height: 34px; padding: 0 10px; font-size: 12px; }
.popular .txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.popular ol[hidden] { display: none; }

/* explore cards: one markup, two layouts */
.s-card .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.s-card .body .top, .s-card .body .ex { display: none; }
.series-grid.is-list { grid-template-columns: 1fr; gap: 8px; }
.series-grid.is-list .s-card { flex-direction: row; align-items: center; gap: 16px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.series-grid.is-list .s-card:hover { border-color: #3A3058; }
.series-grid.is-list .s-card .cover { flex: none; width: 64px; border-radius: 8px; }
.series-grid.is-list .s-card .cover .badge { display: none; }
.series-grid.is-list .s-card .body { gap: 6px; flex: 1; }
.series-grid.is-list .s-card .body .top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.series-grid.is-list .s-card .body .top .badge { font-size: 10px; padding: 3px 7px; }
.series-grid.is-list .s-card .body .ex { display: -webkit-box; font-size: 13px; color: var(--muted); }
.series-grid.is-list .s-card .name { min-height: 0; font-size: 15px; }
.series-grid.is-list .s-card .sub { margin-top: 0; }
.series-grid.is-list .s-card .sub .gl { display: none; }
.s-card[hidden] { display: none !important; }

/* series page */
.synopsis .text p { margin: 0 0 0.7em; font-size: 16px; line-height: 1.65; color: #E4E4E7; }
.synopsis .text p:last-child { margin-bottom: 0; }
.synopsis.is-clamped .text { max-height: calc(1.65em * 3 + 2px); overflow: hidden; font-size: 16px; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.ch-row .lock { flex: none; color: var(--muted); display: inline-flex; }
.ch-list[hidden], .ch-list li[hidden] { display: none; }
.volume[hidden] { display: none; }
.cover-sm { border-radius: 8px; }
.series-info .byline .strong { color: var(--text-2); }

@media (max-width: 720px) {
  .hero .slide { padding: 20px 20px 76px; gap: 20px; min-height: 0; }
  .hero-info h2 { font-size: 28px; }
  .hero-controls { left: 20px; right: 20px; bottom: 14px; }
  .account span { display: none; }
  .account { padding: 0 4px; }
}

/* the series header clips its blurred backdrop, not its popovers */
.series-hero { overflow: visible; }
.series-hero .bg-clip { position: absolute; inset: 0; overflow: hidden; }
.series-hero .container { z-index: 2; }
/* ---------- reader ---------- */
body.page-reader { --r-bg: #0E0E12; --r-text: #E4E4E7; --r-bar: rgba(14,14,18,0.92); --r-line: #22222B; --r-panel: #17171D; --r-panel-line: #2A2A33; --r-card: #15151B; --r-card-line: #24242C; --r-note: #17132A; --r-note-line: #2B2245; --r-note-text: #DDD6FE; --r-btn: #22222B; --r-btn-text: #F4F4F6; --r-muted: #A1A1AA; --r-accent: #C4B5FD; --r-on: #2B2245; background: var(--r-bg); color: var(--r-text); transition: background .2s, color .2s; }
body.page-reader[data-theme="sepia"] { --r-bg: #F4ECD8; --r-text: #3B2F1E; --r-bar: rgba(244,236,216,0.94); --r-line: #E2D6B8; --r-panel: #FBF6EA; --r-panel-line: #E2D6B8; --r-card: #EFE5CC; --r-card-line: #E2D6B8; --r-note: #EFE5CC; --r-note-line: #DCCDA8; --r-note-text: #3B2F1E; --r-btn: #EADFC4; --r-btn-text: #3B2F1E; --r-muted: #6B5B43; --r-accent: #6D28D9; --r-on: #E6D9B8; color-scheme: light; }
body.page-reader[data-theme="light"] { --r-bg: #FAFAF9; --r-text: #1F1F23; --r-bar: rgba(250,250,249,0.94); --r-line: #E7E5E4; --r-panel: #FFFFFF; --r-panel-line: #E7E5E4; --r-card: #F5F5F4; --r-card-line: #E7E5E4; --r-note: #F5F3FF; --r-note-line: #DDD6FE; --r-note-text: #3B0764; --r-btn: #F0EFEE; --r-btn-text: #1F1F23; --r-muted: #57534E; --r-accent: #6D28D9; --r-on: #EDE9FE; color-scheme: light; }
.r-bar { position: sticky; top: 0; z-index: 40; background: var(--r-bar); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--r-line); color: var(--r-text); transition: transform .25s; }
.r-bar.is-hidden { transform: translateY(-100%); }
.r-bar .inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 8px; }
.r-bar .back { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 700; }
.r-bar .mid { flex: 2 1 0; min-width: 0; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.r-bar .mid small { font-size: 12px; font-weight: 600; color: var(--r-muted); }
.r-bar .mid b { font-size: 14px; }
.r-bar .tools { flex: 1 1 0; display: flex; justify-content: flex-end; gap: 4px; }
.r-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--r-text); cursor: pointer; font: inherit; font-size: 16px; font-weight: 800; text-decoration: none; }
.r-icon:hover { background: var(--r-btn); color: var(--r-text); }
.r-icon[aria-pressed="true"], .r-icon[aria-expanded="true"] { background: var(--r-on); }
.r-icon[aria-pressed="true"] svg path { fill: currentColor; }
.r-icon[data-scroll][aria-pressed="true"] svg path { fill: none; }
.r-progress { height: 3px; }
.r-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.r-panel { position: absolute; top: 68px; width: 340px; max-width: calc(100% - 32px); padding: 18px; border-radius: 16px; background: var(--r-panel); border: 1px solid var(--r-panel-line); box-shadow: 0 20px 48px rgba(0,0,0,0.35); display: flex; flex-direction: column; gap: 18px; color: var(--r-text); }
.r-panel.right { right: 16px; }
.r-panel.left { left: 16px; gap: 4px; padding: 14px; max-height: 70vh; overflow-y: auto; }
.r-panel .lbl { font-size: 12px; font-weight: 700; color: var(--r-muted); }
.r-panel .grp { display: flex; flex-direction: column; gap: 8px; }
.r-panel .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r-panel .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.r-opt { height: 40px; border: 2px solid transparent; border-radius: 10px; background: var(--r-btn); color: var(--r-btn-text); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.r-opt[aria-pressed="true"] { background: var(--accent); color: #fff; }
.r-theme { height: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; font-size: 12px; }
.r-theme[aria-pressed="true"] { background: var(--r-btn); color: var(--r-btn-text); border-color: var(--accent); }
.r-theme i { width: 28px; height: 28px; border-radius: 999px; border: 1px solid rgba(128,128,128,0.4); }
.r-size { display: flex; align-items: center; gap: 8px; }
.r-size b { flex: 1; text-align: center; font-size: 14px; }
.r-size .r-opt { width: 48px; }
.r-ch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 14px; }
.r-ch:hover { background: var(--r-btn); color: inherit; }
.r-ch[aria-current="page"] { background: var(--r-on); }
.r-ch small { flex: none; width: 74px; font-size: 12px; font-weight: 700; color: var(--r-muted); }
.r-ch span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.r-ch .ok { flex: none; color: var(--ok); }
.r-vols { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 10px; }
.r-vols button { height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--r-btn); color: var(--r-btn-text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.r-vols button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.r-main { padding: 56px 20px 0; }
.r-article { margin: 0 auto; }
.r-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 32px; margin-bottom: 36px; border-bottom: 1px solid var(--r-line); }
.r-head .vol { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--r-accent); }
.r-head h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.r-head p { margin: 0; font-size: 14px; color: var(--r-muted); }
.r-head p a { color: inherit; }
.r-text { line-height: 1.85; }
.r-text p { margin: 0 0 1.1em; }
.r-text .sample { font-family: var(--font); font-size: 13px; font-weight: 700; padding: 10px 14px; border-radius: 10px; background: var(--r-card); border: 1px dashed var(--r-card-line); color: var(--r-muted); line-height: 1.5; }
.r-text .break { text-align: center; margin: 1.8em 0; letter-spacing: 0.6em; color: var(--r-muted); }
.tl-note { margin: 1.6em 0; padding: 16px 18px; border-radius: 12px; background: var(--r-note, #17132A); border: 1px solid var(--r-note-line, #2B2245); color: var(--r-note-text, #DDD6FE); font-family: var(--font); font-size: 0.82em; line-height: 1.6; }
.tl-note strong { display: block; margin-bottom: 4px; font-size: 0.8em; letter-spacing: 0.04em; text-transform: uppercase; }
.r-end { margin-top: 56px; display: flex; align-items: center; gap: 16px; color: var(--r-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.r-end::before, .r-end::after { content: ""; flex: 1; height: 1px; background: var(--r-line); }
.r-nav { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.r-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: var(--r-card); border: 1px solid var(--r-card-line); color: inherit; text-decoration: none; }
a.r-card:hover { border-color: var(--accent); color: inherit; }
.r-card small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--r-muted); letter-spacing: 0.04em; }
.r-card b { font-size: 16px; }
.r-card.next { align-items: flex-end; text-align: right; }
.r-foot { margin: 28px 0 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--r-card); border: 1px solid var(--r-card-line); }
.r-foot a { font-weight: 700; text-decoration: none; color: var(--r-accent); }


/* ---------- reader: WordPress additions ---------- */
body.page-reader { margin: 0; }
.r-panel-head { display: flex; align-items: center; justify-content: space-between; }
.r-panel-head b { font-size: 15px; }
.r-icon-sm { width: 36px; height: 36px; }
.r-opt.serif { font-family: 'Literata', Georgia, serif; font-size: 14px; }
.r-opt.big { font-size: 17px; }
.r-vol-list { display: flex; flex-direction: column; gap: 2px; }
.r-vol-list[hidden] { display: none; }
.r-ch.all { color: var(--r-accent); font-weight: 700; }
.r-ch small:empty { display: none; }
.r-back { margin: 28px 0 80px; text-align: center; }
.r-back a { font-weight: 700; text-decoration: none; color: var(--r-accent); }
.r-text img { max-width: 100%; height: auto; border-radius: 8px; }
.r-text figure { margin: 1.4em 0; }
.r-locked { margin: 12px 0 0; gap: 10px; }
.r-locked .btn { align-self: flex-start; margin-top: 6px; }
.r-nav .r-card .btn { align-self: flex-start; margin-top: 6px; }
/* manga: pages stacked edge to edge, whatever block markup the chapter uses */
.r-pages { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0 -20px; }
.r-pages figure, .r-pages .wp-block-gallery, .r-pages .wp-block-image, .r-pages p { margin: 0 !important; padding: 0; width: 100% !important; display: block !important; flex: none !important; }
.r-pages .wp-block-gallery { display: flex !important; flex-direction: column; gap: 0 !important; }
.r-pages img { display: block; width: 100% !important; height: auto !important; max-width: 100%; margin: 0 auto; border-radius: 0; object-fit: contain !important; }
.r-pages figcaption { display: none; }
body.page-reader.is-manga .r-head { margin-bottom: 24px; }
body.page-reader .comments { margin-top: 48px; color: var(--r-text); }
body.page-reader .comments .rules, body.page-reader .comment-box, body.page-reader .comment-list .comment-body { background: var(--r-card); border-color: var(--r-card-line); color: var(--r-text); }
body.page-reader .comment-box textarea { background: var(--r-bg); border-color: var(--r-card-line); color: var(--r-text); }
body.page-reader .muted, body.page-reader .comment-metadata a { color: var(--r-muted); }

/* ---------- standalone theme additions ---------- */
.header-actions { display: flex; gap: 8px; }
@media (max-width: 520px) { .hide-sm { display: none; } }
.stack-20, .stack-24 { display: flex; flex-direction: column; }
.stack-20 { gap: 20px; } .stack-24 { gap: 24px; }
.ch-row .readmark { display: none; flex: none; color: var(--ok); }
li.is-read .readmark { display: inline-flex; }
li.is-read .ch-row .ttl { color: var(--muted); }
.lib-signin { max-width: 640px; margin: 8px auto 0; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.lib-signin .circle, .rl-new .circle { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.rl-new .circle { width: 48px; height: 48px; }
.lib-signin h2 { margin: 0; font-size: 24px; }
.lib-signin p { margin: 0; color: #B4B4BE; }
.lib-signin ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; max-width: 420px; }
.lib-signin li { display: flex; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.lib-signin li b { color: var(--accent-2); }
.lib-signin .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.hist-tools { display: flex; justify-content: flex-end; }
.h-row .img { flex: none; width: 44px; height: 62px; border-radius: 6px; background: var(--surface-3); }
.bm[hidden] { display: none; }
.rl-new form .btn { flex: none; }

/* comments */
.comments { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.comment-box { margin: 0; }
.comment-box .comment-reply-title { margin: 0 0 4px; font-size: 15px; }
.comment-box .comment-reply-title small { margin-left: 8px; font-size: 13px; }
.comment-box p { margin: 0; }
.comment-box textarea { width: 100%; box-sizing: border-box; }
.comment-box .form-submit { display: flex; justify-content: flex-end; }
.comment-box input[type=text], .comment-box input[type=email], .comment-box input[type=url] { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; box-sizing: border-box; }
.comment-box label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.comment-form-cookies-consent label { display: inline; }
.must-log-in { margin: 0; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.comment-list .children { margin: 10px 0 0 28px; }
.comment-list .comment-body { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.comment-list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-list .comment-author .avatar { border-radius: 999px; }
.comment-list .says { display: none; }
.comment-list .comment-metadata { font-size: 12px; margin: 4px 0 6px 50px; }
.comment-list .comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-list .comment-content p { margin: 0 0 .6em; }
.comment-list .reply a { font-size: 13px; font-weight: 700; text-decoration: none; }
.no-comments { margin: 0; padding: 20px 0; text-align: center; }

/* pages, announcements, posts */
.prose-page { padding-bottom: 20px; }
.prose-article { max-width: 760px; }
.prose-article .crumbs { margin: 28px 0 0; }
.prose-thumb img { width: 100%; height: auto; border-radius: 16px; margin-bottom: 24px; }
.prose { font-size: 16px; line-height: 1.75; color: #E4E4E7; }
.prose h2, .prose h3 { line-height: 1.3; margin: 1.6em 0 .6em; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose a { text-decoration: underline; }
.post-list { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.post-row { display: flex; gap: 16px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.post-row:hover { border-color: #3A3058; color: var(--text); }
.pr-thumb { flex: none; width: 88px; height: 66px; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--accent-2); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-body b { font-size: 16px; }
.pager .nav-links { display: flex; gap: 8px; margin-top: 20px; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); }
.footer-base a { color: var(--muted); text-decoration: none; }

/* reader bar on phones: icon-only back button, more room for the chapter title */
@media (max-width: 560px) {
  .r-bar .inner { gap: 4px; padding: 0 8px; }
  .r-bar .back { flex: 0 0 auto; width: 40px; justify-content: center; }
  .r-bar .back span { display: none; }
  .r-bar .tools { flex: 0 0 auto; gap: 0; }
  .r-icon { width: 40px; }
  .r-panel.left, .r-panel.right { left: 8px; right: 8px; width: auto; max-width: none; }
}

/* =====================================================================
   Motion & interaction
   One easing curve and three speeds everywhere, hover lifts only on real
   pointers, and everything calms down with prefers-reduced-motion.
   ===================================================================== */
:root {
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-med: 220ms;
  --t-slow: 420ms;
  --lift: 0 10px 28px rgba(0, 0, 0, 0.45);
  --glow: 0 8px 24px rgba(124, 77, 255, 0.35);
}

/* page-to-page: cross-fade, and covers morph between a card and its series page */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 340ms; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
.site-header { view-transition-name: site-header; }
.r-bar { view-transition-name: reader-bar; }

/* --- base transitions ------------------------------------------------- */
a, button, .btn, .chip, .icon-btn, .r-icon, .r-opt, .pill-tag, .tag, .nav a, .seg button, .tabs-pill button, .lib-tabs button,
.header-search label, .field, .account, .ch-row, .vol-head, .h-row, .post-row, .popular li a, .search-results a, .r-ch, .r-card, .panel, .view-all-tile {
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.cover img, .thumb, .bm .c img, .rl .fan img, .h-row img, .mini-grid img, .hero-cover img, .series-cover img, .pr-thumb img {
  transition: transform var(--t-slow) var(--ease), filter var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}

/* --- press feedback (all devices) ------------------------------------- */
.btn:active, .chip:active, .icon-btn:active, .r-icon:active, .r-opt:active, .seg button:active, .tabs-pill button:active, .dots button:active span {
  transform: scale(0.96);
  transition-duration: 80ms;
}

/* --- hover (mouse / trackpad only, so phones don't get stuck states) --- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn-primary:hover { box-shadow: var(--glow); }
  .btn-glass:hover, .btn-outline:hover, .btn-soft:hover, .btn-quiet:hover { box-shadow: var(--lift); }
  .icon-btn:hover svg, .r-icon:hover svg { transform: scale(1.08); }
  .icon-btn svg, .r-icon svg { transition: transform var(--t-med) var(--ease); }
  .chip:hover { background: rgba(124, 77, 255, 0.10); border-color: rgba(167, 139, 250, 0.5); }
  .chip[aria-pressed="true"]:hover { background: #6D3DF0; }
  .pill-tag:hover, a.tag:hover { transform: translateY(-1px); border-color: rgba(167, 139, 250, 0.6); }
  .nav a:hover { background: var(--surface-3); }
  .account:hover { border-color: rgba(167, 139, 250, 0.5); }

  /* cards: lift, cover zoom, title tint */
  .release .cover, .s-card .cover, .mini-grid .cover { transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
  .release:hover .cover, .s-card:hover .cover, .mini-grid a:hover .cover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(167, 139, 250, 0.35); }
  .release:hover .cover img, .s-card:hover .cover img, .mini-grid a:hover img { transform: scale(1.05); }
  .release .title, .s-card .name { transition: color var(--t-fast) var(--ease); }
  .release:hover .title, .s-card:hover .name { color: var(--accent-text-2); }
  .series-grid.is-list .s-card:hover { transform: translateX(3px); }
  .series-grid.is-list .s-card:hover .cover { transform: none; box-shadow: none; }
  .ch-links a:hover { transform: translateX(3px); }

  .popular li a:hover { transform: translateX(3px); }
  .popular li a:hover .thumb { transform: scale(1.08) rotate(-2deg); }
  .popular li a:hover .rank { color: var(--accent-2); }
  .popular .rank { transition: color var(--t-fast) var(--ease); }

  .view-all-tile:hover { border-color: var(--accent); background: #15121F; }
  .view-all-tile .circle { transition: transform var(--t-med) var(--ease), background var(--t-med) var(--ease); }
  .view-all-tile:hover .circle { transform: scale(1.08); background: var(--accent); color: #fff; }
  .view-all-tile .circle svg { transition: transform var(--t-med) var(--ease); }
  .view-all-tile:hover .circle svg { transform: translateX(3px); }

  .community .panel:hover, .series-side .panel:hover { border-color: #34344A; transform: translateY(-2px); }

  .hero-cover:hover img { transform: scale(1.04); }
  .hero-info h2 a { transition: color var(--t-fast) var(--ease); }

  .volume > button:hover .vol-tile { transform: scale(1.05); }
  .vol-tile { transition: transform var(--t-med) var(--ease), background var(--t-med) var(--ease); }
  .ch-row:hover { background: #1A1A21; }
  .ch-row .ttl { transition: transform var(--t-med) var(--ease), color var(--t-fast) var(--ease); }
  .ch-row:hover .ttl { transform: translateX(4px); color: var(--text); }

  .bm { transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
  .bm:hover { border-color: #34344A; transform: translateY(-2px); box-shadow: var(--lift); }
  .bm:hover .c img { transform: scale(1.05); }
  .rl { transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
  .rl:hover { border-color: #34344A; transform: translateY(-2px); }
  .rl:hover .fan img:nth-child(1) { transform: rotate(-13deg) translateX(-6px); }
  .rl:hover .fan img:nth-child(2) { transform: rotate(-2deg) translateY(-6px); }
  .rl:hover .fan img:nth-child(3) { transform: rotate(13deg) translateX(10px); }
  .h-row:hover, .post-row:hover { transform: translateX(3px); }
  .h-row .go { transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .h-row:hover .go { background: var(--accent); color: #fff; }

  .r-card:is(a):hover { transform: translateY(-2px); box-shadow: var(--lift); }
  .r-ch:hover span { transform: translateX(3px); }
  .r-ch span { transition: transform var(--t-med) var(--ease); }
  .footer-grid nav a:hover { transform: translateX(2px); }
}

/* --- focus: same ring everywhere -------------------------------------- */
.header-search label:focus-within, .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.18); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* --- header gains depth once you scroll -------------------------------- */
.site-header { transition: background-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
.site-header.is-scrolled { background: rgba(11, 11, 15, 0.82); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); border-bottom-color: transparent; }

/* --- hero carousel: crossfade, staggered text, slow drift, progress dots --- */
.hero { display: grid; }
.hero .slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease-in-out), visibility 0s linear 600ms; }
.hero .slide.is-active { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease-in-out), visibility 0s; z-index: 1; }
.hero .slide .hero-bg { transform: scale(1.12); transition: transform 9s linear; }
.hero .slide.is-active .hero-bg { transform: scale(1.02); }
.hero .slide .hero-cover { transform: translateY(14px) scale(0.98); opacity: 0; transition: transform 700ms var(--ease) 80ms, opacity 500ms var(--ease) 80ms; }
.hero .slide.is-active .hero-cover { transform: none; opacity: 1; }
.hero .slide .hero-info > * { transform: translateY(12px); opacity: 0; transition: transform 600ms var(--ease), opacity 500ms var(--ease); }
.hero .slide.is-active .hero-info > * { transform: none; opacity: 1; }
.hero .slide.is-active .hero-info > *:nth-child(1) { transition-delay: 120ms; }
.hero .slide.is-active .hero-info > *:nth-child(2) { transition-delay: 170ms; }
.hero .slide.is-active .hero-info > *:nth-child(3) { transition-delay: 220ms; }
.hero .slide.is-active .hero-info > *:nth-child(4) { transition-delay: 270ms; }
.hero .slide.is-active .hero-info > *:nth-child(5) { transition-delay: 320ms; }
.hero-controls { z-index: 3; }
.dots button span { position: relative; overflow: hidden; transition: width 300ms var(--ease), background 300ms var(--ease); }
.dots button[aria-current="true"] span { background: #4A4060; }
.dots button[aria-current="true"] span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent-2); transform-origin: left; transform: scaleX(1); }
.hero.is-playing .dots button[aria-current="true"] span::after { animation: lum-dot var(--slide-ms, 7000ms) linear forwards; }
.hero.is-paused .dots button[aria-current="true"] span::after { animation-play-state: paused; }
@keyframes lum-dot { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: hover) and (pointer: fine) { .dots button:hover span { background: #6B5A92; } }

/* --- accordion: volumes open and close smoothly ------------------------- */
.ch-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease); }
.volume.is-open .ch-wrap { grid-template-rows: 1fr; }
.ch-inner { overflow: hidden; min-height: 0; }
.ch-inner .ch-list { opacity: 0; transform: translateY(-6px); transition: opacity 240ms var(--ease), transform 320ms var(--ease); }
.volume.is-open .ch-inner .ch-list { opacity: 1; transform: none; }
.chev { transition: transform 320ms var(--ease); }

/* --- panels, popovers and menus pop in -------------------------------- */
.search-results:not([hidden]), .popover:not([hidden]), .r-panel:not([hidden]) { animation: lum-pop-in 200ms var(--ease) both; transform-origin: top center; }
.r-panel.right:not([hidden]) { transform-origin: top right; }
.r-panel.left:not([hidden]) { transform-origin: top left; }
@keyframes lum-pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.notice[hidden] { display: none; }
.notice.is-leaving { animation: lum-leave 220ms var(--ease) forwards; }
@keyframes lum-leave { to { opacity: 0; transform: translateY(-8px); } }

/* --- lists that change: cards and rows ease in -------------------------- */
[role="tabpanel"]:not([hidden]) { animation: lum-fade 160ms ease-out both; }
@keyframes lum-fade { from { opacity: 0; } to { opacity: 1; } }

/* --- images fade in instead of popping (only ones still loading when the page appears) --- */
img.lum-wait { opacity: 0; }
img.lum-in { opacity: 1; transition: opacity 420ms var(--ease); }

/* --- tab underline slides between tabs --------------------------------- */
.lib-tabs { position: relative; }
.lib-tabs .lum-ink { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: transform 320ms var(--ease), width 320ms var(--ease); }
.lib-tabs.has-ink button[aria-selected="true"] { border-bottom-color: transparent; }

/* --- reader ------------------------------------------------------------- */
body.page-reader { transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.r-progress span { transition: width 120ms linear; }
.r-text { transition: font-size var(--t-med) var(--ease); }
.r-article { transition: max-width 320ms var(--ease); }

/* --- calm everything down when the reader asks for it ------------------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .hero .slide .hero-bg { transform: none !important; }
}

/* =====================================================================
   Reader v2: settings panel, themes, dock, manga modes, eye care
   ===================================================================== */
body.page-reader[data-theme="light"] { --r-bg: #F3EDE2; --r-text: #231C15; --r-bar: rgba(243,237,226,0.94); --r-line: #E2D8C6; --r-panel: #FFFAF1; --r-panel-line: #E2D8C6; --r-card: #FFFAF1; --r-card-line: #E5DCCB; --r-note: #F8F1E6; --r-note-line: #E2D2B8; --r-note-text: #2C1D10; --r-btn: #EFE6D6; --r-btn-text: #231C15; --r-muted: #73685D; --r-accent: #6D28D9; --r-on: #E6DAC4; color-scheme: light; }
body.page-reader[data-theme="sepia"] { --r-bg: #EADFC6; --r-text: #433321; --r-bar: rgba(234,223,198,0.94); --r-line: #D9C9A6; --r-panel: #F8EEDB; --r-panel-line: #D9C9A6; --r-card: #F1E4CB; --r-card-line: #D9C9A6; --r-note: #F1E4CB; --r-note-line: #D2BE96; --r-note-text: #2C1D10; --r-btn: #E2D3B3; --r-btn-text: #433321; --r-muted: #7B6752; --r-accent: #7C3AED; --r-on: #DCCAA4; color-scheme: light; }
body.page-reader[data-theme="purple"] { --r-bg: #1B1532; --r-text: #F3EEFF; --r-bar: rgba(27,21,50,0.92); --r-line: #2E2552; --r-panel: #241C44; --r-panel-line: #3A2F66; --r-card: #2B214F; --r-card-line: #3A2F66; --r-note: #2B214F; --r-note-line: #4A3B80; --r-note-text: #E9E2FF; --r-btn: #36285F; --r-btn-text: #F3EEFF; --r-muted: #C0B4E0; --r-accent: #C4B5FD; --r-on: #45357A; }
body.page-reader[data-theme="midnight"] { --r-bg: #08141F; --r-text: #EBF4FF; --r-bar: rgba(8,20,31,0.92); --r-line: #17293A; --r-panel: #0F1E2C; --r-panel-line: #20374C; --r-card: #132433; --r-card-line: #20374C; --r-note: #132433; --r-note-line: #2A4762; --r-note-text: #DCEBFF; --r-btn: #1B3143; --r-btn-text: #EBF4FF; --r-muted: #9EB1C3; --r-accent: #93C5FD; --r-on: #24425A; }
body.page-reader[data-theme="forest"] { --r-bg: #0F1B16; --r-text: #EDF7F2; --r-bar: rgba(15,27,22,0.92); --r-line: #1E3129; --r-panel: #142520; --r-panel-line: #26403A; --r-card: #182823; --r-card-line: #26403A; --r-note: #182823; --r-note-line: #2F4F45; --r-note-text: #DDF2E8; --r-btn: #21352D; --r-btn-text: #EDF7F2; --r-muted: #9BB3A8; --r-accent: #86EFAC; --r-on: #2A4A3E; }

/* text settings come from CSS variables set by reader.js */
.r-text { font-family: var(--r-font, 'Literata', Georgia, serif); font-size: var(--r-size, 19px); line-height: var(--r-line, 1.85); text-align: var(--r-align, left); }
.r-text p { margin: 0 0 var(--r-para, 1.1em); }
body[data-protect="1"] .r-text, body[data-protect="1"] .r-pages { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.r-promo { margin: -18px 0 28px; font-size: 13px; font-weight: 600; color: var(--r-muted); }
.r-promo a { color: var(--r-accent); text-decoration: none; }

/* toolbar + dock */
.r-bar { transition: transform 220ms ease; }
body.r-chrome-hidden .r-bar { transform: translateY(-100%); }
.r-icon[disabled] { opacity: 0.35; cursor: default; }
.r-icon[disabled]:hover { background: transparent; }
.r-aa { font-size: 15px; letter-spacing: -0.02em; }
.r-dock { display: none; }
@media (max-width: 720px) {
  .r-bar .r-tools { display: none; }
  .r-bar .mid { text-align: left; }
  .r-dock { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--r-bar); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--r-line); transition: transform 220ms ease; }
  .r-dock .r-icon { width: 46px; height: 44px; }
  body.r-chrome-hidden .r-dock { transform: translateY(110%); }
  body.page-reader .r-main { padding-bottom: 72px; }
}

/* progress bar position */
.r-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 46; height: 3px; pointer-events: none; }
body[data-bar="bottom"] .r-progress { top: auto; bottom: 0; }
body[data-bar="off"] .r-progress { display: none; }
@media (max-width: 720px) { body[data-bar="bottom"]:not(.r-chrome-hidden) .r-progress { bottom: calc(57px + env(safe-area-inset-bottom)); } }

/* eye care */
.r-eye { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; background: rgba(0,0,0,var(--eye, 0)); transition: opacity 200ms; }
.r-eye[data-c="warm"] { background: rgba(255,138,30,calc(var(--eye, 0) * 0.5)); mix-blend-mode: multiply; }

/* panels */
.r-panel { position: fixed; z-index: 60; top: 72px; max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain; }
.r-panel.right { right: 16px; width: 400px; }
.r-panel.left { left: 16px; width: 360px; }
.r-settings { gap: 14px; padding: 16px; }
.r-head-tools { display: flex; align-items: center; gap: 4px; }
.r-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 8px; border-radius: 8px; color: var(--r-accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.r-link:hover { background: var(--r-btn); }
.r-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--r-btn); }
.r-tabs button { height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--r-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.r-tabs button[aria-selected="true"] { background: var(--r-panel); color: var(--r-text); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.r-tabpanel { display: flex; flex-direction: column; gap: 16px; }
.r-tabpanel[hidden], .r-settings [hidden] { display: none !important; }
.r-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 6px; }
.r-seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; }
.r-seg-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: row; }
.r-seg .r-opt { min-width: 0; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; }
.r-themes .r-theme { height: auto; flex-direction: column; padding: 10px 4px; }
.r-fonts { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; max-height: 236px; overflow-y: auto; padding-right: 2px; }
.r-fonts .r-font { height: 64px; flex-direction: column; gap: 2px; }
.r-fonts .r-font b { font-size: 22px; font-weight: 500; line-height: 1; }
.r-fonts .r-font span { font-size: 11px; font-weight: 600; opacity: 0.85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.r-fonts .r-font[aria-pressed="true"] { background: var(--r-btn); color: var(--r-btn-text); border-color: var(--accent); }
.r-custom-font { display: flex; gap: 6px; }
.r-custom-font input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--r-panel-line); background: var(--r-bg); color: var(--r-text); font: inherit; font-size: 13px; }
.r-custom-font .r-opt { height: 38px; padding: 0 14px; }
.r-hint { margin: 0; font-size: 12px; color: var(--r-muted); line-height: 1.5; }
.r-range { display: flex; align-items: center; gap: 10px; }
.r-range input { flex: 1; accent-color: var(--accent); }
.r-range output { flex: none; min-width: 52px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--r-text); }
.r-keys { display: flex; flex-direction: column; gap: 6px; }
.r-key { display: flex; align-items: center; gap: 8px; }
.r-key span { flex: 1; font-size: 13px; font-weight: 600; }
.r-key .r-opt { min-width: 104px; height: 34px; padding: 0 10px; font-size: 12px; color: var(--r-muted); }
.r-key .r-opt.is-set { color: var(--r-btn-text); }
.r-key .r-opt.is-listening { border-color: var(--accent); color: var(--r-text); }
@media (max-width: 720px) {
  .r-panel, .r-panel.left, .r-panel.right { top: auto; left: 8px; right: 8px; width: auto; bottom: calc(66px + env(safe-area-inset-bottom)); max-height: 72vh; max-height: 72dvh; }
}

/* manga */
.r-pages .r-pg-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--r-gap, 0); }
.r-pages .r-pg { width: 100%; display: flex; justify-content: center; }
.r-pages .r-pg img { display: block; width: 100% !important; height: auto !important; max-width: 100%; }
.r-pages.is-paged { margin: 0 auto; cursor: pointer; }
.r-pages.is-paged .r-pg-wrap { flex-direction: row; justify-content: center; align-items: flex-start; gap: 0; }
body[data-dir="rtl"] .r-pages.is-paged .r-pg-wrap { flex-direction: row-reverse; }
.r-pages.is-paged .r-pg { display: none; width: auto; flex: 0 1 auto; }
.r-pages.is-paged .r-pg.is-on { display: flex; }
body[data-fit="height"] .r-pages.is-paged .r-pg img { width: auto !important; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
body[data-fit="width"] .r-pages.is-paged .r-pg { flex: 1 1 0; }
body[data-fit="width"] .r-pages.is-paged .r-pg img { width: 100% !important; }
body[data-fit="original"] .r-pages.is-paged { overflow-x: auto; }
body[data-fit="original"] .r-pages.is-paged .r-pg img { width: auto !important; max-width: none; }
body[data-mode="double"][data-fit="height"] .r-pages.is-paged .r-pg img { max-width: 50vw; }
.r-pageno { position: fixed; z-index: 44; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: var(--r-bar); border: 1px solid var(--r-line); color: var(--r-text); font-size: 12.5px; font-weight: 700; pointer-events: none; }
@media (max-width: 720px) { body:not(.r-chrome-hidden) .r-pageno { bottom: calc(70px + env(safe-area-inset-bottom)); } }

/* report + resume */
.r-report-row { margin: 18px 0 0; text-align: center; }
.r-report-row .r-link { color: var(--r-muted); }
.r-dialog { width: min(440px, calc(100vw - 32px)); padding: 18px; border-radius: 16px; border: 1px solid var(--r-panel-line, #2A2A33); background: var(--r-panel, #17171D); color: var(--r-text, #F4F4F6); box-shadow: 0 24px 64px rgba(0,0,0,0.5); }
.r-dialog::backdrop { background: rgba(0,0,0,0.55); }
.r-dialog form { display: flex; flex-direction: column; gap: 14px; }
.r-field { display: flex; flex-direction: column; gap: 6px; }
.r-field .lbl { font-size: 12px; font-weight: 700; color: var(--r-muted); }
.r-field select, .r-field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--r-panel-line); background: var(--r-bg); color: var(--r-text); font: inherit; font-size: 14px; }
.r-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.r-report-msg { margin: 0; font-size: 13px; color: #FCA5A5; }
.r-resume { position: fixed; z-index: 47; left: 50%; top: 80px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--r-panel); border: 1px solid var(--r-panel-line); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.r-resume .btn { height: 38px; }
.r-resume[hidden] { display: none; }

/* =====================================================================
   Comments v2
   ===================================================================== */
.comments { --c-card: var(--surface); --c-line: var(--line); --c-text: var(--text); --c-muted: var(--muted); --c-input: #0F0F14; --c-btn: #22222B; }
body.page-reader .comments { --c-card: var(--r-card); --c-line: var(--r-card-line); --c-text: var(--r-text); --c-muted: var(--r-muted); --c-input: var(--r-bg); --c-btn: var(--r-btn); font-family: var(--font); }
.comments .rules { background: var(--c-card); border-color: var(--c-line); color: var(--c-text); }
.comments .rules summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.comments .rules ul { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--c-muted); }
.c-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--c-card); border: 1px solid var(--c-line); }
.c-form-top { display: flex; gap: 12px; align-items: flex-start; }
.c-avatar { flex: none; border-radius: 999px; background: var(--c-btn); }
.c-input { flex: 1; min-width: 0; }
.c-form textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 10px; background: var(--c-input); border: 1px solid var(--c-line); color: var(--c-text); font: inherit; font-size: 14.5px; line-height: 1.55; box-sizing: border-box; }
.c-form textarea:focus { outline: none; border-color: var(--accent); }
.c-preview { min-height: 84px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--c-line); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.c-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-tool-btns { display: flex; gap: 4px; margin-right: auto; }
.c-tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--c-btn); color: var(--c-text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.c-tool[aria-pressed="true"] { background: var(--accent); color: #fff; }
.c-words { font-size: 12px; color: var(--c-muted); }
.c-tools .btn-sm { height: 36px; align-self: auto; }
.c-media-row { display: flex; gap: 6px; }
.c-media-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 8px; background: var(--c-input); border: 1px solid var(--c-line); color: var(--c-text); font: inherit; font-size: 13px; }
.c-media-row .btn { height: 36px; }
.c-error { margin: 0; font-size: 13px; color: #FCA5A5; }
.c-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--c-card); border: 1px solid var(--c-line); color: var(--c-text); font-weight: 600; }
.c-login-btns { display: flex; gap: 8px; }
.c-sort { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--c-card); border: 1px solid var(--c-line); align-self: flex-start; }
.c-sort button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--c-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.c-sort button[aria-pressed="true"] { background: var(--c-btn); color: var(--c-text); }
.c-sort[hidden] { display: none; }
.c-list, .c-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.c-list { gap: 10px; }
.c-list > .c-item { padding: 14px; border-radius: 14px; background: var(--c-card); border: 1px solid var(--c-line); }
.c-item.is-target { border-color: var(--accent); }
.c-item[hidden] { display: none; }
.c-row { display: flex; gap: 12px; align-items: flex-start; }
.c-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.c-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.c-name { font-size: 14px; color: var(--c-text); }
.c-staff { padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.c-time { color: var(--c-muted); text-decoration: none; }
.c-pending { color: #FCD34D; font-weight: 700; font-size: 12px; }
.c-body { font-size: 14.5px; line-height: 1.6; color: var(--c-text); overflow-wrap: anywhere; }
.c-body a { color: var(--accent-text, #C4B5FD); }
.c-media { display: block; max-width: min(320px, 100%); max-height: 320px; margin: 6px 0; border-radius: 10px; }
.spoiler { padding: 0 3px; border-radius: 4px; background: var(--c-muted); color: transparent; cursor: pointer; transition: background .15s, color .15s; }
.spoiler .c-media { filter: blur(24px); }
.spoiler.is-shown { background: rgba(127,127,127,0.18); color: inherit; }
.spoiler.is-shown .c-media { filter: none; }
.c-actions { display: flex; gap: 4px; margin-top: 2px; }
.c-act { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; margin-left: -8px; border: 0; border-radius: 8px; background: transparent; color: var(--c-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.c-act + .c-act { margin-left: 0; }
.c-act:hover { background: var(--c-btn); color: var(--c-text); }
.c-like[aria-pressed="true"] { color: #F472B6; }
.c-like[aria-pressed="true"] svg path { fill: currentColor; }
.c-replies { gap: 12px; margin: 12px 0 0 52px; }
.c-replies:empty { display: none; }
.c-more-replies { margin: 8px 0 0 52px; border: 0; background: none; padding: 4px 0; color: var(--accent-text, #C4B5FD); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.c-form.is-reply { margin-top: 8px; padding: 10px; }
.c-form.is-reply .c-avatar { display: none; }
.c-load { align-self: center; }
.c-load[hidden] { display: none; }
.c-rules-dlg { width: min(480px, calc(100vw - 32px)); padding: 22px; border-radius: 18px; border: 1px solid #2A2A33; background: #17171D; color: #F4F4F6; }
.c-rules-dlg::backdrop { background: rgba(0,0,0,0.6); }
.c-rules-dlg h3 { margin: 0 0 12px; font-size: 18px; }
.c-rules-dlg ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #D4D4D8; }
.c-rules-warn { margin: 14px 0 16px; font-size: 13px; font-weight: 700; color: #FCA5A5; }
.c-rules-dlg .btn { width: 100%; }
.c-rules-dlg .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 520px) { .c-replies, .c-more-replies { margin-left: 20px; } .c-row { gap: 10px; } }

/* =====================================================================
   Ratings, tags, misc series
   ===================================================================== */
.stars { position: relative; display: inline-flex; gap: 1px; color: rgba(255,255,255,0.22); line-height: 0; }
.stars svg path { fill: currentColor; stroke: none; }
.stars .on { position: absolute; left: 0; top: 0; bottom: 0; display: inline-flex; gap: 1px; width: var(--pct, 0%); overflow: hidden; color: #FBBF24; }
.stars .on svg, .stars > svg { flex: none; }
.rate-btn .stars { color: rgba(255,255,255,0.22); }
.rate-btn .stars .on { color: #FBBF24; }
.rate-wrap { position: relative; }
.rate-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 8px; margin-left: -8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.rate-btn:hover { background: rgba(255,255,255,0.08); }
.rate-btn .rate-cta { padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.rate-pop { width: auto; min-width: 240px; }
.rate-stars { display: flex; gap: 2px; }
.rate-stars button { width: 42px; height: 42px; border: 0; border-radius: 8px; background: transparent; color: #4A4A55; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rate-stars button svg path { fill: currentColor; stroke: none; }
.rate-stars button.is-on, .rate-stars button.is-hover { color: #FBBF24; }
.rate-stars:hover button.is-on:not(.is-hover) { color: #4A4A55; }
.s-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: #FCD34D; }
.s-rating svg path { fill: currentColor; stroke: none; }
.tag-row-sm { gap: 6px; }
.pill-tag-sm { padding: 4px 10px; font-size: 12px; background: transparent; color: var(--muted); }
.pill-tag-sm:hover { color: var(--text); }

/* =====================================================================
   Explore filters v2, home extras, library, header extras, settings
   ===================================================================== */
.chip-search { width: 100%; height: 36px; margin: 0 0 12px; padding: 0 12px; border-radius: 10px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 13px; }
.chip-search:focus { outline: none; border-color: var(--accent); }
.filters .chips .chip[hidden] { display: none; }
.chips-scroll { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.match-row { display: flex; flex-direction: column; gap: 8px; }
.match-row .label { margin: 16px 0 0; }
.seg-sm button { height: 32px; padding: 0 12px; font-size: 12.5px; }
.select-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.select-field .label { margin: 4px 0 0 !important; }
.select-field select { height: 40px; padding: 0 10px; border-radius: 10px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; }
.icon-btn-line { border: 1px solid var(--line-2); }
#reverse[aria-pressed="true"] svg { transform: rotate(180deg); }
#reverse svg { transition: transform 200ms var(--ease); }
.series-grid.is-list .s-rating { margin-left: 8px; }

/* home: recommended row */
.rec-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 170px); gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rec { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; scroll-snap-align: start; }
.rec[hidden] { display: none; }
.rec .cover { width: 100%; }
.rec .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-t { font-size: 14px; font-weight: 700; line-height: 1.35; }
.rec-ch { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.rec:hover .rec-t { color: var(--accent-text-2); }

/* home: latest releases as a list */
.release-grid.is-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.release-grid.is-list .release { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto 1fr; gap: 4px 14px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.release-grid.is-list .release .cover { grid-row: 1 / 3; width: 72px; border-radius: 8px; }
.release-grid.is-list .release .cover .badge, .release-grid.is-list .release .cover .time { display: none; }
.release-grid.is-list .release .title { min-height: 0; font-size: 14px; }
.release-grid.is-list .release .ch-links { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.release-grid.is-list .release .ch-links a { min-height: 32px; font-size: 12.5px; }
.release-grid.is-list .view-all-tile { aspect-ratio: auto; min-height: 96px; flex-direction: row; }
@media (max-width: 420px) { .release-grid.is-list { grid-template-columns: 1fr; } }

/* home: announcements */
.news-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.news-card:hover { border-color: #3A3058; color: var(--text); }
.news-img { display: block; aspect-ratio: 16 / 8; background: var(--surface-3); }
.news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-txt { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.news-txt small { font-size: 12px; font-weight: 700; color: var(--accent-text); letter-spacing: 0.03em; }
.news-txt b { font-size: 16px; }
.news-txt .muted { font-size: 13.5px; }

/* library extras */
.lib-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lib-right .btn-sm { align-self: auto; height: 40px; }
.bm-grid.is-list { grid-template-columns: 1fr; gap: 10px; }
.bm-grid.is-list .bm { padding: 10px; gap: 14px; align-items: center; }
.bm-grid.is-list .bm .c { width: 56px; height: 78px; }
.bm-grid.is-list .bm .b { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; grid-template-areas: "nm prog act" "lr st act"; gap: 4px 16px; align-items: center; flex: 1; min-width: 0; }
.bm-grid.is-list .bm .nm { grid-area: nm; -webkit-line-clamp: 1; }
.bm-grid.is-list .bm .lr { grid-area: lr; }
.bm-grid.is-list .bm .st { grid-area: st; align-self: center; justify-self: start; }
.bm-grid.is-list .bm .prog { grid-area: prog; }
.bm-grid.is-list .bm .act { grid-area: act; margin: 0; }
@media (max-width: 720px) { .bm-grid.is-list .bm .b { grid-template-columns: 1fr; grid-template-areas: "nm" "lr" "prog" "act"; } .bm-grid.is-list .bm .st { display: none; } }
.h-item { position: relative; display: flex; align-items: center; gap: 6px; }
.h-item .h-row { flex: 1; min-width: 0; }
.h-del { flex: none; color: var(--muted); }
.h-del:hover { color: var(--text); background: var(--surface-2); }

/* header extras */
.account-wrap { position: relative; }
.account { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.account svg { flex: none; color: var(--muted); }
.account-menu { left: auto; right: 0; width: 220px; padding: 6px; gap: 2px; }
.account-menu a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.account-menu a:hover { background: var(--surface-3); color: var(--text); }
.account-menu a svg { color: var(--muted); }
.to-top { position: fixed; z-index: 35; right: 20px; bottom: 24px; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid #3A3058; background: #1B1530; color: var(--accent-text); box-shadow: 0 10px 28px rgba(0,0,0,0.45); cursor: pointer; }
.to-top:hover { background: #251C42; color: #fff; }
.to-top[hidden] { display: none; }
.search-results .sr-head { padding: 10px 8px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.search-results .sr-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.search-results .sr-chips .chip { height: 30px; font-size: 12.5px; padding: 0 10px; }

/* settings page */
.settings-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.settings-nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.settings-nav button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.settings-nav button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.settings-panels { flex: 999 1 480px; min-width: 0; }
.settings-panels .panel h2 { margin: 6px 0 0; font-size: 17px; }
.settings-panels .panel h2:first-child { margin-top: 0; }
@media (max-width: 720px) { .settings-nav { flex-direction: row; max-width: none; flex-basis: 100%; overflow-x: auto; } }
.avatar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.avatar-big { width: 96px; height: 96px; border-radius: 999px; object-fit: cover; background: var(--surface-3); }
.avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.avatar-actions small { flex-basis: 100%; }
.avatar-actions label.btn { cursor: pointer; }
.avatar-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; max-width: 520px; }
.avatar-presets button { padding: 0; border: 2px solid transparent; border-radius: 999px; background: none; cursor: pointer; line-height: 0; }
.avatar-presets button[aria-pressed="true"] { border-color: var(--accent); }
.avatar-presets img { width: 100%; height: auto; border-radius: 999px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input, .form-field input { flex: 1 1 220px; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; background: #0F0F14; border: 1px solid #2A2A33; color: var(--text); font: inherit; font-size: 14px; }
.inline-form .btn-sm, .stack-12 > .btn-sm { align-self: auto; height: 42px; }
.form-field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.form-field span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.pref-rows { display: flex; flex-direction: column; gap: 10px; }
.pref-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pref-row:last-child { border-bottom: 0; }
.pref-row > span { font-size: 14px; font-weight: 600; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.row-wrap .btn-sm { align-self: auto; }
.oauth-btns { display: flex; flex-direction: column; gap: 8px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-radius: 10px; border: 1px solid #2A2A33; background: #0F0F14; color: var(--text); text-decoration: none; font-weight: 600; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }

/* ---------- header layout: one row on desktop, search on its own row below ~1180px ---------- */
.site-header .container { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "brand nav search actions"; align-items: center; gap: 12px 20px; }
.site-header .brand { grid-area: brand; min-width: 0; }
.site-header .nav { grid-area: nav; }
.site-header .header-search { grid-area: search; justify-self: end; width: 100%; max-width: 440px; margin: 0; }
.site-header .account-wrap, .site-header .header-actions { grid-area: actions; justify-self: end; }
@media (max-width: 1180px) {
  .site-header .container { grid-template-areas: "brand nav . actions" "search search search search"; }
  .site-header .header-search { max-width: none; justify-self: stretch; }
}
@media (max-width: 860px) {
  .site-header .hide-sm { display: none; }
}
@media (max-width: 720px) {
  .site-header { position: relative; }
  .admin-bar .site-header { top: 0; }
  .site-header .container { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "nav nav" "search search"; gap: 10px 12px; padding-top: 10px; padding-bottom: 12px; }
  .site-header .brand { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-header .nav { margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
  .site-header .nav a { height: 38px; padding: 0 10px; }
}

/* ---------- header brand: logo / site icon / name ---------- */
.brand { min-width: 0; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; }
.site-header .brand .custom-logo { height: 36px; width: auto; max-width: 220px; object-fit: contain; flex: none; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- series banner: the cover, lightly blurred, cropped at the focus point set in the editor ---------- */
.series-hero .bg { inset: -12px; filter: blur(4px) saturate(1.15); opacity: 0.6; }
.series-hero .shade { background: linear-gradient(180deg, rgba(14,11,24,0.25) 0%, rgba(14,11,24,0.6) 42%, rgba(14,11,24,0.88) 72%, var(--bg) 100%); }

/* ---------- reader: blank lines kept as written ---------- */
.r-text p.r-sp { margin: 0; }
.r-text.hide-sp p.r-sp { display: none; }
