:root {
  --bg: #0b0c0f;
  --bg-deep: #07080a;
  --bg-wash: #14161c;
  --panel: #15171d;
  --text: #f5f5f4;
  --muted: #a1a1aa;
  --accent: #f0c674;
  --accent-ink: #1a1408;
  --line: #272a33;
  --safe: #4ade80;
  --input: #0c0d10;
  --chip: #1c1f28;
  --avatar-ph: #2a2418;
  --shade-text: #d4d4d8;
  --overlay: rgba(0, 0, 0, 0.55);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --pad: 14px;
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
html[data-theme="light"] {
  /* 雾灰影院底：略深、偏冷，减轻白底+深海报的跳感 */
  --bg: #e4e6ec;
  --bg-deep: #d8dbe3;
  --bg-wash: #eceef3;
  --panel: #f2f3f7;
  --text: #18181b;
  --muted: #6b7280;
  --accent: #b45309;
  --accent-ink: #fff7ed;
  --line: #cfd3dc;
  --safe: #15803d;
  --input: #f7f8fa;
  --chip: #e0e3ea;
  --avatar-ph: #e5e2dc;
  --shade-text: #4b5563;
  --overlay: rgba(15, 23, 42, 0.4);
  --card-shadow: 0 8px 22px rgba(24, 28, 40, 0.07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  overscroll-behavior-x: none;
}
html {
  background: var(--bg-deep);
}
body {
  padding: env(safe-area-inset-top) 0 0;
  background:
    radial-gradient(120% 70% at 50% -10%, var(--bg-wash) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}
#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

#main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--pad) calc(72px + env(safe-area-inset-bottom));
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  backdrop-filter: blur(12px);
}
.tabbar .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}
.tabbar .tab svg {
  width: 20px;
  height: 20px;
  display: block;
}
.tabbar .tab.on {
  color: var(--accent);
}

/* —— Home: popular carousel + shelf —— */
.popular-block {
  margin: 4px 0 6px;
}
.popular-carousel {
  margin: 0 calc(-1 * var(--pad));
}
.popular-track {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 10%;
  padding: 18px 10% 22px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.popular-track::-webkit-scrollbar {
  display: none;
}
.popular-slide {
  flex: 0 0 78%;
  max-width: 340px;
  scroll-snap-align: center;
  color: inherit;
  text-decoration: none;
  transform: scale(0.78);
  opacity: 0.38;
  transition: transform 0.28s ease, opacity 0.28s ease, filter 0.28s ease;
  will-change: transform, opacity;
}
.popular-slide.is-center {
  transform: scale(1.08);
  opacity: 1;
  z-index: 2;
}
.popular-slide.is-side {
  filter: brightness(0.55) saturate(0.8);
}
.popular-slide.is-center .popular-cover {
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.popular-slide.is-center .popular-title {
  font-size: 16px;
  font-weight: 700;
}
.popular-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: var(--chip);
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.28s ease, border-color 0.28s ease;
}
.popular-cover .popular-img,
.popular-cover .cover,
.popular-cover .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.popular-cover .ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.popular-title {
  margin: 10px 4px 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-bar {
  padding: 14px 0 10px;
}
.home-bar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.home-bar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.home-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.icon-btn {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--text);
  padding: 0;
  backdrop-filter: blur(8px);
}
.icon-btn svg { width: 18px; height: 18px; display: block; }
.home-tools .account-btn { max-width: 132px; }
.page-title {
  margin: 4px 0 12px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.cover-link { display: block; color: inherit; }
.poster-wrap { position: relative; width: 96px; }
.fav-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0;
}
.fav-heart svg { width: 18px; height: 18px; display: block; }
.fav-heart.on { color: #ff3b5c; }
.poster-wrap .fav-heart { top: 4px; right: 4px; width: 26px; height: 26px; }
.poster-wrap .fav-heart svg { width: 14px; height: 14px; }
.account-btn {
  max-width: 52%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  backdrop-filter: blur(8px);
}
.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.account-avatar.ph {
  display: grid;
  place-items: center;
  background: var(--avatar-ph);
  color: var(--accent);
  font-size: 12px;
}
.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-btn:not(:has(.account-avatar)) {
  padding: 6px 12px;
}
.avatar-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 8px 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.avatar-pick img,
.avatar-pick .ph {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--avatar-ph);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 24px;
  flex: none;
}
.avatar-pick span { color: var(--accent); font-size: 14px; }
.login-sheet {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}
.login-sheet[hidden] { display: none; }
.login-card {
  width: min(560px, 100%);
  background: var(--panel);
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.login-card h2 { margin: 0 0 8px; }
.login-card label { display: block; margin: 12px 0; font-size: 14px; color: var(--muted); }
.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
}
.login-card input[type="file"] { display: none; }
.login-actions { display: flex; gap: 8px; }
.login-actions button, .login-close {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.login-actions button:last-child { background: var(--accent); color: var(--accent-ink); }
.login-actions .ghost, .login-close { background: transparent; color: var(--text); }
.pay-group-title {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.pay-plans { display: grid; gap: 8px; margin: 0 0 8px; }
.pay-plan {
  appearance: none;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.pay-plan.hi {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}
.pay-plan:disabled,
.pay-plan.soon {
  opacity: 0.45;
  cursor: not-allowed;
}
.vip-card {
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 16px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: var(--card-shadow);
}
html[data-theme="dark"] .vip-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel));
  box-shadow: none;
}
.vip-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.vip-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.vip-card .pay-cta {
  margin-top: 12px;
  display: inline-block;
}
.account-links {
  margin: 8px 0 16px;
  border-top: 1px solid var(--line);
}
.account-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}
.account-link > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.account-link-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.account-link-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}
.legal-page {
  padding-bottom: 24px;
}
.legal-page h1 {
  margin: 4px 0 14px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.legal-page h2 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 650;
}
.legal-page p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--shade-text);
}
.playlist-section { margin-bottom: 22px; }
.playlist-section .shelf-title { margin-top: 4px; }
.account-page h1 {
  margin: 4px 0 12px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.account-page label { display: block; margin: 12px 0; font-size: 14px; color: var(--muted); }
.account-page input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
}
.account-page input[type="file"] { display: none; }
.account-page .login-actions { margin-top: 8px; }
.account-page .login-actions button { background: var(--accent); color: var(--accent-ink); }

.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  padding-bottom: 8px;
}
.home-shelves {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.shelf-block { min-width: 0; }
.shelf-title {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
@media (min-width: 420px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.show-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  position: relative;
}
.show-card .cover-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--chip);
}
.show-card img.cover,
.show-card .cover.ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.show-card .cover.ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.cover-chip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}
.cover-chip.free { color: #bbf7d0; }
.cover-chip.paid { color: #fde68a; }
.card-meta {
  padding: 8px 9px 10px;
}
.card-meta h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta .card-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.free { color: var(--safe); border-color: rgba(74, 222, 128, 0.4); }
.badge.paid { color: var(--accent); border-color: rgba(240, 198, 116, 0.4); }

/* —— Detail / immersive play —— */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

body.page-drama {
  background: #000;
}
body.page-drama #main {
  max-width: none;
  padding: 0;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}
body.page-drama .tabbar {
  background: rgba(0, 0, 0, 0.88);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.play-stage {
  position: relative;
  width: 100%;
  height: calc(100dvh - 56px - env(safe-area-inset-bottom));
  min-height: 480px;
  background: #000;
  overflow: hidden;
  color: #fff;
}
.play-stage .player-wrap {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}
.play-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.play-stage .player-empty {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  max-height: none;
  background: #111;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #a1a1aa;
}

.play-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.play-top > * { pointer-events: auto; }
.play-back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
}
.play-back svg { width: 22px; height: 22px; }
.play-ep-label {
  font-size: 16px;
  font-weight: 650;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.play-side {
  position: absolute;
  right: 10px;
  bottom: 108px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.play-side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  padding: 0;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.play-side-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.play-side-btn.on { color: #ff3b5c; }

.play-meta {
  position: absolute;
  left: 14px;
  right: 72px;
  bottom: 52px;
  z-index: 4;
  pointer-events: none;
}
.play-meta h1 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,.75);
}
.play-meta .play-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.play-meta .play-stat svg { width: 14px; height: 14px; opacity: .9; }

.play-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.play-bar button {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.play-bar button svg { width: 18px; height: 18px; }
.play-time {
  flex: none;
  font-size: 11px;
  color: rgba(255,255,255,.85);
  font-variant-numeric: tabular-nums;
  min-width: 78px;
}
.play-seek {
  flex: 1;
  min-width: 0;
  appearance: none;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.25);
  outline: none;
}
.play-seek::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}
.play-speed {
  flex: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  padding: 4px 6px;
  cursor: pointer;
}

.ep-sheet {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ep-sheet[hidden] { display: none; }
.ep-sheet-card {
  width: min(560px, 100%);
  max-height: 70vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 16px 16px 0 0;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  color: var(--text);
}
.ep-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ep-sheet-head img,
.ep-sheet-head .ph {
  width: 64px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--chip);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
}
.ep-sheet-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.3;
}
.ep-sheet-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.ep-sheet-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.ep-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.ep-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  border-radius: 8px;
  height: 40px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.ep-chip.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.ep-chip.locked { opacity: 0.7; }
.ep-chip .lock {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  color: #f59e0b;
  font-weight: 700;
}

.pay-cta {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 50;
  max-width: calc(100% - 32px);
}
.empty {
  padding: 56px 12px;
  text-align: center;
  color: var(--muted);
}
.muted { color: var(--muted); font-size: 13px; }


/* —— Novel reader —— */
.read-cta {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14px;
}
.intro-block { margin: 8px 0 18px; }
.intro-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.toc { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.toc-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.toc-row.current { border-color: var(--accent); }
.toc-row.locked { opacity: 0.55; }
.toc-no {
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}
.toc-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-meta { font-size: 12px; color: var(--muted); }

#main.reading { max-width: 680px; }
.read-shell { padding-bottom: 32px; }
.read-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
}
.read-bar .nav-back {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}
.read-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.read-tools #fontLabel {
  font-size: 12px;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
}
button.sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.read-article { padding: 8px 0 20px; }
.read-title {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 750;
}
.read-body {
  line-height: 1.8;
  letter-spacing: 0.01em;
}
.read-body p {
  margin: 0 0 1.1em;
}
.read-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--line);
}
.read-nav a.ghost,
.read-nav button.ghost,
.read-nav span.muted {
  min-width: 72px;
  text-align: center;
}
.book-hero,
.drama-hero {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 4px 0 18px;
}
.book-hero .poster-wrap {
  position: relative;
  width: 110px;
}
.book-hero .poster,
.book-hero .poster.ph {
  width: 110px;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: var(--chip);
  border: 1px solid var(--line);
}
.book-hero .poster.ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.book-hero h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.book-hero .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.section-title {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.ghost {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

body.page-read #main {
  max-width: 680px;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
body.page-read .tabbar {
  display: none;
}
