/* ══════════════════════════════════════════════════════════════════════════════
   Library Netflix 2026 — Premium immersive reading library
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Layout: full-bleed dark canvas ── */
#view-library.nfx-library {
  height: 100%;
  background: linear-gradient(180deg, var(--surface, #0f1219) 0%, #0c0e16 100%);
}
#view-library.nfx-library > .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 100%;
  border-radius: 0;
}

/* ── Header ── */
.nfx-header {
  padding: 28px 28px 0;
  max-width: 1400px;
  margin: 0 auto;
}
.nfx-header h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, #fff 40%, rgba(99,102,241,.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.nfx-header .subtitle {
  color: rgba(255,255,255,.5);
  font-size: 14px;
  margin: 4px 0 0;
}

/* ── Tabs: pill bar ── */
.nfx-library .library-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 28px 0;
  max-width: 1400px;
  margin: 0 auto;
}
.nfx-library .library-tabs::-webkit-scrollbar { display: none; }

.nfx-library .library-tab {
  flex: 0 0 auto;
  min-width: auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  transition: all .18s ease;
}
.nfx-library .library-tab .btn-icon {
  width: 16px;
  height: 16px;
  margin-right: 0;
}
.nfx-library .library-tab-sub { display: none; }
.nfx-library .library-tab:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nfx-library .library-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px rgba(var(--primary-rgb, 99,102,241), .35);
}

/* ── Content area ── */
.nfx-library .library-content {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
}
.nfx-library .library-status {
  padding: 0 28px;
  max-width: 1400px;
  margin: 8px auto 0;
}

/* ── Panels ── */
.nfx-library .library-panel {
  margin-top: 0;
  padding: 18px 0 0;
  overflow-x: hidden;
}

/* ── Netflix Rail ── */
.nfx-rail {
  padding: 0 28px;
  max-width: 1400px;
  margin: 0 auto 24px;
}
.nfx-rail-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.nfx-rail-title {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 900;
  letter-spacing: .2px;
  color: #fff;
}
.nfx-rail-see-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease;
}
.nfx-rail:hover .nfx-rail-see-all { opacity: 1; }

/* ── Rail Track (horizontal scroll) ── */
.nfx-rail-track-wrap {
  position: relative;
}
.nfx-rail-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 14px 0 10px;
  scrollbar-width: none;
}
.nfx-rail-track::-webkit-scrollbar { display: none; }

/* ── Rail Arrow Buttons ── */
.nfx-rail-arrow {
  position: absolute;
  top: 0;
  bottom: 6px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(10,10,18,.92), transparent);
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transition: opacity .2s ease;
  font-size: 22px;
}
.nfx-rail-arrow--right {
  right: 0;
  background: linear-gradient(270deg, rgba(10,10,18,.92), transparent);
}
.nfx-rail-arrow--left { left: 0; }
.nfx-rail-track-wrap:hover .nfx-rail-arrow { opacity: 1; }
.nfx-rail-arrow:hover { color: var(--primary); }

/* ── Netflix Card ── */
.nfx-card {
  flex: 0 0 155px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  cursor: pointer;
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, border-color .22s ease, z-index 0s .22s;
  position: relative;
}
.nfx-card:hover {
  transform: scale(1.08);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 12px 36px rgba(0,0,0,.45), 0 0 20px rgba(var(--primary-rgb,99,102,241),.15);
  z-index: 5;
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, border-color .22s ease, z-index 0s 0s;
}
.nfx-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Cover */
.nfx-card-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  position: relative;
}
.nfx-card-cover .nq-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}
.nfx-card-cover img,
.nfx-card-cover .cover-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nfx-card-cover .nq-cover-fallback {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gradient overlay on hover */
.nfx-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .22s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  pointer-events: none;
}
.nfx-card:hover .nfx-card-overlay { opacity: 1; }

.nfx-card-overlay-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nfx-card-overlay-author {
  font-size: 10px;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card info below cover */
.nfx-card-info {
  padding: 8px 10px 10px;
  min-width: 0;
}
.nfx-card-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.nfx-card-author {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.nfx-card-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.06);
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 4px;
}

/* ── Provenance: Verified badge on card title ── */
.nfx-card-verified {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(34,197,94,.35));
}

/* ── Provenance: AI label overlay on cover ── */
.nfx-card-ai-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(220,38,38,.85);
  border-radius: 4px;
  padding: 2px 5px;
  line-height: 1.2;
  pointer-events: none;
}

/* ── Continue Reading Card (special) ── */
.nfx-card--continue .nfx-card-progress {
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 0;
  overflow: hidden;
}
.nfx-card--continue .nfx-card-progress-fill {
  height: 100%;
  background: var(--accent, #e50914);
  transition: width .3s ease;
}
.nfx-card--continue .nfx-card-chapter {
  font-size: 10px;
  color: rgba(255,255,255,.45);
  padding: 0 10px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Top 10 Rail Track ── */
#nfx-top10-slot .nfx-rail-track { gap: 8px; }
#nfx-top10-slot .nfx-rail-title {
  font-size: clamp(17px, 2.2vw, 22px);
  background: linear-gradient(90deg, #fff 60%, rgba(99,102,241,.7));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Top 10 Trending Card ── */
.nfx-card--top10 {
  flex: 0 0 170px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  position: relative;
  padding: 0;
  gap: 0;
}
.nfx-card--top10:hover {
  transform: scale(1.06);
  box-shadow: none;
  border-color: transparent;
}
.nfx-card--top10:hover .nfx-card-cover {
  box-shadow: 0 0 24px 3px rgba(99,102,241,.22), 0 8px 32px rgba(0,0,0,.55);
}
.nfx-card--top10:hover .nfx-top10-rank {
  opacity: 1;
  filter: drop-shadow(0 0 16px rgba(99,102,241,.35));
}

/* — Rank number: large, overlapping left side of cover — */
.nfx-top10-rank {
  flex: 0 0 auto;
  font-size: 128px;
  font-weight: 900;
  font-style: italic;
  line-height: .82;
  letter-spacing: -8px;
  color: transparent;
  -webkit-text-stroke: 3px rgba(255,255,255,.25);
  background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.06) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  margin-right: -20px;
  opacity: .88;
  transition: opacity .25s ease, filter .25s ease;
}

/* — Cover: portrait 3:4 ratio, overlaps the number — */
.nfx-card--top10 .nfx-card-cover {
  flex: 0 0 120px;
  width: 120px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  z-index: 2;
  background: rgba(255,255,255,.04);
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  transition: box-shadow .25s ease;
}

/* — Title below the card — */
.nfx-top10-title {
  display: none;
}

/* Hide title/handle overlay on library card covers — info is shown below */
.nfx-card-cover .nq-cover-title,
.nfx-card-cover .nq-cover-handle {
  display: none;
}
/* Hide logo on fallback (letter) covers — looks bad at small sizes */
.nfx-card-cover .nq-cover-fallback ~ .nq-cover-logo {
  display: none;
}

/* ── Cover logo in library cards ── */
.nfx-card-cover .nq-cover-logo {
  width: clamp(10px, 12%, 16px);
  bottom: 3px;
  right: 3px;
  opacity: .5;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.9));
}
.nfx-card--top10 .nfx-card-cover .nq-cover-logo {
  width: clamp(10px, 12%, 14px);
  bottom: 3px;
  right: 3px;
  opacity: .65;
}

.nfx-card--continue .nfx-card-cover .nq-cover-logo {
  width: clamp(12px, 15%, 18px);
  bottom: 3px;
  right: 3px;
  opacity: .6;
}

.browse-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 8px;
  padding: 4px 0;
  overflow: visible;
}

.browse-pill {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15px;
  transition: all .18s ease;
}

.browse-pill:hover {
  border-color: rgba(99,102,241,.42);
  background: rgba(99,102,241,.14);
  color: #fff;
}

.browse-pill.active {
  border-color: rgba(96,165,250,.62);
  background: linear-gradient(135deg, rgba(96,165,250,.24), rgba(124,58,237,.2));
  color: #dbeafe;
  box-shadow: 0 0 0 2px rgba(96,165,250,.2);
}

.browse-tag-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.browse-tag-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.86);
  font-size: 12px;
}

.browse-tag-clear,
.browse-mood-clear {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.74);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.browse-mood-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.nfx-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.nfx-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.74);
  font-size: 10px;
  font-weight: 700;
}

/* ── Mine / Owned / Trash panels keep existing grid ── */
.nfx-library .library-grid {
  padding: 0 28px;
  max-width: 1400px;
  margin: 0 auto;
}
.nfx-library .library-trash-bar {
  padding: 0 28px;
  max-width: 1400px;
  margin: 0 auto 12px;
}
.nfx-library .library-empty {
  padding: 48px 28px;
}

/* ── Skeleton ── */
.nfx-card.is-skeleton {
  pointer-events: none;
}
.nfx-card.is-skeleton .nfx-card-cover {
  background: rgba(255,255,255,.04);
}
.nfx-rail-sk .nfx-rail-title {
  width: 140px;
  height: 18px;
  border-radius: 6px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nfx-header { padding: 20px 16px 0; }
  .nfx-library .library-tabs { padding: 12px 16px 0; }
  .nfx-rail { padding: 0 16px; margin-bottom: 20px; }
  .nfx-card { flex: 0 0 125px; }
  .nfx-card--top10 { flex: 0 0 140px; }
  .nfx-top10-rank { font-size: 96px; letter-spacing: -6px; margin-right: -14px; -webkit-text-stroke: 2.5px rgba(255,255,255,.22); }
  .nfx-card--top10 .nfx-card-cover { flex: 0 0 100px; width: 100px; }
  .nfx-library .library-grid { padding: 0 16px; }
  .nfx-library .library-trash-bar { padding: 0 16px; }
  .nfx-library .library-empty { padding: 36px 16px; }
  .nfx-rail-arrow { display: none; }
}

@media (min-width: 900px) {
  .nfx-card { flex: 0 0 170px; }
  .nfx-card--top10 { flex: 0 0 185px; }
  .nfx-top10-rank { font-size: 140px; letter-spacing: -8px; margin-right: -22px; }
  .nfx-card--top10 .nfx-card-cover { flex: 0 0 130px; width: 130px; }
}

@media (min-width: 1200px) {
  .nfx-card { flex: 0 0 185px; }
  .nfx-card--top10 { flex: 0 0 210px; }
  .nfx-top10-rank { font-size: 160px; letter-spacing: -10px; margin-right: -26px; -webkit-text-stroke: 3.5px rgba(255,255,255,.25); }
  .nfx-card--top10 .nfx-card-cover { flex: 0 0 145px; width: 145px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Hero Carousel — Promoted books banner
   ══════════════════════════════════════════════════════════════════════════════ */

.nfx-hero-carousel {
  position: relative;
  width: 100%;
  min-height: 240px;
  max-height: 380px;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 16px;
}

/* ── Track & Slides ── */
.chero-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.chero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
  cursor: pointer;
}
.chero-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* ── Blurred background ── */
.chero-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(.3) saturate(1.3);
  z-index: 0;
}
.chero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 40%, transparent 70%),
              linear-gradient(0deg, rgba(0,0,0,.5) 0%, transparent 40%);
  pointer-events: none;
}

/* ── Content layout ── */
.chero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 40px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 240px;
}

/* ── Cover ── */
.chero-cover {
  flex: 0 0 150px;
  width: 150px;
  height: 215px;
  border-radius: 10px;
  overflow: visible;
  position: relative;
  background: rgba(255,255,255,.04);
  filter: drop-shadow(0 12px 36px rgba(0,0,0,.6));
}
.chero-cover::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%; bottom: -8px;
  height: 30px;
  background: inherit;
  filter: blur(14px) brightness(.4);
  border-radius: 50%;
  opacity: .45;
  z-index: -1;
}
.chero-cover img,
.chero-cover .cover-canvas,
.chero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* ── Info ── */
.chero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chero-badge-promoted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: #fbbf24;
  background: linear-gradient(135deg, rgba(251,191,36,.14), rgba(245,158,11,.08));
  border: 1px solid rgba(251,191,36,.22);
  border-radius: 20px;
  padding: 3px 10px 3px 8px;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}
.chero-badge-promoted::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(251,191,36,.15) 50%, transparent 70%);
  animation: chero-badge-shimmer 3s ease-in-out infinite;
}
@keyframes chero-badge-shimmer {
  0%,100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
.chero-badge-promoted svg { flex: 0 0 auto; position: relative; z-index: 1; }
.chero-title {
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 900;
  letter-spacing: -.3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  line-height: 1.15;
}
.chero-author {
  font-size: 14px;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.chero-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.5);
  align-items: center;
}
.chero-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chero-clicks {
  opacity: .7;
}
.chero-read-btn {
  margin-top: 10px;
  width: auto;
  min-width: 130px;
  align-self: flex-start;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-hover, #4f46e5));
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(99,102,241,.25);
  transition: transform .12s, box-shadow .12s;
}
.chero-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,.35);
}

/* ── Arrows ── */
.chero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 38px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.06);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease, transform .15s;
}
.nfx-hero-carousel:hover .chero-arrow { opacity: 1; }
.chero-arrow:hover { background: rgba(0,0,0,.7); transform: translateY(-50%) scale(1.06); }
.chero-arrow--left { left: 10px; }
.chero-arrow--right { right: 10px; }

/* ── Dots ── */
.chero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
}
.chero-dot {
  width: 24px;
  height: 3px;
  border-radius: 3px;
  border: none;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
  padding: 0;
}
.chero-dot.active {
  background: #fff;
  width: 36px;
}
.chero-dot:hover { background: rgba(255,255,255,.5); }

/* ══ Phased Promo Layout ══════════════════════════════════════════════════ */
.chero-promo-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 28px 32px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 240px;
}
.chero-promo-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 380px;
  min-width: 260px;
}
.chero-promo-bookinfo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.chero-promo-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 28px;
}
.chero-promo-layout--single {
  justify-content: center;
}
.chero-promo-layout--single .chero-promo-left {
  max-width: 520px;
}

/* ── Phase Container & Transitions ── */
.chero-phase-container {
  width: 100%;
  max-width: 480px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .35s cubic-bezier(.4,0,.2,1);
}
.chero-phase-container.chero-phase-out {
  opacity: 0;
}
.chero-phase-container.chero-phase-in {
  opacity: 1;
}
.chero-phase {
  width: 100%;
}

/* ── Quote Phase ── */
.chero-phase--quote {
  position: relative;
  padding: 20px 24px 16px 28px;
  border-left: 3px solid rgba(251,191,36,.4);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(135deg, rgba(251,191,36,.06) 0%, rgba(251,191,36,.02) 100%);
}
.chero-quote-mark {
  position: absolute;
  top: -6px;
  left: 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 56px;
  line-height: 1;
  color: rgba(251,191,36,.22);
  pointer-events: none;
  user-select: none;
}
.chero-quote-text {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.55;
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chero-quote-author {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: .3px;
}
.chero-quote-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(251,191,36,.65);
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.15);
  border-radius: 12px;
  padding: 2px 8px;
}

/* ── Hook Phase ── */
.chero-phase--hook {
  text-align: center;
  padding: 20px 16px;
}
.chero-hook-icon {
  margin: 0 auto 10px;
  color: rgba(139,92,246,.6);
  opacity: .7;
}
.chero-hook-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
  max-width: 400px;
  margin: 0 auto;
}
.chero-hook-label {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(139,92,246,.55);
}

/* ── Stats Phase ── */
.chero-phase--stats {
  padding: 12px 8px;
}
.chero-stats-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.chero-stats-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.chero-stat-item {
  text-align: center;
  min-width: 70px;
}
.chero-stat-num {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.chero-stat-desc {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  margin-top: 2px;
  text-transform: lowercase;
}

/* Mood bars */
.chero-stat-mood {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chero-stat-mood-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chero-stat-mood-label {
  flex: 0 0 60px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  text-align: right;
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chero-stat-mood-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.chero-stat-mood-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(139,92,246,.6), rgba(96,165,250,.5));
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ── App Stats Phase ── */
.chero-phase--appstats {
  text-align: center;
  padding: 16px;
}
.chero-slide--appstats .chero-promo-left {
  opacity: .35;
  filter: blur(1px);
  transition: opacity .4s, filter .4s;
}
.chero-appstats-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(96,165,250,.75);
  background: rgba(96,165,250,.08);
  border: 1px solid rgba(96,165,250,.18);
  border-radius: 16px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.chero-appstats-grid {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.chero-appstat {
  text-align: center;
}
.chero-appstat-num {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.chero-appstat-label {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  font-weight: 500;
  margin-top: 2px;
}
.chero-appstat-tag {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.chero-appstat-tag strong {
  color: rgba(251,191,36,.7);
  font-weight: 700;
}

/* ── Phase responsive: stack vertically on small screens ── */
@media (max-width: 720px) {
  .chero-promo-layout {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
    min-height: 200px;
  }
  .chero-promo-left {
    max-width: 100%;
    min-width: 0;
    gap: 14px;
  }
  .chero-promo-right {
    padding-left: 0;
  }
  .chero-phase-container {
    max-width: 100%;
    min-height: 100px;
  }
  .chero-cover {
    flex: 0 0 90px;
    width: 90px;
    height: 128px;
  }
  .chero-hook-text {
    font-size: 14px;
  }
  .chero-quote-text {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .chero-stats-grid {
    gap: 16px;
  }
  .chero-stat-num {
    font-size: 20px;
  }
}

/* ── Carousel Empty Placeholder ── */
.chero-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
  min-height: 140px;
  background: linear-gradient(135deg, rgba(96,165,250,.04) 0%, rgba(168,85,247,.03) 50%, transparent 100%);
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 16px;
  margin: 0 28px;
  gap: 8px;
}
.chero-empty-icon {
  color: rgba(255,255,255,.18);
  margin-bottom: 4px;
}
.chero-empty-title {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,.55);
  letter-spacing: .1px;
}
.chero-empty-text {
  font-size: 13px;
  color: rgba(255,255,255,.32);
  max-width: 380px;
  line-height: 1.5;
}
.chero-cta-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(96,165,250,.12));
  border: 1px solid rgba(139,92,246,.22);
  color: rgba(167,139,250,.95);
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .1s, box-shadow .16s;
}
.chero-cta-btn:hover {
  background: linear-gradient(135deg, rgba(139,92,246,.28), rgba(96,165,250,.18));
  border-color: rgba(139,92,246,.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,92,246,.15);
}
.chero-cta-btn:active { transform: translateY(0); }
.chero-cta-btn--write {
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(96,165,250,.08));
  border-color: rgba(34,197,94,.18);
  color: rgba(74,222,128,.9);
}
.chero-cta-btn--write:hover {
  background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(96,165,250,.14));
  border-color: rgba(34,197,94,.30);
  box-shadow: 0 4px 16px rgba(34,197,94,.12);
}
@media (max-width: 600px) {
  .chero-empty { margin: 0 16px; padding: 24px 16px; min-height: 110px; }
}

/* ── Skeleton ── */
.chero-skeleton .chero-bg { filter: none; background: rgba(255,255,255,.02); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .nfx-hero-carousel { min-height: 200px; max-height: 300px; border-radius: 12px; }
  .chero-content { padding: 24px 18px; gap: 16px; }
  .chero-cover { flex: 0 0 105px; width: 105px; height: 150px; }
  .chero-cover::after { display: none; }
  .chero-title { font-size: 17px; }
  .chero-arrow { display: none; }
  .chero-read-btn { min-width: 100px; padding: 9px 16px; font-size: 13px; }
  .chero-badge-promoted { font-size: 9px; padding: 2px 8px; }
}

@media (min-width: 1200px) {
  .nfx-hero-carousel { max-height: 420px; }
  .chero-cover { flex: 0 0 180px; width: 180px; height: 255px; }
  .chero-content { padding: 44px 52px; gap: 36px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Highlight Cards — Platform stats empty state
   ══════════════════════════════════════════════════════════════════════════════ */

.chero-highlights {
  padding: 20px 28px 12px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.chero-hl-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.chero-hl-header-icon {
  flex: 0 0 auto;
  color: rgba(139,92,246,.7);
}
.chero-hl-header-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.1px;
}
.chero-hl-header-sub {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
}

/* Scrolling track (marquee) */
.chero-hl-scroll-wrap {
  overflow: clip;
  overflow-clip-margin: 8px;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 1%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 1%, #000 97%, transparent 100%);
  padding: 6px 0;
}
.chero-hl-grid {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: chero-hl-marquee var(--chero-hl-duration, 40s) linear infinite;
}
.chero-hl-scroll-wrap:hover .chero-hl-grid {
  animation-play-state: paused;
}
@keyframes chero-hl-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Card */
.chero-hl-card {
  flex: 0 0 260px;
  width: 260px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, border-color .22s ease;
  position: relative;
}
.chero-hl-card-inner {
  padding: 18px 16px 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.chero-hl-card:hover {
  transform: translateY(-3px) scale(1.015);
  z-index: 3;
}

/* Card variants — each has a unique subtle gradient */
.chero-hl-card--longest {
  background: linear-gradient(135deg, rgba(96,165,250,.08) 0%, rgba(59,130,246,.04) 100%);
  border: 1px solid rgba(96,165,250,.12);
}
.chero-hl-card--longest:hover {
  border-color: rgba(96,165,250,.28);
  box-shadow: 0 8px 28px rgba(59,130,246,.12);
}
.chero-hl-card--views {
  background: linear-gradient(135deg, rgba(251,191,36,.08) 0%, rgba(245,158,11,.04) 100%);
  border: 1px solid rgba(251,191,36,.12);
}
.chero-hl-card--views:hover {
  border-color: rgba(251,191,36,.28);
  box-shadow: 0 8px 28px rgba(251,191,36,.10);
}
.chero-hl-card--stats {
  background: linear-gradient(135deg, rgba(139,92,246,.08) 0%, rgba(168,85,247,.04) 100%);
  border: 1px solid rgba(139,92,246,.12);
  cursor: default;
}
.chero-hl-card--stats:hover {
  border-color: rgba(139,92,246,.25);
  box-shadow: 0 8px 28px rgba(139,92,246,.10);
  transform: translateY(-2px);
}
.chero-hl-card--genre {
  background: linear-gradient(135deg, rgba(34,197,94,.08) 0%, rgba(22,163,74,.04) 100%);
  border: 1px solid rgba(34,197,94,.12);
}
.chero-hl-card--genre:hover {
  border-color: rgba(34,197,94,.28);
  box-shadow: 0 8px 28px rgba(34,197,94,.10);
}
.chero-hl-card--featured {
  background: linear-gradient(135deg, rgba(244,63,94,.08) 0%, rgba(239,68,68,.04) 100%);
  border: 1px solid rgba(244,63,94,.12);
}
.chero-hl-card--featured:hover {
  border-color: rgba(244,63,94,.28);
  box-shadow: 0 8px 28px rgba(244,63,94,.10);
}

/* Card icon */
.chero-hl-card-icon {
  color: rgba(255,255,255,.35);
  margin-bottom: 2px;
}
.chero-hl-card--longest .chero-hl-card-icon { color: rgba(96,165,250,.6); }
.chero-hl-card--views .chero-hl-card-icon { color: rgba(251,191,36,.6); }
.chero-hl-card--stats .chero-hl-card-icon { color: rgba(139,92,246,.6); }
.chero-hl-card--genre .chero-hl-card-icon { color: rgba(34,197,94,.6); }
.chero-hl-card--featured .chero-hl-card-icon { color: rgba(244,63,94,.6); }

/* Card text */
.chero-hl-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.chero-hl-card-value {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.2px;
  line-height: 1.2;
}
.chero-hl-card-value--tag {
  text-transform: capitalize;
  font-size: 18px;
}
.chero-hl-card-sub {
  font-size: 11px;
  color: rgba(255,255,255,.35);
}

/* Stats grid (platform card) */
.chero-hl-stats-grid {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.chero-hl-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chero-hl-stat-num {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.2px;
}
.chero-hl-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Mini book inside card */
.chero-hl-card-book {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.chero-hl-card-book--large {
  gap: 12px;
}
.chero-hl-card-cover {
  flex: 0 0 36px;
  width: 36px;
  height: 52px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}
.chero-hl-card-book--large .chero-hl-card-cover {
  flex: 0 0 44px;
  width: 44px;
  height: 64px;
  border-radius: 5px;
}
.chero-hl-card-cover img,
.chero-hl-card-cover .cover-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chero-hl-card-cover .nq-cover {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.chero-hl-card-cover .nq-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.chero-hl-card-cover .nq-cover picture {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.chero-hl-card-cover {
  position: relative;
}
/* Hide overlays on highlight mini covers — info shown beside them */
.chero-hl-card-cover .nq-cover-title,
.chero-hl-card-cover .nq-cover-handle,
.chero-hl-card-cover .nq-cover-logo,
.chero-hl-card-cover .nq-cover-zoom {
  display: none;
}

.chero-hl-cover-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
}
.chero-hl-card-book-info {
  min-width: 0;
  flex: 1;
}
.chero-hl-card-book-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chero-hl-card-book-author {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chero-hl-card-book-desc {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Skeleton */
.chero-hl-skeleton {
  pointer-events: none;
}
.chero-hl-skeleton .chero-hl-card-inner {
  background: rgba(255,255,255,.02);
}

/* ══════════════════════════════════════════════════════════════════════════════
   Promo Slide Enhancements — Tagline + Cover glow
   ══════════════════════════════════════════════════════════════════════════════ */

/* Author tagline quote */
.chero-tagline {
  font-size: clamp(13px, 1.6vw, 16px);
  font-style: italic;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .1px;
  line-height: 1.4;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Promoted badge with star icon */
.chero-badge-promoted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chero-badge-promoted svg {
  flex: 0 0 auto;
}

/* Meta icons */
.chero-time, .chero-clicks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chero-time svg, .chero-clicks svg {
  flex: 0 0 auto;
  opacity: .6;
}

/* ── Cover logo in carousel covers ── */
.chero-cover .nq-cover-logo {
  width: clamp(10px, 10%, 18px);
  bottom: 3px;
  right: 3px;
  opacity: .4;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.8));
}
.chero-cover .nq-cover-title,
.chero-cover .nq-cover-handle {
  display: none;
}

/* Promo cover glow */
.chero-cover--promo {
  filter: drop-shadow(0 12px 36px rgba(0,0,0,.6)) drop-shadow(0 0 40px rgba(var(--primary-rgb,99,102,241),.12));
  animation: chero-cover-glow 4s ease-in-out infinite alternate;
}
@keyframes chero-cover-glow {
  0% { filter: drop-shadow(0 12px 36px rgba(0,0,0,.6)) drop-shadow(0 0 30px rgba(var(--primary-rgb,99,102,241),.08)); }
  100% { filter: drop-shadow(0 12px 36px rgba(0,0,0,.6)) drop-shadow(0 0 60px rgba(var(--primary-rgb,99,102,241),.2)); }
}

/* Slide entrance animation */
.chero-slide.active .chero-info {
  animation: chero-info-enter .55s cubic-bezier(.22,.61,.36,1) both;
}
.chero-slide.active .chero-cover {
  animation: chero-cover-enter .5s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes chero-info-enter {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes chero-cover-enter {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .chero-highlights { padding: 16px 16px 8px; }
  .chero-hl-card { flex: 0 0 220px; width: 220px; }
  .chero-hl-card-inner { padding: 14px 12px 12px; min-height: 120px; }
  .chero-hl-card-value { font-size: 16px; }
  .chero-hl-stats-grid { gap: 10px; }
  .chero-hl-stat-num { font-size: 15px; }
  .chero-tagline { font-size: 12px; max-width: 200px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .nfx-card { transition: none; }
  .nfx-card:hover { transform: none; }
  .nfx-card-overlay { transition: none; }
  .nfx-rail-arrow { transition: none; }
  .nfx-rail-see-all { transition: none; }
  .nfx-card--continue .nfx-card-progress-fill { transition: none; }
  .chero-slide { transition: none; }
  .chero-arrow { transition: none; }
  .chero-dot { transition: none; }
  .chero-hl-card { transition: none; }
  .chero-hl-card:hover { transform: none; }
  .chero-hl-grid { animation: none !important; }
  .chero-cover--promo { animation: none; }
  .chero-slide.active .chero-info { animation: none; }
  .chero-slide.active .chero-cover { animation: none; }
  .chero-badge-promoted::before { animation: none; }
  .chero-read-btn { transition: none; }
  .chero-phase-container { transition: none; }
  .chero-stat-mood-fill { transition: none; }
  .chero-slide--appstats .chero-promo-left { transition: none; }
  .nfx-top10-rank { transition: none; }
  .nfx-card--top10 .nfx-card-cover { transition: none; }
  .nfx-card--top10:hover { transform: none; }
}
