:root, [data-theme="dark"] {
	--bg: #121018;
	--bg-alt: #1c1a24;
	--bg-mid: #16141c;
	--bg-end: #0e0c14;
	--ink: #f4efe8;
	--ink-soft: #c8c2d4;
	--ink-muted: #8e8899;
	--white: #1c1a24;
	--coral: #ff6b5b;
	--coral-dark: #e84f3f;
	--teal: #2ec4b6;
	--sun: #ffd166;
	--violet: #9b5de5;
	--sky: #4cc9f0;
	--mint: #80ed99;
	--line: rgba(255, 255, 255, 0.08);
	--shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	--shadow-lg: 0 24px 60px rgba(255, 107, 91, 0.22);
	--radius: 22px;
	--radius-sm: 14px;
	--font: "Plus Jakarta Sans", system-ui, sans-serif;
	--font-display: "Fraunces", Georgia, serif;
	--tab-h: 74px;
	--blob-a: #5a3b28;
	--blob-b: #1d4a42;
	--blob-c: #3d2b52;
}

[data-theme="light"] {
	--bg: #fff8f0;
	--bg-alt: #fff3e4;
	--bg-mid: #fffdfb;
	--bg-end: #f0f9ff;
	--ink: #1c1c28;
	--ink-soft: #4a4a5e;
	--ink-muted: #7a7a92;
	--white: #ffffff;
	--line: rgba(28, 28, 40, 0.08);
	--shadow: 0 16px 40px rgba(28, 28, 40, 0.1);
	--shadow-lg: 0 24px 60px rgba(255, 107, 91, 0.18);
	--blob-a: #ffd6a5;
	--blob-b: #a8e6cf;
	--blob-c: #cdb4db;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	color: var(--ink);
	background: linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 40%, var(--bg-end) 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.bg-blobs {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

.blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.55;
	animation: float 12s ease-in-out infinite;
}

.blob-a { width: 280px; height: 280px; top: -60px; right: -40px; background: var(--blob-a); }
.blob-b { width: 220px; height: 220px; top: 35%; left: -80px; background: var(--blob-b); animation-delay: -4s; }
.blob-c { width: 200px; height: 200px; bottom: 15%; right: 10%; background: var(--blob-c); animation-delay: -8s; }

@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(12px, -18px) scale(1.05); }
}

.app-shell {
	position: relative;
	z-index: 1;
	max-width: 1100px;
	margin: 0 auto;
	padding-bottom: calc(var(--tab-h) + 28px);
}

/* Header */
.topbar {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding: 16px clamp(14px, 3vw, 24px) 8px;
}

.topbar-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.topbar-tools {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

html[dir="rtl"] .topbar-tools {
	margin-left: 0;
	margin-right: auto;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.brand-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--coral), #ff9f68);
	color: white;
	box-shadow: var(--shadow-lg);
}

.brand-copy {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.brand-copy strong {
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 800;
}

.brand-copy small {
	font-size: 0.72rem;
	color: var(--ink-muted);
	font-weight: 600;
}

.search-bar {
	flex: none;
	width: 100%;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px;
	height: 48px;
	border-radius: 999px;
	background: var(--white);
	border: 2px solid var(--line);
	box-shadow: var(--shadow);
	color: var(--ink-muted);
	transition: border-color 0.2s, box-shadow 0.2s;
	overflow: hidden;
}

.search-bar:focus-within {
	border-color: var(--teal);
	box-shadow: 0 12px 32px rgba(46, 196, 182, 0.15);
}

.search-bar input {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 500;
	color: var(--ink);
	outline: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.member-badge {
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	background: var(--white);
	color: var(--ink-muted);
	border: 2px dashed var(--line);
	white-space: nowrap;
}

.member-badge.is-premium {
	background: linear-gradient(135deg, #fff4cc, #ffe08a);
	color: #8a5a00;
	border: 0;
	box-shadow: 0 8px 20px rgba(255, 209, 102, 0.45);
}

.theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	border: 2px solid var(--line);
	background: var(--white);
	color: var(--ink);
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: var(--shadow);
}

.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }

.theme-toggle-icon { display: none; }
[data-theme="dark"] .theme-toggle-icon--sun { display: flex; }
[data-theme="light"] .theme-toggle-icon--moon { display: flex; }

.main-content {
	padding: 0 clamp(14px, 3vw, 24px) 24px;
}

/* Typography helpers */
.kicker {
	margin: 0 0 6px;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--coral);
}

/* Welcome */
.welcome-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 0 8px;
}

.welcome-text h1 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 800;
	line-height: 1.05;
	color: var(--ink);
}

.lede {
	margin: 8px 0 0;
	color: var(--ink-soft);
	font-weight: 600;
}

.welcome-art { flex-shrink: 0; }

.wave-bars {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 48px;
	padding: 0 8px;
}

.wave-bars span {
	width: 5px;
	border-radius: 999px;
	background: linear-gradient(to top, var(--coral), var(--sun));
	animation: wave 1.2s ease-in-out infinite;
	animation-delay: calc(var(--i) * 0.08s);
	height: calc(12px + (var(--i) % 5) * 8px);
}

@keyframes wave {
	0%, 100% { transform: scaleY(0.55); }
	50% { transform: scaleY(1.2); }
}

/* Featured */
.featured-card {
	display: grid;
	grid-template-columns: minmax(140px, 200px) 1fr;
	gap: 22px;
	padding: 20px;
	margin-bottom: 24px;
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: var(--shadow);
	border: 1px solid rgba(255, 255, 255, 0.8);
}

.featured-cover {
	position: relative;
	border-radius: var(--radius-sm);
	overflow: hidden;
	aspect-ratio: 3/4;
	box-shadow: 0 12px 28px rgba(28, 28, 40, 0.15);
}

.featured-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	background: var(--sun);
	color: var(--ink);
}

.featured-info h2 {
	margin: 0 0 10px;
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.1;
}

.synopsis {
	margin: 0 0 14px;
	color: var(--ink-soft);
	line-height: 1.55;
	font-weight: 500;
}

.meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.meta-pill {
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	background: var(--bg-alt);
	color: var(--ink-soft);
}

.cta-row, .player-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	border: 0;
	font: inherit;
	font-weight: 800;
	font-size: 0.92rem;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
}

.btn-play {
	background: linear-gradient(135deg, var(--coral), #ff8f7a);
	color: white;
	box-shadow: var(--shadow-lg);
}

.btn-play:hover { transform: translateY(-2px); }
.btn-play:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-soft {
	background: var(--white);
	color: var(--ink);
	border: 2px solid rgba(28, 28, 40, 0.08);
}

.btn-soft.is-saved { background: #e8fff8; border-color: var(--teal); color: #0d7a6e; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }

.play-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: white;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

/* Genre chips */
.genre-chips { margin-bottom: 28px; }

.chip-scroller {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}

.chip-scroller::-webkit-scrollbar { display: none; }

.genre-chip {
	flex-shrink: 0;
	padding: 10px 18px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 0.88rem;
	color: var(--ink);
	box-shadow: var(--shadow);
	transition: transform 0.15s;
}

.genre-chip:hover { transform: translateY(-2px) scale(1.03); }

.chip-coral { background: #ffe0dc; }
.chip-teal { background: #d4f5f0; }
.chip-sun { background: #fff0c2; }
.chip-violet { background: #ede0ff; }
.chip-sky { background: #d8f4ff; }
.chip-mint { background: #dfffe8; }

/* Shelves */
.shelf { margin-bottom: 32px; }

.shelf-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.shelf-head h3 {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 800;
}

.shelf-count {
	font-size: 0.8rem;
	font-weight: 800;
	color: var(--teal);
	background: #e0faf6;
	padding: 4px 10px;
	border-radius: 999px;
}

.shelf-link {
	font-weight: 800;
	font-size: 0.88rem;
	color: var(--coral);
}

.book-rail {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 8px;
	scrollbar-width: none;
}

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

.book-list { display: flex; flex-direction: column; gap: 12px; }
.book-list.spaced { gap: 14px; }

/* Book tile (rail) */
.book-tile {
	flex: 0 0 140px;
}

.book-tile-cover {
	position: relative;
	border-radius: var(--radius-sm);
	overflow: hidden;
	aspect-ratio: 3/4;
	margin-bottom: 10px;
	box-shadow: var(--shadow);
	background: var(--bg-alt);
}

.book-tile-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s;
}

.book-tile:hover .book-tile-cover img { transform: scale(1.05); }

.play-fab {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--coral);
	color: white;
	box-shadow: 0 6px 16px rgba(255, 107, 91, 0.45);
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s, transform 0.2s;
}

.book-tile:hover .play-fab { opacity: 1; transform: scale(1); }

.book-tile h4 {
	margin: 0 0 4px;
	font-size: 0.92rem;
	font-weight: 800;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.book-tile p {
	margin: 0;
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--ink-muted);
}

/* Book row */
.book-row {
	display: flex;
	gap: 14px;
	padding: 12px;
	border-radius: var(--radius-sm);
	background: var(--white);
	box-shadow: var(--shadow);
	transition: transform 0.15s, box-shadow 0.15s;
}

.book-row:hover {
	transform: translateX(4px);
	box-shadow: 0 20px 40px rgba(28, 28, 40, 0.12);
}

.book-row-cover {
	position: relative;
	flex-shrink: 0;
	width: 72px;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 3/4;
	background: var(--bg-alt);
}

.book-row-cover img { width: 100%; height: 100%; object-fit: cover; }

.duration-tag {
	position: absolute;
	left: 4px;
	bottom: 4px;
	padding: 2px 6px;
	border-radius: 6px;
	font-size: 0.62rem;
	font-weight: 800;
	background: rgba(255, 255, 255, 0.92);
}

.book-row-body { flex: 1; min-width: 0; }

.book-row-body h4 {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 800;
}

.book-row-body p {
	margin: 0 0 8px;
	font-size: 0.82rem;
	color: var(--ink-soft);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.book-row-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ink-muted);
}

.listen-cta { color: var(--coral); }

/* Promo */
.promo-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 24px;
	margin-bottom: 16px;
	border-radius: var(--radius);
	background: linear-gradient(135deg, #6c63ff, #9b5de5);
	color: white;
	box-shadow: 0 20px 50px rgba(108, 99, 255, 0.35);
}

.promo-inner h3 {
	margin: 4px 0 8px;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
}

.promo-inner p {
	margin: 0 0 16px;
	opacity: 0.9;
	font-weight: 500;
}

.promo-inner .kicker { color: #ffe08a; }
.promo-emoji { font-size: 3rem; animation: bounce 2s ease infinite; }

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

/* Page intro */
.page-intro { padding: 16px 0 20px; }

.page-intro h1 {
	margin: 8px 0 6px;
	font-family: var(--font-display);
	font-size: clamp(1.8rem, 4vw, 2.4rem);
	font-weight: 800;
}

.page-intro p, .results-note {
	margin: 0;
	color: var(--ink-soft);
	font-weight: 600;
}

.back {
	display: inline-block;
	margin-bottom: 8px;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--coral);
}

.search-hero {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

.search-hero input {
	flex: 1;
	padding: 16px 18px;
	border-radius: var(--radius-sm);
	border: 2px solid rgba(28, 28, 40, 0.08);
	background: var(--white);
	font: inherit;
	font-weight: 600;
	outline: none;
}

.search-hero input:focus { border-color: var(--teal); }

/* Genre grid */
.genre-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}

.genre-card {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	min-height: 180px;
	box-shadow: var(--shadow);
	transition: transform 0.2s;
}

.genre-card:hover { transform: translateY(-4px) rotate(-1deg); }

.genre-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.35;
}

.genre-card-body {
	position: relative;
	z-index: 1;
	padding: 18px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 180px;
}

.genre-card h3 {
	margin: 0 0 4px;
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 800;
}

.genre-card span {
	font-size: 0.78rem;
	font-weight: 700;
	opacity: 0.85;
}

.genre-card.chip-coral { background: linear-gradient(160deg, #ffb4a9, #ff6b5b); color: white; }
.genre-card.chip-teal { background: linear-gradient(160deg, #7ee8dc, #2ec4b6); color: #0a3d38; }
.genre-card.chip-sun { background: linear-gradient(160deg, #ffe08a, #ffb703); color: #5a3e00; }
.genre-card.chip-violet { background: linear-gradient(160deg, #d4b5ff, #9b5de5); color: white; }
.genre-card.chip-sky { background: linear-gradient(160deg, #9ee7ff, #4cc9f0); color: #0a3d4a; }
.genre-card.chip-mint { background: linear-gradient(160deg, #b8ffc9, #52b788); color: #0a3d22; }

/* Listen page — audio player + transcript */
.main-content--listen { padding-bottom: 40px; }

.listen-page { max-width: 720px; margin: 0 auto; }

.listen-back-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.listen-format {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--teal);
	background: #e0faf6;
	padding: 5px 10px;
	border-radius: 999px;
}

.audio-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 20px;
}

.audio-disc-wrap {
	position: relative;
	width: min(220px, 62vw);
	margin-bottom: 20px;
}

.audio-disc-glow {
	position: absolute;
	inset: -20%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 107, 91, 0.35), transparent 65%);
	opacity: 0;
	transition: opacity 0.4s;
}

.audio-disc-wrap.is-playing .audio-disc-glow { opacity: 1; }

.audio-disc {
	position: relative;
	border-radius: 50%;
	overflow: hidden;
	aspect-ratio: 1;
	box-shadow: 0 24px 60px rgba(28, 28, 40, 0.22), 0 0 0 8px rgba(255, 255, 255, 0.85);
	transition: transform 0.4s var(--ease, ease);
}

.audio-disc-wrap.is-playing .audio-disc {
	animation: spinDisc 8s linear infinite;
}

@keyframes spinDisc {
	to { transform: rotate(360deg); }
}

.audio-disc img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.audio-disc-hole {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 18%;
	height: 18%;
	border-radius: 50%;
	background: var(--bg);
	box-shadow: inset 0 0 0 3px rgba(28, 28, 40, 0.08);
}

.audio-meta h1 {
	margin: 4px 0 12px;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 800;
	line-height: 1.1;
}

.meta-pill--premium {
	background: linear-gradient(135deg, #fff0c2, #ffe08a);
	color: #7a5200;
}

.audio-player-card {
	padding: 22px 20px 20px;
	margin-bottom: 24px;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 20px 50px rgba(255, 107, 91, 0.12), var(--shadow);
}

.audio-el { display: none; }

.waveform {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
	height: 56px;
	margin-bottom: 16px;
	padding: 0 4px;
}

.waveform span {
	flex: 1;
	max-width: 5px;
	border-radius: 999px;
	background: linear-gradient(to top, var(--coral), var(--sun));
	opacity: 0.35;
	height: calc(10px + (var(--i) % 9) * 4px);
	transition: opacity 0.2s, transform 0.2s;
}

.waveform.is-live span {
	opacity: 0.85;
	animation: waveLive 1.1s ease-in-out infinite;
	animation-delay: calc(var(--i) * 0.04s);
}

@keyframes waveLive {
	0%, 100% { transform: scaleY(0.45); }
	50% { transform: scaleY(1.15); }
}

.scrubber { position: relative; margin-bottom: 8px; }

.scrubber-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.scrubber-track {
	height: 6px;
	border-radius: 999px;
	background: #eee8e0;
	overflow: hidden;
}

.scrubber-fill {
	height: 100%;
	width: 0%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--coral), var(--teal));
	transition: width 0.1s linear;
}

.time-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 18px;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ink-muted);
}

.transport {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 16px;
}

.transport-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 0;
	background: var(--bg-alt);
	color: var(--ink);
	cursor: pointer;
	transition: transform 0.15s, background 0.15s;
}

.transport-btn:hover { transform: scale(1.05); background: #ffe8e4; }

.transport-btn--main {
	width: 68px;
	height: 68px;
	background: linear-gradient(135deg, var(--coral), #ff8f7a);
	color: white;
	box-shadow: var(--shadow-lg);
}

.transport-btn--main:hover { background: linear-gradient(135deg, var(--coral-dark), var(--coral)); }
.transport-btn--main:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.transport-btn--main .icon-pause[hidden],
.transport-btn--main .icon-play[hidden] { display: none; }

.player-tools {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.speed-btn {
	padding: 8px 14px;
	border-radius: 999px;
	border: 2px solid rgba(28, 28, 40, 0.08);
	background: var(--white);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	color: var(--ink-soft);
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

.speed-btn:hover { border-color: var(--teal); color: var(--teal); }

.tool-btn {
	padding: 8px 14px;
	border-radius: 999px;
	border: 2px solid rgba(28, 28, 40, 0.08);
	background: var(--white);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	cursor: pointer;
}

.tool-btn.is-saved { background: #e8fff8; border-color: var(--teal); color: #0d7a6e; }

.unlock-hint {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--coral);
}

/* Transcript */
.transcript-panel {
	padding: 24px;
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: var(--shadow);
	border: 1px solid rgba(28, 28, 40, 0.05);
	margin-bottom: 28px;
}

.transcript-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.transcript-head h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 800;
}

.transcript-sync {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--teal);
}

.transcript-lede {
	margin: 0 0 16px;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--ink-soft);
	font-weight: 500;
}

.transcript-body {
	max-height: 420px;
	overflow-y: auto;
	padding-right: 6px;
	scroll-behavior: smooth;
}

.transcript-body::-webkit-scrollbar { width: 4px; }
.transcript-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 999px; }

.transcript-line {
	margin: 0 0 14px;
	padding: 12px 14px 12px 16px;
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--ink-soft);
	border-left: 3px solid transparent;
	transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.transcript-word {
	display: inline;
	color: inherit;
	border-radius: 0.28em;
	padding: 0.05em 0.12em;
	margin: 0 -0.12em;
	transition: color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
	cursor: pointer;
}

.transcript-word.is-spoken {
	color: var(--ink);
	opacity: 0.42;
}

.transcript-word.is-active {
	color: var(--ink);
	opacity: 1;
	font-weight: 700;
	background: rgba(255, 107, 74, 0.18);
	box-shadow: 0 0 0 1px rgba(255, 107, 74, 0.28);
}

.transcript-line.is-active {
	background: linear-gradient(90deg, #fff5f2, #fffdfb);
	border-left-color: var(--coral);
	color: var(--ink);
}

.transcript-line.is-past {
	opacity: 0.72;
}

.transcript-line.is-past .transcript-word.is-spoken {
	opacity: 0.5;
}

.related-shelf { margin-bottom: 24px; }

.related-shelf h3 {
	margin: 0 0 14px;
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 800;
}

/* Legacy player (removed from listen — kept for reference compat) */
.player-hero { display: none; }
.chapters { display: none; }

.empty, .error-page {
	padding: 60px 20px;
	text-align: center;
	color: var(--ink-muted);
}

.error-page h1 { color: var(--ink); font-family: var(--font-display); }

/* Tab bar */
.tabbar {
	position: fixed;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	width: min(400px, calc(100% - 24px));
	height: var(--tab-h);
	display: flex;
	align-items: stretch;
	padding: 6px;
	border-radius: 999px;
	background: var(--white);
	box-shadow: 0 16px 48px rgba(28, 28, 40, 0.15);
	border: 1px solid rgba(28, 28, 40, 0.06);
	z-index: 100;
}

.tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--ink-muted);
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

.tab-icon { font-size: 1.15rem; line-height: 1; }

.tab.is-active {
	background: linear-gradient(135deg, #fff0eb, #ffe0dc);
	color: var(--coral-dark);
	transform: translateY(-2px);
}

/* Reveal */
[data-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible,
.page-intro[data-reveal],
.welcome-banner[data-reveal] {
	opacity: 1;
	transform: none;
}

[data-theme="dark"] .featured-card {
	border-color: var(--line);
}

[data-theme="dark"] .btn-soft {
	border-color: var(--line);
}

[data-theme="dark"] .btn-soft.is-saved,
[data-theme="dark"] .tool-btn.is-saved {
	background: #14352f;
	color: var(--mint);
}

[data-theme="dark"] .chip-coral { background: #3d2623; color: #ffc9c2; }
[data-theme="dark"] .chip-teal { background: #1c3d39; color: #9ef0e6; }
[data-theme="dark"] .chip-sun { background: #3d3420; color: #ffe08a; }
[data-theme="dark"] .chip-violet { background: #322448; color: #d4b5ff; }
[data-theme="dark"] .chip-sky { background: #1c3640; color: #9ee7ff; }
[data-theme="dark"] .chip-mint { background: #1c3d2a; color: #b8ffc9; }

[data-theme="dark"] .listen-format {
	background: #14352f;
	color: var(--teal);
}

[data-theme="dark"] .audio-disc {
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .meta-pill--premium {
	background: linear-gradient(135deg, #3d3420, #5a4a1c);
	color: #ffe08a;
}

[data-theme="dark"] .audio-player-card {
	background: rgba(28, 26, 36, 0.92);
	border-color: var(--line);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .scrubber-track { background: #2a2733; }

[data-theme="dark"] .transport-btn:hover { background: #33282c; }

[data-theme="dark"] .speed-btn,
[data-theme="dark"] .tool-btn {
	border-color: var(--line);
	background: var(--bg-alt);
}

[data-theme="dark"] .transcript-panel {
	border-color: var(--line);
}

[data-theme="dark"] .transcript-body::-webkit-scrollbar-thumb { background: #3a3644; }

[data-theme="dark"] .transcript-line.is-active {
	background: linear-gradient(90deg, rgba(255, 107, 91, 0.22), rgba(28, 26, 36, 0.4));
	border-left-color: var(--coral);
	color: #fff;
}

[data-theme="dark"] .transcript-word.is-spoken {
	color: #fff;
	opacity: 0.38;
}

[data-theme="dark"] .transcript-word.is-active {
	color: #fff;
	background: rgba(255, 107, 91, 0.32);
	box-shadow: 0 0 0 1px rgba(255, 107, 91, 0.45);
}

[data-theme="dark"] .tabbar {
	background: #1c1a24;
	border-color: var(--line);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .tab.is-active {
	background: linear-gradient(135deg, #3a2422, #2a1c1c);
	color: #ffb4a9;
}

@media (max-width: 720px) {
	.featured-card {
		grid-template-columns: 1fr;
	}

	.welcome-art { display: none; }

	.topbar { padding-top: 12px; }

	.brand-copy small { display: none; }

	.member-badge { width: 100%; text-align: center; }

	.transcript-body { max-height: 320px; }
}
