/* NarratiaVerse discovery: home rows, Browse, search. Phones get swipe rows, desktops get grids. */
.nv-home, .nv-browse, .nv-search { --nv-gap: 12px; --nv-tile: 42vw; display: grid; gap: 28px; }
.nv-home { gap: 32px; }
.nv-home > *, .nv-browse > *, .nv-search > *, .nv-row { min-width: 0; }

/* Hero (guests) */
.nv-hero { position: relative; overflow: hidden; border-radius: 12px; padding: 36px 20px; background: linear-gradient(135deg, var(--bg-800, #1f2430), var(--bg-600, #2d3445)); color: var(--fg-100, #fff); }
.nv-hero._image { min-height: 320px; display: flex; align-items: flex-end; }
.nv-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.nv-hero__inner { position: relative; max-width: 640px; }
.nv-hero__eyebrow { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.nv-hero__title { margin: 0 0 10px; font-size: clamp(26px, 6vw, 42px); line-height: 1.15; }
.nv-hero__text { margin: 0 0 20px; font-size: 17px; opacity: .9; }
.nv-hero__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.nv-hero__buttons .button { min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; font-size: 16px; }

/* Rows */
.nv-row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nv-row__title { margin: 0; font-size: 20px; }
.nv-row__more { font-size: 14px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nv-row__list, .nv-grid, .nv-creator-chips { list-style: none; margin: 0; padding: 0; }

/* Phones: one swipe row */
.nv-row__list { display: grid; grid-auto-flow: column; grid-auto-columns: var(--nv-tile); gap: var(--nv-gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.nv-row__list > li { scroll-snap-align: start; min-width: 0; }
.nv-row._watch .nv-row__list { grid-auto-columns: 78vw; }
.nv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px var(--nv-gap); }

/* Tiles */
.nv-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.nv-tile__link { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.nv-tile__cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-800, #262b36); }
.nv-tile__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.nv-tile__link:hover .nv-tile__img { transform: scale(1.03); }
.nv-tile__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 44px; font-weight: 700; color: var(--fg-300, #cfd3dc); background: linear-gradient(160deg, var(--bg-700, #333a4a), var(--bg-900, #171a21)); }
.nv-tile__badge { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.72); color: #fff; }
.nv-tile__badge._new { left: 6px; right: auto; background: var(--primary-500, #3b82f6); }
.nv-tile__title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nv-tile__by, .nv-tile__meta { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-tile__meta:empty { display: none; }
.nv-tile._chapter .nv-tile__cover { aspect-ratio: 3 / 2; }

/* 18+ blur for viewers who turned adult content off */
.nv-tile[data-nv-adult="blur"] .nv-tile__img, .nv-tile[data-nv-adult="blur"] .nv-tile__placeholder { filter: blur(14px); transform: scale(1.1); }

/* Filters */
.nv-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nv-filter { display: grid; gap: 4px; font-size: 13px; }
.nv-filter select { min-height: 44px; width: 100%; }
.nv-browse__count { margin: 0; font-size: 14px; opacity: .85; }
.nv-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nv-pages a, .nv-pages span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.nv-pages span { background: var(--primary-500, #3b82f6); color: #fff; }

/* Empty state */
.nv-empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--bg-500, #555); border-radius: 12px; }
.nv-empty .fa-solid { font-size: 28px; opacity: .6; }
.nv-empty p { margin: 10px auto 16px; max-width: 420px; }

/* Search */
.nv-search__form { display: flex; gap: 8px; }
.nv-search__form input[type="search"] { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
.nv-search__form .button { min-height: 44px; }
.nv-search__group h2 { font-size: 18px; margin: 0 0 12px; }
.nv-creator-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.nv-creator-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--bg-800, #262b36); color: inherit; text-decoration: none; }
.nv-creator-chip img { border-radius: 50%; width: 36px; height: 36px; }

@media (min-width: 480px) {
	.nv-home, .nv-browse, .nv-search { --nv-tile: 30vw; }
	.nv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nv-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tablets and up: grids instead of swipe rows */
@media (min-width: 768px) {
	.nv-hero { padding: 56px 40px; }
	.nv-row__list { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; gap: 20px 16px; }
	.nv-row__list > li:nth-child(n+9) { display: none; }
	.nv-row._watch .nv-row__list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; }
	.nv-row._watch .nv-row__list > li:nth-child(n+5) { display: none; }
	.nv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
	.nv-filters { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.nv-row__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.nv-row__list > li:nth-child(n+7) { display: none; }
	.nv-row._featured .nv-row__list > li { display: flex; }
	.nv-row._watch .nv-row__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.nv-row._watch .nv-row__list > li:nth-child(n+5) { display: none; }
	.nv-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .nv-tile__img { transition: none; } }
