@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --bg: #f4f6f8;
  --bg-elev: #ffffff;
  --ink: #1a2332;
  --muted: #5c6b7a;
  --line: #d7dee6;
  --brand: #1e3a5f;
  --brand-2: #2d5a87;
  --accent: #c45c26;
  --num-1: #e74c3c;
  --num-2: #e67e22;
  --num-3: #f1c40f;
  --radius: 6px;
  --page-w: 1100px;
  --font: "Source Serif 4", "Libre Baskerville", Georgia, "Times New Roman", serif;
  --ui: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap,
.wrap.header-inner,
.wrap.footer-inner,
.wrap.home-page {
  width: var(--page-w);
  max-width: calc(100% - 2rem);
  margin-left: auto;
  margin-right: auto;
}

/* —— PC header: logo + nav + search + account (single bar) —— */
.site-header {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 58px;
  padding: .45rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none !important;
}
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}
.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.nav-link, .nav-btn {
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: .5rem .85rem;
  cursor: pointer;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-link:hover, .nav-btn:hover, .nav-item.open .nav-btn {
  background: rgba(255,255,255,.12);
  text-decoration: none;
}
.nav-item { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: .4rem;
  z-index: 50;
}
.nav-item.open .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: .5rem .7rem;
  color: var(--ink);
  border-radius: 4px;
}
.dropdown a:hover { background: #eef3f8; text-decoration: none; }

.search-form {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}
.header-search {
  width: 240px;
  margin-left: auto;
}
.header-search input {
  border: 0;
  background: #fff;
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .45rem .7rem;
  font: inherit;
}
.search-form button, .btn {
  border: 0;
  border-radius: var(--radius);
  padding: .5rem .85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.search-form button {
  background: var(--accent);
  color: #fff;
}
.search-form.wide { width: 100%; margin: 1rem 0; }

.account-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.account-nav .nav-link {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-nav .btn-sm {
  white-space: nowrap;
  padding: .35rem .7rem;
  background: var(--accent);
  color: #fff;
}

.site-main { padding: 1rem 0 3rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0;
  color: var(--muted);
  font-size: .9rem;
  background: #eef1f4;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.footer-left { max-width: 58%; min-width: 0; }
.footer-brand-name {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: .35rem;
}
.footer-copy { margin: 0; line-height: 1.55; }
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  flex-shrink: 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .25rem .15rem;
  margin: 0;
}
.footer-links a { color: var(--ink); }
.footer-links .sep { color: var(--muted); margin: 0 .2rem; }
.footer-friends {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem .75rem;
}

.home-page {
  /* hooks only */
}
.wrap.home-page {
  /* width locked by shared .wrap rule above */
}
.home-search {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0 .35rem;
}
.search-hero {
  display: flex;
  width: min(640px, 100%);
  gap: 0;
}
.search-hero input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: .85rem 1.25rem;
  font: inherit;
  font-size: 1.05rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(30, 58, 95, .08);
}
.search-hero button {
  border: 0;
  border-radius: 0 999px 999px 0;
  padding: .85rem 1.5rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand-2);
  color: #fff;
  flex-shrink: 0;
}
.search-hero button:hover { background: var(--brand); }

.home-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0 1.25rem;
  width: 100%;
}
.home-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: var(--brand-2);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 6px;
  text-decoration: none !important;
}
.home-tile:hover {
  background: var(--brand);
  text-decoration: none !important;
}

.home-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
  width: 100%;
}
.board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem 1rem 1rem;
  min-width: 0;
  box-sizing: border-box;
}
.board-title {
  margin: 0 0 .75rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--brand-2);
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--brand);
  display: inline-block;
}
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid #eef2f6;
}
.board-list li:last-child { border-bottom: 0; }
.board-num {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: #95a5a6;
}
.board-list li:nth-child(1) .board-num { background: var(--num-1); }
.board-list li:nth-child(2) .board-num { background: var(--num-2); }
.board-list li:nth-child(3) .board-num { background: var(--num-3); color: #333; }
.board-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}
.board-name:hover { color: var(--brand-2); }
.board-tag { color: var(--muted); font-size: .78rem; white-space: nowrap; }

.update-section {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.update-section .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .35rem;
}
.update-section .section-head .board-title { margin-bottom: .45rem; }
.update-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.update-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .9rem;
}
.update-table th,
.update-table td {
  padding: .5rem .35rem;
  border-bottom: 1px dashed var(--line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-table th { color: var(--muted); font-size: .78rem; font-weight: 600; }
.update-table .col-book { width: 28%; }
.update-table .col-chapter { width: 42%; }
.update-table .col-author { width: 16%; color: var(--muted); }
.update-table .col-time { width: 14%; color: var(--muted); }
.update-table a { color: var(--brand-2); }
.update-table a:hover { text-decoration: underline; }

.ad-slot { margin: 0 0 1rem; width: 100%; box-sizing: border-box; }

.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;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); }

.section { margin-bottom: 2rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .85rem;
}
.section-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.uc-item { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.uc-item-main { min-width: 0; }
.btn-remove {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  line-height: 1.4;
  padding: .1rem .15rem;
}
.btn-remove:hover { color: #b42318; }
.mail-item {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  border-bottom: 1px dotted var(--line);
}
.mail-item .mail-row { border-bottom: 0; flex: 1; min-width: 0; }
.mail-item .btn-remove { margin-top: .85rem; }

/* Public member profile */
.privacy-fieldset {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.privacy-fieldset legend {
  font-weight: 600;
  padding: 0 .35rem;
}
.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: .55rem 0;
  font-weight: 500;
}
.privacy-check input { margin-top: .2rem; }
.member-hero { margin-bottom: 1rem; }
.member-hero-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.member-name { margin: 0 0 .2rem; font-family: var(--font); }
.member-bio {
  margin: .85rem 0 0;
  white-space: pre-wrap;
  line-height: 1.55;
  max-width: 42rem;
}
.member-facts { margin: .65rem 0 0; }
.member-private-banner {
  margin: .65rem 0 0;
  padding: .55rem .75rem;
  background: rgba(180, 83, 9, .08);
  border-left: 3px solid #b45309;
  color: var(--ink);
  font-size: .9rem;
}
.member-locked {
  margin: .85rem 0 0;
  color: var(--muted);
}
.member-shelf { margin-top: 1rem; }
.member-book-list {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
}
.member-book-list li {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  align-items: baseline;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}
.member-book-list a { font-weight: 600; }
.member-thanks {
  margin: .75rem 0 0;
  font-weight: 600;
  color: var(--brand, #1d4ed8);
}
.supporter-badge {
  display: inline-block;
  margin-left: .45rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.supporter-badge.supporter-patron {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #8b5cf6;
}
.user-avatar-wrap.is-supporter .user-avatar,
.user-avatar-wrap.is-supporter .user-avatar-ph {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f59e0b;
}
.perk-list {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
}
.perk-list li {
  padding: .65rem 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.perk-list li:last-child { border-bottom: 0; }
.user-layout .main-col .auth-form {
  max-width: 36rem;
}
@media (max-width: 640px) {
  .member-hero-row { flex-direction: column; }
  .user-layout .main-col .auth-form { max-width: none; }
}
.section-head h1, .section-head h2, .panel-title, .novel-title {
  font-family: var(--font);
  margin: 0;
}
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.panel-title {
  font-size: 1.05rem;
  margin-bottom: .85rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.book-card {
  min-width: 0;
}
.book-card h2,
.book-card-title {
  font-size: .95rem;
  margin: .45rem 0 .15rem;
  font-family: var(--font);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-height: calc(1.3em * 2);
}
.book-card-title a {
  color: inherit;
  text-decoration: none;
}
.book-card-title a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.book-card-meta {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  min-width: 0;
  margin: 0;
}
.book-card-author {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-card-sep {
  flex: 0 0 auto;
  opacity: .7;
}
.book-card-status {
  flex: 0 0 auto;
  white-space: nowrap;
}
.cover {
  display: block;
  aspect-ratio: 3/4;
  background: #d9e2ec;
  border-radius: 6px;
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-ph, .cover-lg .cover-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font);
  font-size: 2rem;
  color: var(--brand);
  background: linear-gradient(145deg, #e8eef5, #cfdceb);
}
.cover-lg {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  background: #d9e2ec;
}
.cover-lg img { width: 100%; height: 100%; object-fit: cover; }

.meta { color: var(--muted); font-size: .85rem; margin: 0; }
.empty { color: var(--muted); font-style: italic; }

.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
}
.detail-layout { grid-template-columns: 1fr 300px; }
@media (max-width: 860px) {
  .two-col, .detail-layout { grid-template-columns: 1fr; }
}

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: flex;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.rank-list .num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  background: #95a5a6;
  flex-shrink: 0;
}
.rank-list li:nth-child(1) .num { background: var(--num-1); }
.rank-list li:nth-child(2) .num { background: var(--num-2); }
.rank-list li:nth-child(3) .num { background: var(--num-3); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }

.novel-hero { display: flex; gap: 1.25rem; }
@media (max-width: 640px) {
  .novel-hero { flex-direction: column; }
}
.info-list { list-style: none; padding: 0; margin: .75rem 0; }
.info-list li { padding: .25rem 0; }
.info-list span {
  display: inline-block;
  min-width: 7rem;
  color: var(--muted);
}
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }
.tag, .chip {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #e8eef5;
  color: var(--brand);
  font-size: .8rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1.25rem; }
.chip { border: 1px solid var(--line); }
.chip.active, a.chip:hover { background: var(--brand); color: #fff; text-decoration: none; }
.tags-inline { font-style: italic; }

.action-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: #eef2f6; color: var(--ink); }
.btn-action { background: var(--brand); color: #fff; }
.btn.disabled { opacity: .45; pointer-events: none; }
.cta-row { display: flex; gap: .6rem; flex-wrap: wrap; }

.synopsis { margin-top: 1.25rem; }
.prose { font-size: 1rem; }
.prose-page .prose h2 {
  margin: 1.35rem 0 .55rem;
  font-size: 1.15rem;
  color: var(--brand);
}
.prose-page .prose ul,
.prose-page .prose ol {
  margin: .4rem 0 1rem;
  padding-left: 1.25rem;
}
.prose-page .prose li { margin: .25rem 0; }
.prose-page .prose p { margin: 0 0 .85rem; line-height: 1.65; }
.page-subnav a { margin-right: .85rem; }
.page-subnav a.is-active { font-weight: 700; color: var(--brand); }
.chapter-body,
.rd-flow {
  font-family: var(--font);
  font-size: 1.12rem;
  line-height: 1.8;
  max-width: none;
  margin: 0;
}
.chapter-text-box {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem 1.25rem;
  box-sizing: border-box;
}
.chapter-text-box .chapter-body,
.chapter-text-box .rd-flow {
  margin: 0;
  padding-top: 0;
}
.xb-row {
  margin: 0 0 .95em;
}
.xb-cell { display: block; }
.xb-txt { display: block; }
.xb-gap {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
}
.chapter-box-toolbar { display: none; }
.chapter-page-status-line {
  margin: 1rem 0 0;
  text-align: center;
  font-size: .92rem;
}
.chapter-box-footer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: .4rem;
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}
.chapter-box-footer .chapter-footer-btn {
  flex: 0 1 auto;
  white-space: nowrap;
  font-size: .85rem;
  padding: .45rem .75rem;
  border-radius: 4px;
  min-height: 0;
  text-align: center;
}
.chapter-box-footer .btn-action.chapter-footer-btn {
  color: #fff;
}
.chapter-page-nav { display: none; }
.chapter-page-status {
  color: var(--muted);
  font-size: .92rem;
  white-space: nowrap;
}
.chapter-panel {
  position: relative;
  padding-top: 1.35rem;
}
.chapter-hero {
  text-align: center;
  margin: 0 0 1.1rem;
  padding: .25rem 0 .95rem;
  max-width: none;
  width: 100%;
  position: relative;
}
.chapter-hero-tools { display: none; }
.chapter-book-title {
  font-family: var(--font);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  margin: .2rem 0 .35rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--brand);
}
.chapter-sub {
  margin: 0 0 .85rem;
  color: var(--muted);
  font-size: 1rem;
}
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  width: 100%;
}
.chapter-nav-top {
  margin: 0;
  padding: 0;
  border: 0;
}
.chapter-nav-bottom {
  margin: 0 0 1rem;
  padding: .85rem 0 0;
  border-top: 1px solid var(--line);
  max-width: none;
}
.chapter-toc-btn {
  min-width: 2.5rem;
  font-size: 1.05rem;
  padding-left: .65rem;
  padding-right: .65rem;
}
.chapter-actions-br { display: none; }
.ad-slot-mid {
  display: block;
  clear: both;
  margin: 1.5rem 0;
  padding: .75rem 0;
  text-align: center;
}
.read-section {
  width: 100%;
  max-width: none;
  margin: 0 0 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.read-section-title {
  margin: 0 0 .85rem;
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--brand);
}
.read-comments-note { margin: -.35rem 0 .85rem; }
.read-comments-login { margin: .75rem 0 0; }
.read-rec-text-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fff;
}
.read-rec-text-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  min-width: 0;
  padding: .55rem .75rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
.read-rec-text-item:nth-child(3n) { border-right: 0; }
.read-rec-text-item:nth-last-child(-n+3) { border-bottom: 0; }
.read-rec-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #222;
  text-decoration: none;
  font-size: .92rem;
}
.read-rec-title:hover { color: var(--brand); text-decoration: underline; }
.read-rec-author {
  flex: 0 1 38%;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: .85rem;
  text-align: right;
}
/* legacy cover cards kept for other pages */
.read-rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1rem;
}
.read-rec-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
}
.read-rec-cover {
  display: block;
  width: 72px;
  height: 96px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8eef5;
  flex-shrink: 0;
}
.read-rec-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.read-rec-cover .cover-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  color: var(--brand);
}
.read-rec-meta h3 {
  margin: 0 0 .2rem;
  font-size: .95rem;
  line-height: 1.3;
}
.read-rec-meta h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-rec-intro {
  margin: .25rem 0 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chapter-feedback {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.25rem 0 .75rem;
}
.btn-report {
  background: #e8783a;
  color: #fff !important;
  border: 0;
  padding: .65rem 1.25rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-report:hover { filter: brightness(1.05); }
.btn-comments {
  background: #5b9fd4;
  color: #fff !important;
  border: 0;
  padding: .65rem 1.25rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
}
.btn-comments:hover { filter: brightness(1.05); }
.chapter-box-toolbar .btn-report,
.chapter-box-toolbar .btn-comments,
.chapter-box-footer .btn-report,
.chapter-box-footer .btn-comments {
  padding: .35rem .7rem;
  font-size: .8rem;
  border-radius: 4px;
}
.chapter-tip { display: none !important; }
.report-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  max-width: 28rem;
  width: calc(100% - 2rem);
}
.report-dialog::backdrop { background: rgba(0,0,0,.35); }
.report-form { padding: 1.1rem 1.25rem 1.25rem; }
.report-form h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.report-form textarea {
  width: 100%;
  margin-top: .35rem;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}
.chapter-list {
  columns: 2;
  gap: 1.5rem;
  padding-left: 1.2rem;
}
@media (max-width: 700px) { .chapter-list { columns: 1; } }
.chapter-list .is-volume {
  list-style: none;
  margin-left: -1.2rem;
  margin-top: .75rem;
}
.review {
  margin: 0 0 .85rem;
  padding: .75rem 1rem;
  background: #f7f9fb;
  border-left: 3px solid var(--brand-2);
}
.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line);
}
.comment-head-title {
  margin: 0;
  font-family: var(--font);
  font-size: 1.1rem;
}
.comment-foot {
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}
.comment-compose {
  margin: 1.15rem 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.comment-compose.is-hidden,
.comment-compose[hidden] {
  display: none !important;
}
.comment-compose-title {
  margin: 0 0 .75rem;
  font-family: var(--font);
  font-size: 1.05rem;
}
.comment-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 .3rem;
}
.comment-name,
.comment-body {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  margin-bottom: .7rem;
}
.comment-body {
  resize: vertical;
  min-height: 6rem;
  line-height: 1.5;
}
.comment-name:focus,
.comment-body:focus {
  outline: 2px solid rgba(45, 90, 135, .25);
  border-color: var(--brand-2);
}
.comment-compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
}
.comment-list { display: flex; flex-direction: column; gap: .85rem; }
.review-item {
  padding: .85rem 1rem;
  background: #f7f9fb;
  border-left: 3px solid var(--brand-2);
  border-radius: 0 8px 8px 0;
}
.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: baseline;
  margin-bottom: .35rem;
}
.review-author { font-size: .95rem; }
a.review-author {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
a.review-author:hover { text-decoration: underline; }
.review-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: .98rem;
}

.account-nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}
.account-nav .btn-sm { white-space: nowrap; }
.auth-wrap { max-width: 28rem; margin: 2rem auto; }
.auth-panel h1 { margin-top: 0; }
.auth-form label {
  display: block;
  margin-bottom: .85rem;
  font-weight: 600;
  font-size: .9rem;
}
.auth-form input,
.auth-form textarea,
.auth-form select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
  color: inherit;
}
.auth-form textarea {
  min-height: 8.5rem;
  line-height: 1.5;
  resize: vertical;
}
.auth-form > .btn,
.auth-form button[type="submit"] {
  width: 100%;
  margin-top: .35rem;
}
.auth-code-row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
  margin-top: .35rem;
}
.auth-code-row input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin-top: 0;
}
.auth-code-row .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 6.5rem;
  margin-top: 0;
  white-space: nowrap;
}
.auth-alt { margin-top: 1rem; }
.auth-error { color: #c0392b !important; font-weight: 600; }
.auth-ok { color: #1e7a46 !important; font-weight: 600; }
.auth-msg { margin-top: .75rem; }
.user-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.user-nav .plain-list a { display: block; padding: .35rem 0; }
.user-profile-head {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.user-avatar-wrap { flex: 0 0 auto; }
.user-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #e8eef5;
  border: 1px solid var(--line);
}
.user-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
}
.user-profile-meta { flex: 1 1 auto; min-width: 0; text-align: left; }
.user-profile-name {
  margin: 0 0 .55rem;
  font-size: 1.45rem;
  text-align: left;
}
.user-profile-facts {
  margin: 0 0 1rem;
  display: grid;
  gap: .45rem;
}
.user-profile-facts li {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: .55rem;
  align-items: baseline;
  padding: .15rem 0;
  text-align: left;
}
.user-profile-facts span {
  display: block;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}
.user-profile-facts em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.user-profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .15rem;
  width: 100%;
  max-width: none;
}
.user-profile-actions .btn,
.user-profile-actions .user-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.45rem;
  min-width: 0;
  margin: 0;
  padding: .5rem .35rem;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f9;
  color: var(--ink);
  text-decoration: none;
}
.user-profile-actions .user-action-btn:hover {
  background: #e8eef5;
  color: var(--brand);
  text-decoration: none;
}
.user-profile-bio {
  margin: .95rem 0 1.2rem;
  padding: 0 0 0 1rem;
  border-left: 3px solid color-mix(in srgb, var(--brand) 55%, var(--line));
  background: transparent;
}
.user-profile-bio-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.user-profile-bio > p,
.user-profile-bio-placeholder {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.02rem;
  min-height: 0;
}
.user-profile-bio-placeholder,
.user-profile-bio.is-empty > p {
  color: var(--muted);
  font-style: italic;
  font-size: .95rem;
}
.user-profile-bio-empty { margin: 0 0 1rem; }
.account-home-link {
  color: inherit;
  text-decoration: none;
}
.account-home-link:hover {
  color: var(--brand);
  text-decoration: none;
}
.privacy-tabs {
  display: flex;
  gap: .35rem;
  margin: 1rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}
.privacy-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: .55rem .9rem;
  margin-bottom: -1px;
  cursor: pointer;
}
.privacy-tab.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.privacy-form .privacy-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 14rem);
  gap: .75rem 1rem;
  align-items: center;
  margin: 0 0 .85rem;
}
.privacy-form .privacy-row label {
  margin: 0;
  font-weight: 600;
}
.privacy-form select {
  width: 100%;
  max-width: 14rem;
}
.privacy-hint { margin: -.45rem 0 .95rem; }
.friend-list { list-style: none; margin: 0; padding: 0; }
.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px dashed var(--line);
}
.friend-row:last-child { border-bottom: 0; }
.friend-main { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.friend-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eef5;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
}
.friend-actions { display: flex; flex-wrap: wrap; gap: .4rem; flex: 0 0 auto; }
@media (max-width: 640px) {
  .privacy-form .privacy-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
  .privacy-form select { max-width: none; }
  .friend-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
.member-bio-block { margin: .85rem 0 1rem; padding-left: .9rem; border-left: 3px solid color-mix(in srgb, var(--brand) 55%, var(--line)); }
.member-bio-label { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .35rem; }
.member-bio { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.member-friend-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.member-friend-chips a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem .35rem .35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.member-friend-chips img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.member-actions { margin-top: .85rem; }
.profile-derived { margin: -.35rem 0 .85rem; }
.profile-avatar-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
  flex-wrap: wrap;
}
.profile-avatar-block { margin: 1rem 0 1.5rem; }
.avatar-upload-form { flex: 1 1 12rem; min-width: 0; }
.avatar-preset-label { margin: 0 0 .55rem; }
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: .55rem;
  max-width: 420px;
}
.avatar-preset-btn {
  appearance: none;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 50%;
  padding: 0;
  width: 64px;
  height: 64px;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  transition: border-color .15s ease, transform .15s ease;
}
.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-preset-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.avatar-preset-btn.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .55);
}
.avatar-crop-modal[hidden] { display: none !important; }
body.avatar-crop-open { overflow: hidden; }
.avatar-crop-dialog {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .2);
}
.avatar-crop-stage {
  position: relative;
  width: 100%;
  height: 360px;
  margin: .75rem 0 1rem;
  overflow: hidden;
  background: #0f172a;
  border-radius: 10px;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.avatar-crop-stage:active { cursor: grabbing; }
.avatar-crop-stage img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none !important;
  max-height: none !important;
  width: auto;
  height: auto;
  transform-origin: center center;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
.avatar-crop-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  height: 78%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.45);
  pointer-events: none;
}
.avatar-crop-actions { justify-content: flex-end; gap: .6rem; }
.auth-select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
  background: #fff;
}
.support-page-title { margin: 0 0 1rem; }
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.support-col h2 { margin-top: 0; }
.support-subhead { margin: 1.25rem 0 .6rem; font-size: 1rem; }
.support-col .auth-form { max-width: none; }
@media (max-width: 960px) {
  .support-grid { grid-template-columns: 1fr; }
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  background: #f9fbfd;
}
.plan-card h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.plan-price { font-weight: 700; font-size: 1.1rem; }
.plan-card .qty-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .55rem 0 .75rem;
  flex-wrap: wrap;
}
.plan-card .pkg-qty {
  width: 4rem;
  padding: .25rem .4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
@media (max-width: 860px) {
  .user-layout {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: .85rem;
  }
  .user-layout > *,
  .user-layout .main-col,
  .user-layout .panel,
  .user-nav {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .user-nav {
    overflow: visible;
  }
  .user-nav .panel-title { margin-bottom: .45rem; }
  .user-nav .plain-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 0;
    margin: 0;
  }
  .user-nav .plain-list li {
    padding: 0;
    border-bottom: 0;
    min-width: 0;
  }
  .user-nav .plain-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.4rem;
    padding: .45rem .5rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    font-size: .88rem;
    box-sizing: border-box;
  }
  .user-profile-head {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    width: 100%;
    gap: .85rem;
  }
  .user-avatar-wrap {
    align-self: center;
  }
  .user-profile-meta {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
  .user-profile-name {
    font-size: 1.25rem;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .user-profile-facts,
  .user-profile-facts li {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
  }
  .user-profile-facts li {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
  .user-profile-bio,
  .user-profile-bio-label,
  .user-profile-bio > p {
    text-align: left;
  }
  .user-profile-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    width: 100%;
    max-width: none;
  }
  .user-profile-actions .btn,
  .user-profile-actions .user-action-btn {
    min-height: 2.35rem;
    padding: .45rem .2rem;
    font-size: .78rem;
    white-space: nowrap;
  }
  .user-layout .main-col .meta,
  .user-layout .main-col p,
  .user-layout .main-col li,
  .user-layout .main-col a,
  .uc-item-main,
  .uc-item-main a,
  .perk-list li,
  .perk-list .meta,
  .member-bio,
  .member-book-list li,
  .member-book-list a {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
  .uc-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .4rem .65rem;
  }
  .uc-item-main { flex: 1 1 12rem; }
  .uc-item .btn-remove { margin-left: auto; }
  .section-head {
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
  }
  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .mail-item {
    flex-wrap: wrap;
  }
  .mail-item .mail-row {
    width: 100%;
    min-width: 0;
  }
  .mail-list-compact .mail-row,
  .mail-row {
    grid-template-columns: 1fr;
    gap: .25rem .5rem;
  }
  .mail-date { text-align: left; }
}

.read-wrap .action-bar { justify-content: center; }

/* —— Novel info (NovelFull-style cover column) —— */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
}
.nf-titlebar {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand);
  border-bottom: 3px solid var(--brand-2);
  display: inline-block;
  margin-bottom: 1rem;
  padding-bottom: .2rem;
}
.nf-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.nf-cover-col { width: 180px; }
.cover-book {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  background: linear-gradient(145deg, #e8eef5, #cfdceb);
  box-shadow:
    4px 6px 0 rgba(0,0,0,.06),
    0 12px 28px rgba(20,40,70,.22);
  transform: perspective(600px) rotateY(-4deg);
  transform-origin: left center;
}
.cover-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-card .cover-book {
  transform: none;
  box-shadow: 0 8px 20px rgba(20,40,70,.16);
  border-radius: 6px;
}
.nf-under-cover {
  list-style: none;
  margin: .85rem 0 0;
  padding: 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
}
.nf-under-cover span {
  color: #8a97a6;
  display: inline-block;
  min-width: 4.2rem;
}
.nf-under-cover .status-em { color: var(--brand-2); font-style: normal; font-weight: 600; }
.novel-title {
  font-family: var(--font);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin: 0 0 .45rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.rating-stars { letter-spacing: .05em; margin-bottom: .2rem; }
.rating-stars .star.on { color: #e6a800; }
.rating-stars .star.off { color: #d5dbe3; }
.prose.is-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 10.5em;
}
.link-more {
  background: none;
  border: 0;
  color: var(--brand-2);
  font: inherit;
  cursor: pointer;
  padding: 0;
  margin: .35rem 0 .75rem;
}
.btn-epub { background: #1b6b4a; color: #fff; }
.btn-epub.is-locked { background: #6b7c8a; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.community-line { margin-top: .35rem; }
.latest-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem 1rem;
  margin-bottom: 1rem;
}
.latest-bar .lb-label {
  font-weight: 600;
  color: var(--muted);
  font-size: .85rem;
}
.latest-bar a { flex: 1; min-width: 12rem; }

/* —— Catalog (69shuba-like) —— */
.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin: .75rem 0 1rem;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.latest-chapters-block {
  margin: 1rem 0 .35rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fafc, #fff);
}
.latest-chapters-title {
  margin: 0 0 .55rem;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}
.latest-chapters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .85rem;
}
.latest-chapters-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  min-width: 0;
  padding: .35rem 0;
  border-bottom: 1px dotted var(--line);
}
.latest-chapters-list li:nth-last-child(-n+2) { border-bottom: 0; }
.latest-chapters-list a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.latest-chapters-list .meta {
  flex-shrink: 0;
  font-size: .8rem;
}
a.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
a.btn-action:hover { text-decoration: none; color: #fff; }

.catalog-pager {
  display: none;
}
.catalog-pager-server {
  display: flex;
  margin-top: 1rem;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.catalog-pager-server .pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.2rem;
  padding: .35rem .7rem;
  border-radius: 6px;
  background: #eef2f6;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.catalog-pager-server .pager-btn.is-disabled {
  opacity: .45;
  pointer-events: none;
}
.catalog-pager-server .pager-current {
  font-weight: 600;
  color: var(--muted);
}
.catalog-pager-mobile {
  margin-top: 1rem;
  padding: .65rem .35rem calc(.65rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  gap: .3rem .35rem;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}
.catalog-pager-mobile .pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.2rem;
  padding: .35rem .55rem;
  border: 0;
  border-radius: 6px;
  background: #eef2f6;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  flex-shrink: 0;
}
.catalog-pager-mobile .pager-btn.is-disabled,
.catalog-pager-mobile .pager-btn:disabled {
  opacity: .4;
  pointer-events: none;
}
.catalog-pager-mobile .pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  font-weight: 700;
  color: var(--brand);
  font-size: .95rem;
  flex-shrink: 0;
}
.catalog-pager-mobile .jump-label {
  font-size: .82rem;
  color: var(--muted);
  flex-shrink: 0;
  margin: 0;
}
.catalog-pager-mobile .pager-jump-input {
  width: 2.8rem;
  min-height: 2.2rem;
  padding: .3rem .25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  text-align: center;
  flex-shrink: 0;
}
.catalog-pager-mobile .jump-of {
  font-size: .85rem;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.catalog-pager-mobile .btn-sm {
  min-height: 2.2rem;
  padding: .35rem .55rem;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .catalog-pager-mobile:not([hidden]) {
    display: flex;
    position: sticky;
    bottom: 0;
    background: var(--bg-elev, #fff);
    box-shadow: 0 -6px 16px rgba(20, 40, 70, .08);
    z-index: 5;
  }
}
.sort-tabs { display: flex; gap: .35rem; }
.sort-tab {
  padding: .35rem .75rem;
  border-radius: 4px;
  background: #eef2f6;
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}
.sort-tab.active, .sort-tab:hover {
  background: var(--brand-2);
  color: #fff;
  text-decoration: none;
}
.catalog-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 .75rem;
}
.catalog-item a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .4rem;
  align-items: baseline;
  padding: .55rem .35rem;
  border-bottom: 1px dashed var(--line);
  color: var(--brand-2);
}
.catalog-item a:hover { background: #f3f7fb; text-decoration: none; }
.ci-no { color: var(--muted); font-size: .85rem; }
.ci-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ci-date { color: var(--muted); font-size: .8rem; }
.catalog-volume {
  grid-column: 1 / -1;
  font-weight: 700;
  padding: .75rem .35rem .35rem;
  margin-top: .35rem;
  color: var(--ink);
  border-bottom: 2px solid var(--brand);
}

/* —— Responsive: keep all PC content, restack for mobile (69shuba-like) —— */
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .side-col { order: 3; }
  .home-boards { grid-template-columns: 1fr; }
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .update-table .col-author { display: none; }
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .footer-left { max-width: none; }
  .footer-right { align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .site-main { padding: .65rem 0 2rem; }

  /* Header: row1 logo+nav+user, row2 full search (all pages) */
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .5rem;
    min-height: 0;
    padding: .45rem 0 .55rem;
  }
  .brand {
    order: 1;
  }
  .brand-logo {
    height: 28px;
    max-width: 108px;
  }
  .nav {
    order: 2;
    gap: 0;
    min-width: 0;
    flex: 1;
  }
  .nav-btn {
    padding: .4rem .45rem;
    font-size: .88rem;
  }
  .account-nav {
    order: 3;
    gap: .1rem;
    margin-left: auto;
  }
  .account-nav > a.nav-link[href="/support/"],
  .account-nav > a.nav-link[href*="support"] { display: none; }
  .account-nav .btn-sm { padding: .3rem .5rem; font-size: .8rem; }
  .account-nav .nav-link {
    max-width: 4.5rem;
    padding: .35rem .4rem;
    font-size: .85rem;
  }
  .header-search {
    order: 4;
    display: flex !important;
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    gap: .4rem;
  }
  .header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 8px;
    padding: .65rem .9rem;
    font-size: .95rem;
    background: #fff;
  }
  .header-search button {
    border-radius: 8px;
    padding: .65rem 1rem;
    font-size: .9rem;
  }

  /* Homepage body search hidden — header search covers all pages */
  .home-search { display: none; }

  .home-tiles {
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin: .85rem 0 1rem;
  }
  .home-tile {
    min-height: 46px;
    font-size: .95rem;
    border-radius: 8px;
  }

  .home-boards {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .board {
    padding: .75rem .85rem .85rem;
    border-radius: 10px;
  }
  .board-title { font-size: 1.05rem; margin-bottom: .55rem; }
  .board-list li { padding: .5rem 0; gap: .45rem; }
  .board-tag { font-size: .72rem; }

  /* Update list mobile: one line — title (wide) + author (narrow) */
  .update-section { padding: .75rem .85rem .9rem; }
  .update-table thead { display: none; }
  .update-table,
  .update-table tbody {
    display: block;
    width: 100%;
  }
  .update-table tr {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .update-table tr:last-child { border-bottom: 0; }
  .update-table td {
    border: 0;
    padding: 0;
    width: auto !important;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .update-table .col-chapter,
  .update-table .col-time {
    display: none !important;
  }
  .update-table .col-book {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
  }
  .update-table .col-book a {
    font-size: .95rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .update-table .col-author {
    flex: 0 0 5.5em;
    width: 5.5em;
    max-width: 5.5em;
    display: block !important;
    font-size: .8rem;
    color: var(--muted);
    text-align: left;
  }
  .update-table .col-author::before,
  .update-table .col-time::before,
  .update-table .col-chapter::before {
    content: none !important;
  }

  .nf-hero { grid-template-columns: 1fr; }
  .nf-cover-col {
    width: min(160px, 42vw);
    margin: 0 auto;
  }
  .cover-book { transform: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-head { flex-direction: column; }
  .latest-chapters-list { grid-template-columns: 1fr; }
  .latest-chapters-list li:nth-last-child(-n+2) { border-bottom: 1px dotted var(--line); }
  .latest-chapters-list li:last-child { border-bottom: 0; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .7rem; }
  .chapter-nav { flex-wrap: wrap; justify-content: space-between; }
  .chapter-book-title { font-size: 1.1rem; }
  .chapter-box-footer {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: .2rem;
  }
  .chapter-box-footer .chapter-footer-btn {
    padding: .32rem .28rem;
    font-size: .68rem;
    border-radius: 3px;
  }
  .read-pc-only { display: none !important; }
  .read-rec-text-grid { grid-template-columns: 1fr; }
  .read-rec-text-item { border-right: 0; }
  .read-rec-text-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .read-rec-text-item:last-child { border-bottom: 0; }
  .read-rec-grid { grid-template-columns: 1fr; }
  .cta-row .btn, .action-bar .btn { flex: 1 1 auto; text-align: center; }
  .ad-slot { font-size: .8rem; }
}

@media (max-width: 420px) {
  .wrap,
  .wrap.header-inner,
  .wrap.footer-inner,
  .wrap.home-page {
    max-width: calc(100% - .9rem);
    width: 100%;
  }
  .panel { padding: .8rem; }
  .novel-title { font-size: 1.15rem; }
  .nav-btn { padding: .35rem .4rem; font-size: .82rem; }
  .home-tile { font-size: .9rem; min-height: 42px; }
}

/* —— Detail v2: left rail + tabs + Qidian engage —— */
.detail-v2 .nf-hero,
.detail-v2 .nf-hero-balanced {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  align-items: center;
}
.nf-left-rail {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  width: 220px;
}
.nf-left-rail .cover-book {
  width: 100%;
  transform: none;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(20, 40, 70, .2);
}
.epub-module {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
  background: linear-gradient(180deg, #f7faf8, #fff);
}
.epub-module-title {
  margin: 0 0 .5rem;
  font-size: .9rem;
  font-family: var(--font);
}
.epub-note {
  margin: .5rem 0 0;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.4;
}
.btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.btn-lg { padding: .7rem 1.25rem; font-size: 1.05rem; }
.left-actions { display: flex; flex-direction: column; gap: .45rem; }

.engage-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(20, 40, 70, .06);
}
.engage-col {
  padding: 1.25rem 1.35rem 1.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.engage-recommend { border-right: 1px dashed var(--line); }
.engage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .35rem .65rem;
  margin-bottom: .95rem;
  width: 100%;
}
.engage-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.2rem;
}
.engage-sub {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
}
.engage-feed {
  background: #eef2f6;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.engage-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
  margin-bottom: 1rem;
  width: 100%;
}
.metric {
  text-align: center;
  min-width: 5.5rem;
}
.metric-label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
}
.metric-value {
  display: block;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
.metric-value.rose { color: #c0392b; }
.metric-value.egg { color: #d4a017; }
.metric-value.tip { color: #c0392b; }
.metric-sub {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .15rem;
}
.engage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  width: 100%;
}
.btn-engage {
  background: #fdecee;
  color: #c0392b;
  border: 1px solid #f5c6cb;
  font-weight: 700;
  min-width: 7.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn-engage:hover { background: #f8d7da; text-decoration: none; }
.btn-engage-egg {
  background: #fff8e6;
  color: #9a7b0a;
  border-color: #f0e0a8;
}
.engage-tip-note {
  margin: 0 0 .55rem;
  text-align: center;
  max-width: 28rem;
  line-height: 1.4;
}
.engage-note { margin: .65rem 0 0; }

.book-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  border-bottom: 1px solid var(--line);
  margin: -.25rem 0 1rem;
}
.book-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .65rem .9rem;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.book-tab:hover { color: var(--ink); }
.book-tab.active {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
}
.tab-pane[hidden] { display: none !important; }
.tab-pane.active { display: block; }

/* —— Novel info: t2-balanced + tags + fans —— */
.novel-info.nf-layout {
  padding-bottom: 0;
  overflow: hidden;
}
.novel-info.nf-layout .nf-titlebar {
  margin-bottom: .95rem;
}
.nf-main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .4rem;
}
.novel-info .novel-title {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
}
.rating-line {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  line-height: 1.2;
}
.rating-line .rating-stars {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  gap: .05rem;
}
.star-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  color: #d5dbe3;
}
.star-btn.star.on { color: #e6a800; }
.star-btn.star.off { color: #d5dbe3; }
.star-btn:hover { transform: scale(1.08); }
.rating-text {
  font-size: 1rem;
  color: var(--muted);
}
.rating-text strong { color: var(--ink); }
.rating-mine { font-size: .9rem; }
.nf-meta-compact {
  list-style: none;
  margin: .2rem 0 .25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.5;
}
.nf-meta-compact span {
  color: var(--muted);
  margin-right: .2rem;
}
.nf-meta-compact .status-em {
  color: var(--brand-2);
  font-style: normal;
  font-weight: 600;
}
.nf-epub-under-genre {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .4rem;
  padding: .1rem 0 .05rem;
}
.epub-link {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1b6b4a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.epub-link.is-locked { color: #6b7c8a; }
.epub-link:hover { color: #145238; }
.epub-note-inline {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.35;
}
.cta-row-main {
  margin-top: .5rem;
  gap: .55rem;
}
.cta-row-main .btn {
  padding: .62rem 1.1rem;
  font-size: 1rem;
}
.cta-row-main .btn-primary {
  min-width: 7.5rem;
  box-shadow: 0 4px 12px rgba(232, 120, 48, .25);
}
.cta-row-main .btn-ghost {
  border: 1px solid #d9e1ea;
  background: #f5f8fb;
}
.cta-row-main .btn-ghost:hover {
  background: #e8eef5;
  text-decoration: none;
}
.nf-tags-footer {
  margin: 1rem -1.25rem 0;
  padding: .85rem 1.25rem 1rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fafc, #fff);
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.nf-tags-label {
  flex-shrink: 0;
  margin-top: .15rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nf-tags-footer .tags {
  margin: 0;
  flex: 1;
}
.nf-tags-footer .tag {
  background: linear-gradient(180deg, #f3f7fb, #e8eef5);
  border: 1px solid #dce5ef;
  border-radius: 6px;
  color: var(--brand);
  font-weight: 600;
}

.fans-panel { margin-top: 1rem; }
.fans-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.fans-list li {
  display: grid;
  grid-template-columns: 1.5rem 2.25rem minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}
.fan-rank {
  font-weight: 800;
  font-size: .95rem;
  color: var(--muted);
  text-align: center;
}
.fans-list li:nth-child(1) .fan-rank { color: #e74c3c; }
.fans-list li:nth-child(2) .fan-rank { color: #27ae60; }
.fans-list li:nth-child(3) .fan-rank { color: #3498db; }
.fan-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  background: linear-gradient(145deg, #5b7c99, #3d5a73);
}
.fans-list li:nth-child(1) .fan-avatar { background: linear-gradient(145deg, #e67e6b, #c0392b); }
.fans-list li:nth-child(2) .fan-avatar { background: linear-gradient(145deg, #58d68d, #1e8449); }
.fans-list li:nth-child(3) .fan-avatar { background: linear-gradient(145deg, #5dade2, #2471a3); }
.fan-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.fan-name {
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fans-empty { margin: .35rem 0 0; font-size: .88rem; }

.mobile-section-title { display: none; }

@media (max-width: 860px) {
  html, body {
    overflow-x: clip;
  }
  .wrap,
  .wrap.header-inner,
  .wrap.footer-inner,
  .wrap.home-page,
  .detail-layout,
  .main-col,
  .side-col,
  .panel,
  .novel-info,
  .engage-panel,
  .tab-panel,
  .user-layout,
  .user-layout .main-col {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .detail-layout.detail-v2 {
    grid-template-columns: 1fr;
    gap: .85rem;
    min-width: 0;
  }
  .detail-v2 .nf-hero,
  .detail-v2 .nf-hero-balanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
  }
  .nf-left-rail {
    width: 112px;
    max-width: 34vw;
    margin: 0 auto;
    flex-shrink: 0;
    align-self: center;
  }
  .nf-left-rail .cover-book {
    width: 100%;
    box-shadow: 0 6px 16px rgba(20, 40, 70, .16);
  }
  .nf-main-col {
    align-items: stretch;
    text-align: left;
    min-width: 0;
    width: 100%;
  }
  .novel-info .novel-title {
    font-size: 1.2rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .rating-line {
    justify-content: flex-start;
    gap: .35rem .5rem;
    max-width: 100%;
  }
  .rating-line .rating-stars {
    font-size: 1.05rem;
    flex-wrap: wrap;
    white-space: normal;
    max-width: 100%;
  }
  .rating-text {
    font-size: .88rem;
    width: 100%;
  }
  .nf-meta-compact {
    align-items: stretch;
    font-size: .95rem;
  }
  .nf-meta-compact li {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
  }
  /* Download + EPUB on one line; note wraps below */
  .nf-epub-under-genre {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: .25rem .4rem;
  }
  .epub-note-inline {
    flex: 1 1 100%;
    display: block;
    font-size: .8rem;
    line-height: 1.35;
  }
  .cta-row-main {
    justify-content: stretch;
    flex-direction: column;
    gap: .45rem;
  }
  .cta-row-main .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .nf-tags-footer {
    flex-direction: column;
    gap: .45rem;
    align-items: flex-start;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
  .nf-tags-footer .tags {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
  }
  .nf-tags-footer .tag {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .engage-panel {
    grid-template-columns: 1fr;
    overflow: hidden;
  }
  .engage-recommend {
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }
  .engage-col {
    padding: .9rem .85rem 1rem;
    min-width: 0;
  }
  .engage-tip-note {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Tabs → stacked mobile sections */
  .book-tabs { display: none !important; }
  .mobile-section-title {
    display: block;
    margin: 0 0 .65rem;
    padding-bottom: .35rem;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand);
    border-bottom: 2px solid var(--brand);
  }
  .tab-panel .tab-pane,
  .tab-panel .tab-pane[hidden] {
    display: block !important;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }
  .tab-panel #tab-desc {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .tab-panel .desk-only-title { display: none; }
  .prose,
  .review-body,
  .plain-list a,
  .rank-list a,
  .tags-inline {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .side-col {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-width: 0;
  }
  /* One Support link on mobile (keep engage block only) */
  .support-side { display: none !important; }

  .breadcrumb {
    font-size: .82rem;
    flex-wrap: wrap;
    gap: .2rem .35rem;
    line-height: 1.4;
    max-width: 100%;
  }
  .breadcrumb span:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }
}

/* ���� Mail-style messages ���� */
.mail-hint { margin: 0 0 1rem; }
.mail-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mail-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 7.5rem;
  gap: .75rem;
  align-items: start;
  padding: .85rem 0;
  border-bottom: 1px dotted var(--line);
  color: inherit;
  text-decoration: none;
}
.mail-row:hover { background: rgba(0, 0, 0, .02); }
.mail-row.is-unread .mail-subject { font-weight: 700; color: var(--brand); }
.mail-from { font-size: .85rem; color: var(--muted); padding-top: .1rem; }
.mail-subject { font-weight: 600; color: var(--text); }
.mail-count { font-weight: 500; color: var(--muted); font-size: .85rem; }
.mail-preview {
  margin-top: .2rem;
  font-size: .88rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mail-date { font-size: .8rem; color: var(--muted); text-align: right; white-space: nowrap; }
.mail-list-compact .mail-row { padding: .65rem 0; grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem; }
.mail-thread { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0 1.5rem; }
.mail-letter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: #fff;
}
.mail-letter.from-team { border-left: 3px solid var(--brand-2, #5b9fd4); background: #f7fbfe; }
.mail-letter.from-you { border-left: 3px solid #94a3b8; }
.mail-letter-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.mail-party { margin-right: .35rem; }
.mail-letter-subject { font-weight: 600; margin-bottom: .55rem; }
.mail-letter-subject.subtle { font-weight: 500; color: var(--muted); font-size: .92rem; }
.mail-letter-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  margin: 0;
}
.mail-letter-body.compact {
  max-height: 8rem;
  overflow: auto;
  font-size: .9rem;
  color: var(--muted);
}
.mail-reply {
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}
.mail-reply-form .cta-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.mail-reply-form .btn { width: auto; }
.mail-quote {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-left: 3px solid var(--line);
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}
@media (max-width: 700px) {
  .mail-row, .mail-list-compact .mail-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "from date" "main main";
  }
  .mail-from { grid-area: from; }
  .mail-date { grid-area: date; }
  .mail-main { grid-area: main; }
}

/* —— Mail source / conversation UI (v2) —— */
.mail-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
  padding: .95rem 0;
  border-bottom: 1px dotted var(--line);
  color: inherit;
  text-decoration: none;
}
.mail-side { display: flex; flex-direction: column; gap: .25rem; }
.mail-dir { font-size: .78rem; color: var(--muted); margin-bottom: .15rem; }
.mail-source {
  margin: .25rem 0 .15rem;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.35;
}
.mail-tag {
  display: inline-block;
  padding: .1rem .4rem;
  border-radius: 4px;
  background: #e8f2fa;
  color: var(--brand, #2a6f9e);
  font-size: .75rem;
  font-weight: 600;
  margin-right: .25rem;
}
.mail-context {
  margin: 0 0 1.1rem;
  padding: .9rem 1rem;
  border: 1px solid #cfe3f5;
  background: #f3f8fc;
  border-radius: 8px;
}
.mail-context-title { font-weight: 700; margin-bottom: .45rem; color: var(--brand); }
.mail-context-list { list-style: none; margin: 0; padding: 0; }
.mail-context-list li { margin: .3rem 0; font-size: .92rem; }
.mail-context-list li span {
  display: inline-block;
  min-width: 3.5rem;
  color: var(--muted);
  margin-right: .35rem;
}
.mail-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .05rem .35rem;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  vertical-align: middle;
}
.mail-badge.reply { background: #dbeafe; color: #1d4ed8; }
@media (max-width: 700px) {
  .mail-row, .mail-list-compact .mail-row {
    grid-template-columns: 1fr;
  }
  .mail-side { flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* Aggregate list pagination (list / genre / rank / search) */
.list-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1.5rem 0 .25rem;
  padding: 1.1rem 0 .35rem;
  border-top: 1px solid var(--line);
  text-align: center;
  box-sizing: border-box;
}
.list-pager-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem;
  max-width: 100%;
}
.list-pager .pager-pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .35rem;
}
.list-pager .pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.4rem;
  padding: .4rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev, #fff);
  color: var(--ink) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: .9rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.list-pager .pager-btn.pager-nav {
  min-width: 4.4rem;
  padding-left: .9rem;
  padding-right: .9rem;
}
.list-pager a.pager-btn:hover {
  background: #eef3f8;
  border-color: var(--brand-2, #2d5a87);
  color: var(--brand, #1e3a5f) !important;
  text-decoration: none !important;
}
.list-pager .pager-btn.is-current {
  background: var(--brand, #1e3a5f);
  border-color: var(--brand, #1e3a5f);
  color: #fff !important;
  box-shadow: none;
  cursor: default;
}
.list-pager .pager-btn.is-disabled {
  opacity: .38;
  pointer-events: none;
  box-shadow: none;
  background: #f3f5f7;
}
.list-pager .pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
}
.list-pager .pager-meta {
  margin: .65rem 0 0;
  padding: 0;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .02em;
}

