:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #687383;
  --line: #d9e1e8;
  --panel: #f5f8fa;
  --brand: #16445c;
  --brand-2: #0c2f43;
  --link: #075f9a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: #f2f4f6; font-size: 15px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: var(--brand); color: #fff; border-bottom: 4px solid #dfe8ee; }
.nav-shell { min-height: 58px; display: flex; align-items: center; gap: 28px; }
.brand { color: #fff; font-size: 28px; font-weight: 700; letter-spacing: .2px; }
nav { display: flex; gap: 18px; align-items: center; }
nav a { color: #eaf4f8; font-weight: 700; }
nav a.active { color: #fff; }
.search { margin-left: auto; }
.search input { width: 260px; height: 34px; border: 0; padding: 0 12px; font-size: 14px; }
.tagline { background: #e7edf1; color: #7a8793; padding: 9px 0; font-size: 13px; }
.main-grid { display: grid; grid-template-columns: 1fr 310px; gap: 24px; padding: 22px 0 40px; }
.section-title { font-size: 20px; font-weight: 700; border-bottom: 1px solid #bfcbd5; padding-bottom: 8px; margin: 0 0 12px; }
.hero-panel { display: grid; grid-template-columns: 245px 1fr; gap: 22px; background: #fff; border: 1px solid var(--line); padding: 14px; }
.cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid #c7d0d8; background: #d7dde2; }
.novel-title { margin: 0 0 8px; font-size: 28px; }
.meta { display: grid; grid-template-columns: 88px 1fr; row-gap: 6px; margin: 14px 0; }
.meta b { color: #3d4956; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; background: var(--brand); color: #fff; font-weight: 700; border: 1px solid var(--brand-2); }
.button.secondary { background: #fff; color: var(--brand); }
.button.disabled, .pill.disabled { opacity: .45; pointer-events: none; }
.updates { margin-top: 18px; background: #fff; border: 1px solid var(--line); }
.update-row { display: grid; grid-template-columns: 1fr 155px 155px 120px; gap: 12px; padding: 10px 12px; border-top: 1px dashed #ced6dd; align-items: center; }
.update-row:first-child { border-top: 0; }
.update-head { background: var(--panel); font-weight: 700; color: #3f4c59; }
.sidebar-box { background: #eef3f6; border: 1px solid #d1dce4; padding: 14px; margin-bottom: 16px; }
.genre-list { columns: 2; list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.tile-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; }
.novel-tile { position: relative; min-height: 180px; overflow: hidden; border: 1px solid #cdd6de; background: #111; }
.novel-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.novel-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 9px; color: #fff; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.86)); text-shadow: 0 1px 2px #000; }
.chapter-list { background: #fff; border: 1px solid var(--line); }
.chapter-row { display: grid; grid-template-columns: 1fr 90px 90px; gap: 10px; padding: 11px 12px; border-top: 1px dashed #d2dbe2; align-items: center; }
.chapter-row:first-child { border-top: 0; }
.pill { display: inline-block; width: max-content; padding: 3px 7px; background: #edf6ed; color: #27612b; border: 1px solid #b8dbb7; font-size: 12px; text-align: center; }
.library-list { background: #fff; border: 1px solid var(--line); padding: 16px; }
.player-card { background: #fff; border: 1px solid var(--line); padding: 16px; margin-bottom: 16px; }
.track-list { background: #fff; border: 1px solid var(--line); }
.track-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 12px; border: 0; border-top: 1px dashed #d2dbe2; background: #fff; color: var(--link); text-align: left; cursor: pointer; font: inherit; }
.track-row:first-child { border-top: 0; }
.track-row:hover { background: #f5f8fa; }
.reader { max-width: 900px; margin: 0 auto; padding: 26px 0 50px; }
.reader-card { background: #fff; border: 1px solid var(--line); padding: 26px 34px; }
.reader h1 { margin: 0 0 14px; font-size: 30px; }
.reader-media { display: grid; gap: 12px; padding: 14px; margin: 18px 0; background: #f4f7f9; border: 1px solid #d9e1e8; }
audio, video { width: 100%; }
.reader-text { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.75; color: #222; }
.reader-text p { margin: 0 0 1.25em; }
.chapter-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.chapter-nav a { padding: 10px 12px; border: 1px solid var(--line); background: #f7fafc; }
@media (max-width: 900px) {
  .nav-shell { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .search { width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .main-grid, .hero-panel { grid-template-columns: 1fr; }
  .cover { max-width: 240px; }
  .update-row, .chapter-row, .track-row { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .reader-card { padding: 20px; }
}
