/* ==========================================================================
   CineTale · PRESTIGE CINEMA LAYOUT (DARK · SEPIA · LIGHT)
   2-Tier Netflix / Apple TV+ Pure Bilingual Illustrated Novel Platform
   ========================================================================== */

body {
  background: var(--bg-body-glow), var(--bg-root);
  background-attachment: fixed;
  min-height: 100dvh;
}

body.in-reader-view .site-nav {
  display: none;
}

/* ==========================================================================
   GLOBAL TOP NAVIGATION BAR (PURE READING · ZERO CLUTTER)
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav-inner {
  max-width: 1240px;
  height: 58px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
  padding: 4px 2px;
  transition: opacity 0.2s ease;
}

.brand-btn:hover {
  opacity: 0.92;
}

.brand-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(226, 186, 109, 0.22);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1;
}

.brand-accent {
  color: var(--gold-primary);
}

.brand-divider {
  width: 1px;
  height: 16px;
  background: var(--border-medium);
  margin: 0 2px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 99px;
  color: var(--text-secondary);
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-medium);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.nav-icon-btn:hover {
  background: var(--gold-glow);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-medium);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.nav-pill-btn:hover {
  background: var(--gold-glow);
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.nav-pill-btn.primary {
  color: #161108;
  font-weight: 600;
  background: linear-gradient(180deg, #f2da9e 0%, #d4a654 100%);
  border-color: rgba(255, 245, 214, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 20px rgba(210, 166, 87, 0.24);
}

.nav-pill-btn.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #120d05;
}

.nav-pill-btn:active,
.quiet-btn:active,
.btn-primary-luxury:active,
.btn-ghost-luxury:active {
  transform: scale(0.97);
}

.nav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gold-primary);
  background: rgba(226, 186, 109, 0.16);
  border: 1px solid rgba(226, 186, 109, 0.34);
}

/* ==========================================================================
   MAIN STAGE & VIEW CONTAINERS
   ========================================================================== */

.main-stage {
  width: 100%;
  min-width: 0;
}

.view-section {
  display: none;
  width: 100%;
}

.view-section.active {
  display: block;
}

.page-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 32px 64px;
}

/* ==========================================================================
   SHARED BUTTONS, PILLS & TYPOGRAPHY ELEMENTS
   ========================================================================== */

.quiet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quiet-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.82;
}

.quiet-btn:hover {
  color: var(--text-primary);
  background: var(--gold-glow);
  border-color: var(--border-medium);
}

.quiet-btn.on {
  color: var(--gold-primary);
  border-color: var(--border-gold);
  background: var(--gold-glow);
}

.btn-primary-luxury {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: #141008;
  background: linear-gradient(180deg, #f3dc9f 0%, #d4a554 100%);
  border: 1px solid rgba(255, 246, 220, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 8px 26px rgba(210, 166, 87, 0.26);
  transition: transform 0.16s var(--ease-cinema), box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.btn-primary-luxury:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 30px rgba(210, 166, 87, 0.35);
}

.btn-ghost-luxury {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #e4eaf4;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.16s var(--ease-cinema);
  white-space: nowrap;
}

.btn-ghost-luxury:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(226, 186, 109, 0.4);
  color: #ffffff;
}

.nav-link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link-quiet:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.045);
}

.nav-link-quiet:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.meta-pill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dde3ee;
  backdrop-filter: blur(8px);
}

.meta-pill.gold {
  color: var(--gold-primary);
  background: rgba(226, 186, 109, 0.14);
  border-color: rgba(226, 186, 109, 0.34);
}

.vocab-word {
  position: relative;
  display: inline;
  border-bottom: 1px dotted rgba(226, 186, 109, 0.42);
  padding-bottom: 1px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.vocab-word:hover {
  color: #f3d799;
  border-bottom-color: var(--gold-primary);
  background: rgba(226, 186, 109, 0.09);
  border-radius: 3px;
}

/* Section Headings */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.section-heading.compact {
  margin-bottom: 0;
  flex-direction: column;
  gap: 3px;
}

.section-heading h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

.section-heading span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   VIEW 1: HOME SPOTLIGHT + CONTINUE READING + SERIES CATALOG
   ========================================================================== */

.home-spotlight,
.series-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  min-height: 450px;
  background: #0a0e18;
  margin-bottom: 36px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
}

.home-spotlight {
  display: block;
}

.series-hero {
  display: flex;
  align-items: flex-end;
  min-height: 400px;
  margin-bottom: 34px;
}

/* Native GPU-Accelerated Scroll-Snap Carousel Track */
.spotlight-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
}

.spotlight-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}

.spotlight-track::-webkit-scrollbar {
  display: none;
}

.spotlight-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  min-height: 450px;
  display: flex;
  align-items: flex-end;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.spotlight-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.spotlight-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 1.2s var(--ease-cinema), opacity 0.45s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}

@media (hover: hover) {
  .spotlight-slide:hover .spotlight-bg,
  .series-hero:hover .spotlight-bg {
    transform: scale(1.024);
  }
}

.spotlight-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.95) 0%, rgba(8, 11, 18, 0.78) 44%, rgba(8, 11, 18, 0.16) 100%),
    linear-gradient(0deg, rgba(8, 11, 18, 0.96) 0%, rgba(8, 11, 18, 0.34) 44%, rgba(8, 11, 18, 0.08) 100%);
  pointer-events: none;
}

.spotlight-content,
.series-hero-content {
  position: relative;
  z-index: 2;
  max-width: 630px;
  padding: 40px 44px;
}

.series-hero-content {
  display: flex;
  flex-direction: column;
}

.series-hero-content .hero-meta-row { order: 1; }
.series-hero-content .hero-zh-title { order: 2; }
.series-hero-content .hero-title { order: 3; }
.series-hero-content .hero-desc { order: 4; }
.series-hero-content .hero-progress-strip { order: 5; }
.series-hero-content .hero-actions { order: 6; }

/* Mobile-only native app controls (Hidden cleanly on Desktop) */
.nav-search-mob-btn,
.spotlight-edge-arrows,
.spotlight-mobile-meta,
.catalog-mob-meta,
.btn-text-short,
.btn-icon-mob,
.series-inline-meta,
.series-desc-toggle,
.series-mobile-actions,
.series-mobile-tabs,
.ep-play-overlay,
.drawer-sheet-handle,
.mobile-bottom-nav {
  display: none;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-zh-title {
  font-family: var(--font-zh-serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--cyan-time);
  opacity: 0.9;
  margin-bottom: 5px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 600;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #fcf8f0;
  margin-bottom: 12px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-desc {
  font-size: 14px;
  color: #c8d0df;
  line-height: 1.68;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-hero .hero-desc {
  -webkit-line-clamp: unset;
}

.hero-progress-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-size: 12.5px;
  color: #c5cedf;
  margin-bottom: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-progress-strip strong {
  color: #ffffff;
  font-weight: 600;
}

.home-spotlight .meta-pill.gold,
.series-hero .meta-pill.gold {
  color: #f3d289;
  background: rgba(226, 186, 109, 0.18);
  border-color: rgba(226, 186, 109, 0.42);
}

.home-spotlight .hero-zh-title,
.series-hero .hero-zh-title {
  color: #79dbf0;
}

.series-hero-content {
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Spotlight Switcher (Bottom Right) */
.spotlight-switcher {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 99px;
  background: rgba(8, 11, 18, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spotlight-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #d6dce8;
  transition: background 0.18s ease, color 0.18s ease;
}

.spotlight-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-primary);
}

.spotlight-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spotlight-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.25s var(--ease-cinema), background 0.25s ease;
}

.spotlight-dot.active {
  width: 20px;
  background: var(--gold-primary);
}

/* ---- Continue Reading Rail ---- */
.continue-section {
  margin-bottom: 38px;
}

.continue-heading-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.rail-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rail-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.rail-arrow-btn:hover {
  background: var(--gold-glow);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.rail-arrow-btn:active {
  transform: scale(0.92);
}

.continue-rail-wrap {
  position: relative;
}

.continue-rail-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--bg-root) 92%);
}

.continue-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-right: 36px;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.continue-rail::-webkit-scrollbar {
  display: none;
}

.continue-card {
  flex: 0 0 278px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card-soft);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: transform 0.24s var(--ease-cinema), border-color 0.24s ease, box-shadow 0.24s ease;
}

.continue-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.continue-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #080c15;
}

.continue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.6s var(--ease-cinema);
}

.continue-card:hover .continue-thumb img {
  transform: scale(1.04);
}

.continue-play-pill {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 24, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 186, 109, 0.48);
  color: var(--gold-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.thumb-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.thumb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c99a49, var(--gold-primary));
}

.continue-body {
  padding: 12px 14px 13px;
}

.continue-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Library Catalog Section ---- */
.library-section {
  margin-bottom: 24px;
}

.library-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 16px;
}

.library-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.library-search-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
  flex: 0 1 300px;
}

.library-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.library-search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 34px;
  border-radius: 99px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.library-search-input::-webkit-search-cancel-button,
.drawer-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.library-search-input::placeholder {
  color: var(--text-muted);
}

.library-search-input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.library-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}

.library-search-clear.visible {
  display: inline-flex;
}

.library-search-clear:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-chip {
  padding: 6px 13px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.filter-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.filter-chip.active {
  background: var(--gold-glow);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card-grad);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: transform 0.26s var(--ease-cinema), border-color 0.26s ease, box-shadow 0.26s ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.catalog-match-hint {
  font-size: 11px;
  color: var(--gold-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-empty-state {
  grid-column: 1 / -1;
  padding: 44px 20px;
  text-align: center;
  border-radius: 16px;
  background: var(--bg-card-soft);
  border: 1px dashed var(--border-medium);
}

.catalog-empty-state p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.catalog-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #080c15;
}

.catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.7s var(--ease-cinema);
}

.catalog-card:hover .catalog-thumb img {
  transform: scale(1.05);
}

.catalog-thumb-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.1) 0%, rgba(8, 11, 18, 0) 45%, rgba(12, 16, 28, 0.88) 100%);
  pointer-events: none;
}

.catalog-genre-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f7efdf;
  background: rgba(8, 11, 18, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.catalog-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-primary);
  background: rgba(14, 19, 32, 0.82);
  border: 1px solid rgba(226, 186, 109, 0.36);
}

.catalog-status-badge.done {
  color: var(--emerald-safe);
  border-color: rgba(107, 196, 156, 0.42);
}

.catalog-body {
  padding: 13px 15px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.catalog-genre {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.32;
  margin-bottom: 3px;
}

.catalog-zh {
  font-family: var(--font-zh-serif);
  font-size: 12px;
  color: var(--text-pinyin);
  opacity: 0.85;
  margin-bottom: 8px;
}

.catalog-teaser {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.52;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.catalog-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.catalog-footer-cta {
  color: var(--gold-primary);
  font-weight: 500;
}

/* Balanced 8th Bento Discovery Card ("Chọn ngẫu nhiên") */
.catalog-discover-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 15%, rgba(229, 190, 112, 0.14), transparent 58%),
    var(--bg-card-grad);
  border: 1px dashed var(--border-gold-soft);
  text-align: left;
  transition: transform 0.26s var(--ease-cinema), border-color 0.24s ease, box-shadow 0.26s ease;
}

.catalog-discover-card:hover {
  transform: translateY(-4px);
  border-style: solid;
  border-color: var(--border-gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.discover-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold-primary);
  background: var(--gold-glow);
  border: 1px solid var(--border-gold-soft);
  margin-bottom: 14px;
}

.discover-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.discover-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.discover-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.discover-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-primary);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.site-footer {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Open Editorial 4-Column Footer (Home) */
.site-footer-rich {
  background: transparent;
  border-radius: 0;
  padding: 40px 0 8px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.76fr 0.95fr 1.18fr;
  gap: 28px 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(229, 190, 112, 0.2);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.68;
  color: var(--text-secondary);
  max-width: 360px;
  margin-bottom: 16px;
}

.footer-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-segment);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.footer-domain-pill:hover {
  border-color: var(--border-gold);
  background: var(--gold-glow);
  color: var(--gold-primary);
}

.footer-col-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 14px;
}

.footer-link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-link-btn {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 2px 0;
  text-align: left;
  transition: color 0.18s ease, transform 0.15s ease;
}

.footer-link-btn:hover {
  color: var(--text-primary);
  transform: translateX(2px);
}

.footer-link-btn.accent {
  color: var(--gold-primary);
  font-weight: 600;
  margin-top: 3px;
}

.footer-contact-note {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.footer-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
  border: 1px solid var(--border-medium);
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.footer-email-box:hover {
  border-color: var(--border-gold);
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-email-link svg {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.footer-email-link:hover {
  color: var(--gold-primary);
}

.footer-copy-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: var(--bg-segment);
  border: 1px solid var(--border-subtle);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.footer-copy-btn:hover {
  background: var(--gold-glow);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.footer-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-primary);
  text-decoration: none;
  transition: opacity 0.18s ease, transform 0.15s ease;
}

.footer-feedback-btn:hover {
  opacity: 0.88;
  transform: translateX(2px);
}

.footer-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom-bar strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Slim Footer for Series Detail View */
.site-footer-slim {
  margin-top: 44px;
  padding: 20px 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.footer-slim-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-slim-left img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.footer-slim-left strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-slim-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.footer-slim-btn {
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.16s ease;
}

.footer-slim-btn:hover {
  color: var(--gold-primary);
}

/* ==========================================================================
   INFO, FAQ & LEGAL MODAL (About · FAQ · Terms · Privacy · Copyright)
   ========================================================================== */
.info-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: rgba(4, 6, 12, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.info-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  z-index: 98;
  width: min(700px, calc(100vw - 28px));
  max-height: min(82dvh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--bg-popover);
  border: 1px solid var(--border-gold-soft);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.28s var(--ease-cinema), visibility 0s linear 0.28s;
}

.info-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.24s ease, transform 0.28s var(--ease-cinema), visibility 0s linear 0s;
}

.info-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.info-modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.info-modal-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.info-modal-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.info-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--bg-segment);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.info-modal-close:hover {
  color: var(--text-primary);
  background: var(--gold-glow);
  border-color: var(--border-gold-soft);
}

.info-modal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.info-modal-tabs::-webkit-scrollbar {
  display: none;
}

.info-tab-btn {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-segment);
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.info-tab-btn:hover {
  color: var(--text-primary);
}

.info-tab-btn.active {
  background: var(--gold-glow);
  color: var(--gold-primary);
  border-color: var(--border-gold-soft);
  font-weight: 600;
}

.info-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.72;
}

.info-modal-body .doc-updated {
  display: inline-block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-segment);
}

.info-modal-body h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 18px 0 7px;
}

.info-modal-body h3:first-of-type {
  margin-top: 4px;
}

.info-modal-body p {
  margin-bottom: 10px;
}

.info-modal-body ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.info-modal-body li {
  margin-bottom: 6px;
}

.info-modal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.info-modal-body a {
  color: var(--gold-primary);
  text-decoration: none;
}

.info-modal-body a:hover {
  text-decoration: underline;
}

.info-modal-body kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-segment);
  border: 1px solid var(--border-medium);
}

.info-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 22px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-glass-subtle);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.info-modal-foot a {
  color: var(--gold-primary);
  font-weight: 500;
  text-decoration: none;
}

.info-modal-foot a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   VIEW 2: SERIES DETAIL PAGE (CAST + EPISODES)
   ========================================================================== */

.series-top-crumb {
  margin-bottom: 16px;
}

.cast-section {
  margin-bottom: 38px;
}

.cast-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 14px;
}

.cast-card {
  display: flex;
  gap: 13px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card-soft);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.cast-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.cast-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0e18;
}

.cast-info {
  flex: 1;
  min-width: 0;
}

.cast-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.cast-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.cast-zh {
  font-family: var(--font-zh);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cast-role {
  font-size: 11.5px;
  color: var(--gold-soft);
  margin: 2px 0 5px;
}

.cast-bio {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Episodes Grid */
.episodes-section {
  margin-bottom: 24px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.episode-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-card-soft);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s var(--ease-cinema);
}

.episode-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.ep-thumb-wrap {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0d1220;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.ep-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.ep-num-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #f8f2e6;
  background: rgba(8, 11, 18, 0.76);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ep-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ep-top-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ep-status-playable {
  color: var(--gold-primary);
  font-weight: 600;
}

.ep-status-completed {
  color: var(--emerald-safe);
  font-weight: 600;
}

.ep-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-zh {
  font-family: var(--font-zh);
  font-size: 12px;
  color: var(--text-pinyin);
  margin-bottom: 6px;
}

.ep-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   VOCABULARY TOOLTIP POPOVER (Clean Glass)
   ========================================================================== */

.vocab-popover {
  position: fixed;
  z-index: 90;
  width: 268px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--bg-popover);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-gold);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  display: none;
  animation: fadeInCinema 0.2s ease forwards;
}

.vocab-popover.open {
  display: block;
}

.vp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.vp-hanzi {
  font-family: var(--font-zh);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.vp-pinyin-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 99px;
  color: var(--text-pinyin);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.vp-meaning {
  font-size: 13.5px;
  color: var(--text-primary);
  margin-top: 4px;
  margin-bottom: 10px;
}

.vp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   SLIDE-OVER DRAWER (TOC, CAST, SAVED QUOTES & WORDS + BACKUP)
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.56);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.case-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 410px;
  max-width: 92vw;
  height: 100dvh;
  background: var(--bg-drawer);
  border-left: 1px solid var(--border-subtle);
  z-index: 65;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-cinema), visibility 0s linear 0.35s;
}

.case-drawer.open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform 0.35s var(--ease-cinema), visibility 0s linear 0s;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-tabs {
  display: flex;
  padding: 8px 20px 0;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-tab {
  padding: 8px 2px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.drawer-tab.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 28px;
}

.drawer-brand-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px max(11px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-glass-subtle);
  font-size: 11.5px;
  color: var(--text-muted);
}

.drawer-brand-foot img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.drawer-brand-foot strong {
  color: var(--gold-primary);
  font-weight: 600;
}

.drawer-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.drawer-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border-radius: 9px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12.5px;
  outline: none;
}

.drawer-search-input:focus {
  border-color: var(--border-gold);
}

.btn-ghost-luxury.series-save-btn.saved {
  color: var(--gold-primary);
  background: rgba(226, 186, 109, 0.16);
  border-color: rgba(226, 186, 109, 0.48);
}

.series-save-btn.saved svg {
  fill: currentColor;
}

.case-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.case-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.vocab-remove-btn {
  padding: 5px 8px;
  color: var(--text-muted);
}

.vocab-remove-btn:hover {
  color: var(--crimson-alert);
  border-color: rgba(217, 107, 118, 0.4);
}

.saved-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 4px 0 10px;
}

/* Saved Book Cards (Pure-Reading My List) */
.saved-book-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.saved-book-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.saved-book-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.saved-book-thumb {
  width: 82px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
  background: #0a0e18;
  border: 1px solid var(--border-subtle);
}

.saved-book-info {
  flex: 1;
  min-width: 0;
}

.saved-book-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 2px;
}

.saved-book-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-book-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-book-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.saved-quote-card {
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  transition: border-color 0.2s ease;
}

.saved-quote-card:hover {
  border-color: var(--border-gold);
}

.saved-quote-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.saved-quote-thumb {
  width: 58px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.saved-quote-meta {
  flex: 1;
  min-width: 0;
}

.saved-quote-book {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-quote-loc {
  font-size: 11px;
  color: var(--gold-soft);
}

.saved-quote-zh {
  font-family: var(--font-zh);
  font-size: 14px;
  color: var(--text-prose-zh);
  line-height: 1.55;
  margin-bottom: 4px;
}

.saved-quote-vi {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 9px;
}

.saved-quote-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ==========================================================================
   LAZY BOOK LOADING INDICATOR & END-OF-BOOK RECOMMENDATIONS
   ========================================================================== */

.book-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.book-loading-bar.active {
  opacity: 1;
}

.book-loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  animation: bookLoadSlide 0.9s ease-in-out infinite;
}

@keyframes bookLoadSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.end-reco-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}

.end-reco-heading {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 11px;
  text-align: center;
}

.end-reco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.end-reco-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: 12px;
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.end-reco-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.end-reco-thumb {
  width: 82px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #0a0e18;
}

.end-reco-info {
  flex: 1;
  min-width: 0;
}

.end-reco-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.end-reco-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 3px;
}

.end-reco-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST STACK
   ========================================================================== */

.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 22px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

body.in-cinema-reader .toast-stack {
  bottom: 84px;
}

.toast-item {
  padding: 10px 15px;
  border-radius: 10px;
  background: var(--bg-popover);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  font-size: 12.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastSlideIn 0.32s var(--ease-cinema) forwards;
}

.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  flex-shrink: 0;
}

.toast-item.cyan .toast-dot {
  background: var(--cyan-time);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1080px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
  }
}

@media (max-width: 820px) {
  body {
    background-attachment: scroll;
  }

  /* ---- Minimal Native Streaming Top Bar ---- */
  .site-nav {
    border-bottom: none;
    background: color-mix(in srgb, var(--bg-root) 88%, transparent);
  }

  .site-nav-inner {
    padding: 0 16px;
    height: 52px;
  }

  .brand-divider,
  .brand-tagline,
  #navResumeBtn,
  #navSavedBtn {
    display: none !important;
  }

  .nav-search-mob-btn {
    display: inline-flex;
  }

  .nav-icon-btn {
    width: 42px;
    height: 42px;
    border-color: transparent;
    background: var(--bg-glass-subtle);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-icon-btn:active {
    transform: scale(0.92);
  }

  .page-container {
    padding: 0 16px calc(86px + env(safe-area-inset-bottom));
  }

  /* ---- NETFLIX-STYLE SMOOTH SCROLL-SNAP MOBILE BILLBOARD (HOME) ---- */
  .home-spotlight {
    position: relative;
    min-height: 0;
    margin: 0 -16px 22px;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .spotlight-track {
    touch-action: pan-x pan-y;
    cursor: default;
  }

  .spotlight-slide {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
  }

  .spotlight-media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;
    background: #080c15;
  }

  .spotlight-media .spotlight-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: none;
  }

  .spotlight-media .spotlight-scrim {
    position: absolute;
    inset: 0;
    transform: scaleY(1.04);
    transform-origin: top;
    background: linear-gradient(
      180deg,
      rgba(8, 11, 18, 0.16) 0%,
      rgba(8, 11, 18, 0) 40%,
      color-mix(in srgb, var(--bg-root) 76%, transparent) 80%,
      var(--bg-root) 98%,
      var(--bg-root) 100%
    );
    pointer-events: none;
  }

  /* Sleek Floating Left/Right Arrows Centered Vertically on the 16:9 Artwork */
  .spotlight-edge-arrows {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 6;
    pointer-events: none;
  }

  .spotlight-edge-btn {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(8, 11, 18, 0.54);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.44);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .spotlight-edge-btn:active {
    transform: scale(0.9);
    background: rgba(226, 186, 109, 0.3);
    border-color: rgba(226, 186, 109, 0.65);
    color: #ffffff;
  }

  .home-spotlight .spotlight-content {
    padding: 0 16px 10px;
    margin-top: -18px;
    max-width: 100%;
    text-align: center;
  }

  .home-spotlight .hero-meta-row,
  .home-spotlight .hero-desc {
    display: none;
  }

  .home-spotlight .hero-zh-title {
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--cyan-time);
    margin-bottom: 4px;
  }

  .home-spotlight .hero-title {
    font-size: 27px;
    line-height: 1.12;
    color: var(--text-primary);
    text-shadow: none;
    margin-bottom: 6px;
  }

  .spotlight-mobile-meta {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 14px;
  }

  .spotlight-mobile-meta .smm-accent {
    color: var(--gold-primary);
    font-weight: 600;
  }

  .home-spotlight .hero-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .home-spotlight .btn-primary-luxury {
    flex: 1.15;
    justify-content: center;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13.5px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .home-spotlight .btn-primary-luxury:active,
  .home-spotlight .btn-ghost-luxury:active,
  .series-hero .btn-primary-luxury:active {
    transform: scale(0.975);
    filter: brightness(0.96);
  }

  .home-spotlight .btn-ghost-luxury {
    flex: 0.85;
    justify-content: center;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--text-primary);
    background: var(--bg-card-soft);
    border: 1px solid var(--border-medium);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-text-full {
    display: none;
  }

  .btn-text-short,
  .btn-icon-mob {
    display: inline;
  }

  .spotlight-switcher {
    position: relative;
    right: auto;
    bottom: auto;
    display: flex;
    justify-content: center;
    margin: 2px auto 0;
    padding: 4px;
    background: transparent;
    border: none;
    backdrop-filter: none;
  }

  .spotlight-arrow {
    display: none;
  }

  .spotlight-dots {
    gap: 6px;
  }

  .spotlight-dot {
    position: relative;
    width: 6px;
    height: 6px;
    background: var(--border-medium);
    -webkit-tap-highlight-color: transparent;
  }

  .spotlight-dot::after {
    content: '';
    position: absolute;
    inset: -14px -8px;
  }

  .spotlight-dot.active {
    width: 22px;
    background: var(--gold-primary);
  }

  /* ---- NETFLIX-STYLE CONTINUE RAIL & BORDERLESS POSTER GRID (HOME) ---- */
  .continue-section {
    margin-bottom: 24px;
  }

  .continue-section .section-heading span,
  .rail-nav-btns,
  .continue-rail-wrap::after {
    display: none;
  }

  .section-heading {
    margin-bottom: 11px;
    gap: 2px 10px;
  }

  .section-heading h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .section-heading span {
    font-size: 11.5px;
  }

  .continue-rail {
    gap: 11px;
    margin: 0 -16px;
    padding: 0 16px 4px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .continue-rail::-webkit-scrollbar,
  .filter-strip::-webkit-scrollbar {
    display: none;
  }

  .continue-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border: none;
    background: transparent;
    border-radius: 10px;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
  }

  .continue-card:hover {
    transform: none;
    box-shadow: none;
  }

  .continue-card:active .continue-thumb {
    transform: scale(0.97);
  }

  .continue-thumb {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
    transition: transform 0.16s ease;
  }

  .continue-play-pill {
    right: auto;
    bottom: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: rgba(8, 11, 18, 0.62);
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    color: #ffffff;
  }

  .continue-body {
    padding: 8px 2px 0;
  }

  .continue-title {
    font-size: 13px;
  }

  .continue-sub {
    font-size: 11px;
    color: var(--text-muted);
  }

  .library-section {
    scroll-margin-top: 62px;
  }

  .library-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .library-search-wrap {
    width: 100%;
    flex: 1 1 100%;
  }

  .library-search-input {
    height: 42px;
    border-radius: 11px;
    font-size: 16px;
  }

  .drawer-search-input {
    height: 40px;
    font-size: 16px;
  }

  .library-controls {
    margin-bottom: 14px;
  }

  .filter-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 16px 2px;
    gap: 8px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
  }

  .filter-chip:active {
    transform: scale(0.95);
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 11px;
  }

  .catalog-card {
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
  }

  .catalog-card:hover {
    transform: none;
    box-shadow: none;
  }

  .catalog-card:active .catalog-thumb {
    transform: scale(0.97);
  }

  .catalog-thumb {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    transition: transform 0.16s ease;
  }

  .catalog-body {
    padding: 8px 2px 0;
  }

  .catalog-genre,
  .catalog-teaser,
  .catalog-footer {
    display: none;
  }

  .catalog-title {
    font-size: 13.5px;
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-zh {
    font-size: 11px;
    margin-bottom: 2px;
    color: var(--text-muted);
  }

  .catalog-mob-meta {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    opacity: 0.88;
  }

  .catalog-genre-badge {
    top: 7px;
    left: 7px;
    font-size: 9.5px;
    padding: 2px 7px;
  }

  .catalog-status-badge {
    top: auto;
    bottom: 7px;
    right: 7px;
    font-size: 9.5px;
    padding: 2px 7px;
  }

  .catalog-discover-card {
    padding: 14px 12px;
    border-radius: 12px;
    min-height: 170px;
  }

  .discover-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    margin-bottom: 10px;
  }

  .discover-title {
    font-size: 16px;
  }

  .discover-desc {
    font-size: 11.5px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .site-footer {
    margin-top: 32px;
    padding-top: 24px;
    font-size: 12px;
  }

  .site-footer-rich {
    margin-top: 34px;
    padding: 28px 0 8px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 22px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .site-footer-slim {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .info-modal {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
    border: none;
    border-top: 1px solid var(--border-medium);
    transform: translateY(100%);
  }

  .info-modal.open {
    transform: translateY(0);
  }

  .info-modal-head {
    padding: 16px 18px 12px;
  }

  .info-modal-tabs {
    padding: 10px 16px;
  }

  .info-modal-body {
    padding: 16px 18px 22px;
  }

  .info-modal-foot {
    padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  }

  /* ---- NETFLIX-STYLE SERIES DETAIL PAGE (FULL-BLEED HERO + TABS) ---- */
  .series-page-container {
    position: relative;
  }

  .series-top-crumb {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 8;
    margin: 0;
  }

  .series-top-crumb .quiet-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    background: rgba(8, 11, 18, 0.66);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.44);
    -webkit-tap-highlight-color: transparent;
  }

  .series-top-crumb .quiet-btn:active {
    transform: scale(0.9);
  }

  .series-top-crumb .quiet-btn svg {
    width: 18px;
    height: 18px;
    opacity: 1;
  }

  .series-top-crumb .crumb-label {
    display: none;
  }

  .series-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    margin: 0 -16px 14px;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .series-hero .spotlight-bg {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center 18%;
    flex-shrink: 0;
  }

  .series-hero .spotlight-scrim {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    aspect-ratio: 16 / 9;
    transform: scaleY(1.04);
    transform-origin: top;
    background: linear-gradient(
      180deg,
      rgba(8, 11, 18, 0.28) 0%,
      rgba(8, 11, 18, 0) 36%,
      color-mix(in srgb, var(--bg-root) 78%, transparent) 82%,
      var(--bg-root) 98%,
      var(--bg-root) 100%
    );
    pointer-events: none;
  }

  .series-hero-content {
    padding: 0 16px 4px;
    margin-top: -18px;
    max-width: 100%;
  }

  /* Restore natural Netflix Mobile vertical flow */
  .series-hero-content > * {
    order: 0 !important;
  }

  .series-hero .hero-meta-row,
  .series-hero .hero-progress-strip,
  .series-hero #seriesJumpEpisodesBtn,
  .series-hero #seriesSaveBtn,
  .series-hero #seriesShareBtn {
    display: none !important;
  }

  .series-hero .hero-zh-title {
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--cyan-time);
    margin-bottom: 3px;
  }

  .series-hero .hero-title {
    font-size: 26px;
    line-height: 1.14;
    color: var(--text-primary);
    text-shadow: none;
    margin-bottom: 6px;
  }

  .series-inline-meta {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .series-inline-meta .sim-accent {
    color: var(--gold-primary);
    font-weight: 600;
  }

  .series-inline-meta .sim-done {
    color: var(--emerald-safe);
    font-weight: 600;
  }

  .series-hero .hero-actions {
    margin-bottom: 14px;
  }

  .series-hero .btn-primary-luxury {
    width: 100%;
    height: 44px;
    justify-content: center;
    border-radius: 9px;
    font-size: 14px;
  }

  .series-hero .hero-desc {
    font-size: 13px;
    line-height: 1.58;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .series-hero .hero-desc.expanded {
    display: block;
    -webkit-line-clamp: unset;
  }

  .series-desc-toggle {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-primary);
    padding: 2px 0 8px;
  }

  /* Frameless Netflix-style icon action bar */
  .series-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    padding: 10px 8px 4px;
    margin-top: 2px;
  }

  .series-mob-act-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.18s ease, background 0.18s ease;
  }

  .series-mob-act-btn.saved {
    color: var(--gold-primary);
  }

  .series-mob-act-btn:active {
    background: var(--bg-glass-subtle);
    color: var(--gold-primary);
  }

  /* Netflix-style underline/topline Tab Bar (Episodes | Cast) */
  .series-mobile-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 4px -16px 16px;
    padding: 0 16px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }

  .series-tab-btn {
    position: relative;
    padding: 12px 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.18s ease;
  }

  .series-tab-btn.active {
    color: var(--text-primary);
  }

  .series-tab-btn.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--gold-primary);
  }

  .series-tab-count {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 2px;
  }

  /* Tab-driven section switching on mobile */
  #seriesView[data-mobile-tab='episodes'] .cast-section {
    display: none !important;
  }

  #seriesView[data-mobile-tab='cast'] .episodes-section {
    display: none !important;
  }

  #seriesView .cast-section .section-heading,
  #seriesView .episodes-section .section-heading {
    display: none;
  }

  /* Clean Cast Cards inside Cast tab */
  .cast-section {
    margin-bottom: 20px;
  }

  .cast-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .cast-card {
    padding: 12px;
    gap: 12px;
    border-radius: 12px;
  }

  .cast-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }

  .cast-bio {
    -webkit-line-clamp: 4;
    font-size: 12px;
  }

  /* Netflix Mobile 2-Tier Frameless Episode Rows */
  .episodes-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .episode-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 8px;
    padding: 14px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
  }

  .episode-card:first-child {
    padding-top: 2px;
  }

  .episode-card:last-child {
    border-bottom: none;
  }

  .episode-card:hover {
    transform: none;
    background: transparent;
  }

  .ep-thumb-wrap {
    grid-column: 1;
    grid-row: 1;
    width: 128px;
    border-radius: 8px;
    align-self: center;
  }

  .ep-play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(8, 11, 18, 0.62);
    border: 1.5px solid rgba(255, 255, 255, 0.78);
    color: #ffffff;
    pointer-events: none;
  }

  .ep-num-badge {
    top: 5px;
    left: 5px;
    padding: 1px 6px;
    font-size: 9.5px;
  }

  .ep-body {
    display: contents;
  }

  .ep-head {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .ep-top-meta {
    font-size: 10.5px;
    gap: 4px;
    margin-bottom: 3px;
  }

  .ep-title {
    font-size: 13.5px;
    line-height: 1.32;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 2px;
  }

  .ep-zh {
    font-size: 11px;
    margin-bottom: 0;
    color: var(--text-muted);
  }

  .ep-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    -webkit-line-clamp: 2;
  }

  .episode-card:active {
    background: var(--bg-glass-subtle);
  }

  .end-reco-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* ---- NATIVE MOBILE BOTTOM SHEET FOR DRAWER (TOC / CAST / SAVED) ---- */
  .case-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 84dvh;
    max-height: calc(100dvh - 44px);
    border-left: none;
    border-top: 1px solid var(--border-medium);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 52px rgba(0, 0, 0, 0.55);
    transform: translateY(100%);
  }

  .case-drawer.open {
    transform: translateY(0);
  }

  .drawer-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 2px;
    flex-shrink: 0;
    touch-action: none;
  }

  .drawer-sheet-handle span {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: var(--border-medium);
  }

  .drawer-header {
    padding: 8px 18px 12px;
  }

  .drawer-tabs {
    padding: 0 16px;
    gap: 0;
  }

  .drawer-tab {
    flex: 1;
    text-align: center;
    padding: 11px 4px;
    font-size: 13px;
  }

  .drawer-content {
    padding: 14px 16px 24px;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- NATIVE MOBILE QUICK-DICTIONARY BOTTOM CARD ---- */
  .vocab-popover {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: calc(98px + env(safe-area-inset-bottom)) !important;
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    padding: 15px 17px;
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
  }

  body.in-reader-view:not(.in-cinema-reader) .vocab-popover {
    bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  }

  /* ---- NATIVE MOBILE BOTTOM TAB BAR ---- */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg-root) 92%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
  }

  body.in-reader-view .mobile-bottom-nav {
    display: none !important;
  }

  .mob-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 0;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.18s ease, transform 0.14s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-tab-btn:active {
    transform: scale(0.92);
  }

  .mob-tab-btn.active {
    color: var(--gold-primary);
    font-weight: 600;
  }

  .mob-tab-icon-wrap {
    position: relative;
    display: inline-flex;
  }

  .mob-tab-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    font-size: 9.5px;
    font-weight: 700;
    color: #141008;
    background: var(--gold-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .toast-stack {
    right: 12px;
    left: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .site-nav-inner {
    padding: 0 14px;
    gap: 8px;
  }

  .brand-btn {
    gap: 8px;
  }

  .brand-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .brand-wordmark {
    font-size: 21px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-pill-btn {
    height: 32px;
    padding: 0 10px;
    gap: 5px;
    font-size: 11.5px;
  }
}
