:root {
	--bg: #08111f;
	--bg-2: #101a31;
	--surface: rgba(12, 22, 40, 0.84);
	--surface-2: rgba(22, 34, 59, 0.78);
	--line: rgba(167, 186, 230, 0.14);
	--ink: #f4f6ff;
	--ink-soft: #b6c1da;
	--accent: #a8d7ff;
	--accent-2: #d8c3ff;
	--warm: #ffd38b;
	--shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
	--radius: 26px;
	--container: 1180px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	background:
		radial-gradient(circle at 18% 10%, rgba(168, 215, 255, 0.10), transparent 24%),
		radial-gradient(circle at 82% 4%, rgba(216, 195, 255, 0.08), transparent 20%),
		linear-gradient(180deg, #030810 0%, #050d1a 42%, #07101e 100%);
	color: var(--ink);
	line-height: 1.6;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
}

.container {
	width: min(calc(100% - 2rem), var(--container));
	margin: 0 auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	backdrop-filter: blur(18px);
	background: linear-gradient(180deg, rgba(8, 17, 31, 0.92), rgba(8, 17, 31, 0.74));
	border-bottom: 1px solid rgba(167, 186, 230, 0.08);
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding: 1rem 0;
}

.site-header__panel {
	display: contents;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.site-brand__mark {
	display: inline-grid;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #fff4cf, var(--warm) 72%);
	color: #101624;
	box-shadow: 0 10px 22px rgba(255, 211, 139, 0.22);
}

.site-nav {
	justify-self: center;
}

.site-menu-toggle {
	display: none;
}

.site-nav__list,
.footer-nav,
.site-actions,
.section-heading,
.story-card__meta,
.story-article__meta,
.story-actions,
.hero__actions,
.hero-note__head,
.account-banner,
.account-banner__actions {
	display: flex;
	gap: 1rem;
}

.site-nav__list,
.footer-nav {
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: center;
}

.site-nav__list a {
	display: inline-flex;
	align-items: center;
	padding: 0.58rem 0.88rem;
	border-radius: 999px;
	color: var(--ink-soft);
	font-size: 0.97rem;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a {
	background: rgba(255, 255, 255, 0.06);
	color: var(--ink);
}

.site-actions {
	flex-wrap: wrap;
	justify-content: flex-end;
}

.button,
button,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.86rem 1.22rem;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--accent), #edf4ff);
	color: #101624;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 14px 30px rgba(168, 215, 255, 0.14);
	transition: transform 0.18s ease, filter 0.18s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}

.button--ghost {
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
	border: 1px solid var(--line);
	box-shadow: none;
}

.site-main {
	padding-bottom: 3rem;
}

.hero,
.section {
	padding: 3.4rem 0;
}

.section--soft {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
	border-top: 1px solid rgba(167, 186, 230, 0.08);
	border-bottom: 1px solid rgba(167, 186, 230, 0.08);
}

.hero--modern {
	position: relative;
	padding-top: 4.3rem;
	padding-bottom: 1.8rem;
}

.hero--modern + .section {
	padding-top: 1.8rem;
}

.hero--modern::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 75% 18%, rgba(216, 195, 255, 0.18), transparent 18%),
		radial-gradient(circle at 20% 0%, rgba(168, 215, 255, 0.12), transparent 24%);
	pointer-events: none;
}

.hero__grid,
.editorial-grid,
.story-grid,
.bedtime-library-grid,
.auth-grid {
	display: grid;
	gap: 1.25rem;
}

.hero-shell {
	display: grid;
	gap: 1.25rem;
	position: relative;
	z-index: 1;
}

.hero__grid {
	grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
	align-items: center;
	position: relative;
	z-index: 1;
}

.editorial-grid {
	grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
	align-items: start;
}

.editorial-panel--feature,
.editorial-panel--library {
	align-self: start;
}

.editorial-panel--generator {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.editorial-panel--library {
	grid-column: 1;
	grid-row: 2;
}

.editorial-stack {
	display: grid;
	gap: 1.25rem;
}

.auth-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-copy {
	max-width: 620px;
}

.hero-stage {
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(216, 195, 255, 0.18);
	border-radius: 34px;
	background: #08111f;
	box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.hero-stage::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(5, 10, 20, 0.98) 0%, rgba(5, 10, 20, 0.9) 18%, rgba(5, 10, 20, 0.68) 30%, rgba(5, 10, 20, 0.26) 42%, rgba(5, 10, 20, 0) 54%),
		linear-gradient(180deg, rgba(5, 10, 20, 0.04) 0%, rgba(5, 10, 20, 0.18) 100%);
}

.hero-stage__image {
	display: block;
	width: 100%;
	height: auto;
}

.hero-stage__copy {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	bottom: 0;
	z-index: 1;
	padding: clamp(2rem, 4vw, 3rem);
	display: grid;
	grid-template-columns: minmax(17rem, 28rem) minmax(0, 1fr);
	grid-template-rows: auto 1fr auto;
	align-items: start;
	text-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.hero-stage__body {
	grid-column: 1;
	grid-row: 1;
	max-width: 26rem;
}

.hero-stage__copy .hero__lead {
	max-width: 26rem;
	margin-bottom: 0;
}

.hero-stage__copy .hero__actions {
	margin-top: 1.5rem;
}

.hero-support {
	display: grid;
	grid-template-columns: 1fr;
	align-items: start;
	gap: 0;
}

.hero-support .hero-note--hero {
	max-width: none;
	margin-left: 0;
}

.hero h1,
.section h1,
.section h2,
.story-card h3,
.story-article h1,
.hero-note h2 {
	margin: 0 0 1rem;
	line-height: 1.04;
	letter-spacing: -0.045em;
	font-weight: 700;
}

.hero h1 {
	font-size: clamp(2rem, 3.2vw, 3rem);
	max-width: 7ch;
	text-wrap: balance;
}

.hero__lead,
.prose,
.story-card p,
.empty-state p,
.account-banner p,
.hero-note p {
	font-size: 1.04rem;
	color: var(--ink-soft);
}

.eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.19em;
	color: var(--accent);
}

.hero__actions,
.site-actions,
.story-actions,
.story-card__meta,
.story-article__meta,
.account-banner,
.account-banner__actions {
	flex-wrap: wrap;
}

.stat-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.9rem;
	margin-top: 1.7rem;
	max-width: 540px;
}

.hero-stage__copy .stat-strip {
	grid-column: 1 / -1;
	grid-row: 3;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	width: min(62%, 46rem);
	max-width: none;
	margin-top: 0;
	align-self: end;
}

.hero-stage__copy .stat-card {
	padding: 0.8rem 0.9rem;
	background: linear-gradient(180deg, rgba(21, 34, 58, 0.84), rgba(13, 23, 40, 0.74));
	backdrop-filter: blur(10px);
}

.hero-stage__copy .stat-card strong {
	font-size: 0.96rem;
	margin-bottom: 0.22rem;
}

.hero-stage__copy .stat-card span {
	font-size: 0.84rem;
	line-height: 1.45;
}

.stat-card,
.story-card,
.editorial-panel,
.empty-state,
.story-article,
.bedtime-widget,
.hero-note,
.account-banner,
.auth-card {
	background:
		linear-gradient(180deg, rgba(17, 28, 48, 0.94), rgba(15, 24, 42, 0.8));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.stat-card {
	padding: 0.95rem 1rem;
}

.stat-card strong {
	display: block;
	font-size: 1.55rem;
	margin-bottom: 0.25rem;
}

.stat-card span {
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.hero-visual {
	display: grid;
	gap: 1rem;
}

.night-scene {
	position: relative;
	min-height: 420px;
	border-radius: 32px;
	overflow: hidden;
	border: 1px solid rgba(216, 195, 255, 0.18);
	background:
		radial-gradient(circle at 70% 18%, rgba(255, 244, 207, 0.22), transparent 16%),
		radial-gradient(circle at 50% 4%, rgba(168, 215, 255, 0.12), transparent 22%),
		linear-gradient(180deg, #18274b 0%, #111a33 46%, #0c1225 100%);
	box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.night-scene__moon {
	position: absolute;
	top: 2.2rem;
	right: 3rem;
	width: 6rem;
	height: 6rem;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 32%, #fff8df, #ffd78f 72%);
	box-shadow: 0 0 44px rgba(255, 215, 143, 0.28);
}

.night-scene__stars,
.night-scene__stars::before,
.night-scene__stars::after {
	position: absolute;
	content: "";
	inset: 0;
	background-image:
		radial-gradient(circle, rgba(255,255,255,0.85) 0 1px, transparent 1.3px),
		radial-gradient(circle, rgba(255,255,255,0.6) 0 1px, transparent 1.4px),
		radial-gradient(circle, rgba(255,255,255,0.7) 0 1px, transparent 1.3px);
	background-size: 120px 120px, 180px 180px, 240px 240px;
	background-position: 10px 12px, 80px 30px, 40px 90px;
	opacity: 0.42;
}

.night-scene__stars::before {
	transform: rotate(12deg);
	opacity: 0.25;
}

.night-scene__stars::after {
	transform: rotate(-10deg);
	opacity: 0.18;
}

.night-scene__cloud {
	position: absolute;
	height: 2rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	filter: blur(1px);
}

.night-scene__cloud--one {
	top: 5.4rem;
	left: 3.2rem;
	width: 7rem;
}

.night-scene__cloud--two {
	top: 8rem;
	right: 8.5rem;
	width: 5.4rem;
}

.night-scene__hill {
	position: absolute;
	left: -10%;
	right: -10%;
	border-radius: 50%;
}

.night-scene__hill--back {
	bottom: 4.5rem;
	height: 11rem;
	background: linear-gradient(180deg, #1d3159, #142544);
}

.night-scene__hill--front {
	bottom: -2rem;
	height: 12rem;
	background: linear-gradient(180deg, #0d1b34, #081120);
}

.night-scene__house {
	position: absolute;
	bottom: 4.2rem;
	left: 50%;
	width: 8.5rem;
	height: 6.8rem;
	transform: translateX(-50%);
	border-radius: 1rem 1rem 0.5rem 0.5rem;
	background: linear-gradient(180deg, #1d2b48, #10182b);
	box-shadow: 0 20px 34px rgba(0, 0, 0, 0.24);
}

.night-scene__house::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -2.3rem;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-left: 4.8rem solid transparent;
	border-right: 4.8rem solid transparent;
	border-bottom: 2.6rem solid #1a2741;
}

.night-scene__window {
	position: absolute;
	top: 2rem;
	width: 1.35rem;
	height: 1.75rem;
	border-radius: 0.45rem;
	background: linear-gradient(180deg, #fff3be, #f0c67c);
	box-shadow: 0 0 20px rgba(240, 198, 124, 0.2);
}

.night-scene__window:first-of-type {
	left: 1.9rem;
}

.night-scene__window:last-of-type {
	right: 1.9rem;
}

.hero-note,
.editorial-panel,
.story-card,
.empty-state,
.story-article,
.bedtime-widget,
.account-banner,
.auth-card {
	padding: 1.35rem;
}

.hero-note {
	margin: -6rem 1.25rem 0 auto;
	max-width: 23rem;
	position: relative;
	z-index: 2;
	backdrop-filter: blur(14px);
}

.hero-note--hero {
	margin: 0;
	max-width: none;
	display: grid;
	grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.25rem;
	padding: 1rem 1.15rem;
}

.hero-note--hero .hero-note__head {
	margin-bottom: 0.5rem;
	justify-content: flex-start;
}

.hero-note--hero h2 {
	margin: 0;
	font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.hero-note__body {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	align-items: center;
	gap: 1rem;
}

.hero-note--hero .feature-list {
	margin: 0;
}

.hero-note--hero p {
	margin: 0;
}

.hero-note__actions {
	justify-content: flex-end;
	white-space: nowrap;
}

.hero-note__head,
.section-heading {
	align-items: center;
	justify-content: space-between;
}

.hero-note__head {
	margin-bottom: 0.75rem;
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.feature-list {
	margin: 0 0 1.1rem;
	padding-left: 1.1rem;
	color: var(--ink-soft);
}

.story-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-grid--single {
	grid-template-columns: 1fr;
}

.story-grid--featured {
	grid-template-columns: 1fr;
}

.story-card {
	transition: transform 0.18s ease, border-color 0.18s ease;
	overflow: hidden;
}

.story-card--row {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.story-card--row:hover {
	transform: none;
}

img.story-card__thumb {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
}

.story-card__thumb--placeholder {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1.3rem;
	opacity: 0.45;
}

.story-card__body {
	min-width: 0;
	flex: 1;
}

.story-card--row h3 {
	font-size: 1rem;
	margin: 0.15rem 0 0.35rem;
}

.story-card--row .bedtime-card-actions {
	margin-top: 0.35rem;
}

.story-card:hover {
	transform: translateY(-3px);
	border-color: rgba(168, 215, 255, 0.26);
}

.story-card__media {
	display: block;
	margin: -1.35rem -1.35rem 1rem;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.story-card__image,
.story-hero-image__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

[data-story-parallax] .story-hero-image__img {
	transform: scale(1.12);
	transform-origin: center center;
	will-change: transform;
	transition: transform 0.12s linear;
}

.story-hero-image {
	margin: 0 0 1.4rem;
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
	aspect-ratio: 16 / 8;
}

@media (prefers-reduced-motion: reduce) {
	[data-story-parallax] .story-hero-image__img {
		transform: none;
		transition: none;
	}
}

.pill {
	display: inline-flex;
	align-items: center;
	padding: 0.34rem 0.72rem;
	border-radius: 999px;
	background: rgba(168, 215, 255, 0.12);
	color: #dcedff;
	font-size: 0.79rem;
	font-weight: 700;
}

.pill--light {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ink);
}

.pill--length {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid rgba(168, 215, 255, 0.16);
	background: rgba(255, 211, 139, 0.14);
	color: #ffe8b5;
}

.pill--audio {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid rgba(168, 215, 255, 0.18);
	background: rgba(168, 215, 255, 0.12);
	color: #dcedff;
}

.pill--rating {
	display: inline-flex;
	align-items: center;
	gap: 0.32rem;
	padding: 0.25rem 0.56rem;
	border: 1px solid rgba(151, 244, 196, 0.18);
	background: rgba(151, 244, 196, 0.12);
	color: #d7ffe9;
	font-size: 0.72rem;
}

.pill--free-readable {
	border: 1px solid rgba(151, 244, 196, 0.22);
	background: rgba(151, 244, 196, 0.14);
	color: #d7ffe9;
}

.pill--free-locked {
	border: 1px solid rgba(255, 176, 176, 0.2);
	background: rgba(255, 176, 176, 0.14);
	color: #ffd7d7;
}

.pill__icon {
	font-size: 0.9em;
	line-height: 1;
}

.story-card__meta {
	margin-bottom: 0.35rem;
}

.story-card--free-readable {
	border-color: rgba(151, 244, 196, 0.18);
}

.story-card--free-readable:hover {
	border-color: rgba(151, 244, 196, 0.32);
}

.story-card--free-locked {
	border-color: rgba(255, 176, 176, 0.16);
}

.story-card--free-locked:hover {
	border-color: rgba(255, 176, 176, 0.28);
}

.story-card__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.45rem;
	margin-top: 1rem;
}

.story-card--row .story-card__footer {
	margin-top: 0.55rem;
}

.story-toolbar {
	display: grid;
	gap: 0.65rem;
	margin: 0;
}

.story-toolbar__heading {
	padding: 0;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--ink-soft);
}

.story-archive-access-note {
	margin: 0.65rem 0 0;
	max-width: 54rem;
	color: var(--ink-soft);
}

.story-archive-controls {
	display: grid;
	gap: 1rem;
	margin: 0 0 1.35rem;
	padding: 1.15rem 1.2rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(17, 28, 48, 0.82), rgba(11, 19, 35, 0.64));
}

.story-filters {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	justify-content: flex-start;
	margin: 0;
}

.pagination {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

.pagination--top {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 1rem;
}

.story-search {
	display: grid;
	gap: 0.9rem;
}

.story-search__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.story-search__input-wrap {
	position: relative;
	flex: 1 1 24rem;
	min-width: 0;
}

.story-search__input {
	width: 100%;
	min-width: 0;
	padding: 0.82rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
}

.story-search__input::placeholder {
	color: var(--ink-soft);
}

.story-search-results {
	position: absolute;
	top: calc(100% + 0.55rem);
	left: 0;
	right: 0;
	z-index: 12;
	display: grid;
	gap: 0.3rem;
	padding: 0.45rem;
	border: 1px solid rgba(167, 186, 230, 0.18);
	border-radius: 18px;
	background: rgba(9, 16, 30, 0.96);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
	backdrop-filter: blur(14px);
}

.story-search-results[hidden] {
	display: none;
}

.story-search-result {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 0.8rem;
	align-items: center;
	padding: 0.45rem;
	border-radius: 14px;
	color: var(--ink);
	transition: background 0.18s ease, transform 0.18s ease;
}

.story-search-result:hover {
	background: rgba(255, 255, 255, 0.06);
	transform: translateY(-1px);
}

.story-search-result__thumb-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
}

.story-search-result__thumb {
	width: 3rem;
	height: 3rem;
	border-radius: 10px;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.05);
}

.story-search-result__thumb--empty {
	display: block;
}

.story-search-result__title {
	min-width: 0;
	font-size: 0.96rem;
	font-weight: 700;
	line-height: 1.35;
}

.story-search-results__empty {
	padding: 0.75rem 0.9rem;
	color: var(--ink-soft);
	font-size: 0.95rem;
}

.story-search__sort {
	display: grid;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.story-search__legend {
	padding: 0;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--ink-soft);
}

.story-sort {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.story-sort__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.story-sort__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.8rem;
	padding: 0.72rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink-soft);
	font-size: 0.94rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.story-sort__label:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ink);
	transform: translateY(-1px);
}

.story-sort__input:checked + .story-sort__label {
	background: rgba(168, 215, 255, 0.16);
	border-color: rgba(168, 215, 255, 0.28);
	color: #dcedff;
}

.story-sort__input:focus-visible + .story-sort__label {
	outline: 2px solid rgba(168, 215, 255, 0.55);
	outline-offset: 2px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.8rem;
	padding: 0.72rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
	font-weight: 700;
	line-height: 1;
}

.pagination .page-numbers.current {
	background: rgba(168, 215, 255, 0.16);
	border-color: rgba(168, 215, 255, 0.28);
	color: #dcedff;
}

.pagination a.page-numbers:hover {
	background: rgba(255, 255, 255, 0.08);
}

.story-filters .button.is-active {
	background: rgba(168, 215, 255, 0.16);
	border-color: rgba(168, 215, 255, 0.28);
	color: #dcedff;
}

.prose p {
	margin: 0 0 1.15rem;
}

.story-gate {
	margin-top: 1.6rem;
	padding: 1.4rem;
	border: 1px solid rgba(216, 195, 255, 0.18);
	border-radius: 22px;
	background:
		radial-gradient(circle at top right, rgba(255, 211, 139, 0.12), transparent 26%),
		linear-gradient(180deg, rgba(21, 31, 53, 0.96), rgba(13, 21, 38, 0.9));
}

.story-gate h2 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	letter-spacing: -0.03em;
}

.story-gate p {
	margin: 0;
	color: var(--ink-soft);
}

.story-gate p + p {
	margin-top: 0.7rem;
}

.story-gate__actions {
	display: flex;
	gap: 0.9rem;
	flex-wrap: wrap;
	margin-top: 1.25rem;
}

.story-audio-block {
	margin-top: 1.6rem;
	padding: 1.4rem;
	border: 1px solid rgba(168, 215, 255, 0.16);
	border-radius: 22px;
	background:
		radial-gradient(circle at top right, rgba(168, 215, 255, 0.12), transparent 24%),
		linear-gradient(180deg, rgba(17, 29, 51, 0.96), rgba(12, 21, 38, 0.9));
}

.story-audio-block h2 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	letter-spacing: -0.03em;
}

.story-audio-block p {
	margin: 0 0 1rem;
	color: var(--ink-soft);
}

.story-audio-player {
	width: 100%;
	display: block;
}

.membership-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0 0 1rem;
	padding: 0.55rem 0.8rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
	font-size: 0.92rem;
}

.membership-chip span {
	color: var(--ink-soft);
}

.membership-chip strong {
	font-size: 0.95rem;
}

.membership-chip.is-premium {
	border-color: rgba(255, 211, 139, 0.28);
	background: rgba(255, 211, 139, 0.08);
}

.membership-chip.is-free {
	border-color: rgba(168, 215, 255, 0.2);
	background: rgba(168, 215, 255, 0.08);
}

.membership-chip.is-guest {
	border-color: rgba(216, 195, 255, 0.2);
	background: rgba(216, 195, 255, 0.08);
}

.bedtime-subscription-meta {
	display: grid;
	gap: 0.45rem;
	margin: 1rem 0 1.2rem;
}

.bedtime-subscription-meta p {
	margin: 0;
	color: var(--ink-soft);
}

.prose form,
.bedtime-widget form,
.auth-card form {
	display: grid;
	gap: 1rem;
}

.prose label,
.bedtime-widget label,
.auth-card label {
	display: grid;
	gap: 0.38rem;
	font-weight: 700;
}

.auth-card label.auth-check {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.7rem;
	font-weight: 400;
}

.auth-check input[type="checkbox"] {
	width: auto;
	margin: 0;
}

.bedtime-premium-form label.auth-check {
	display: inline-flex;
	grid-template-columns: none;
	align-items: center;
	justify-content: flex-start;
	gap: 0.7rem;
	font-weight: 400;
}

.prose input,
.prose textarea,
.prose select,
.bedtime-widget input,
.bedtime-widget textarea,
.bedtime-widget select,
.auth-card input {
	width: 100%;
	padding: 0.92rem 1rem;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: rgba(5, 10, 20, 0.82);
	color: var(--ink);
	font: inherit;
}

.bedtime-message {
	padding: 0.9rem 1rem;
	border-radius: 16px;
	margin-bottom: 1rem;
	background: rgba(255, 255, 255, 0.06);
}

.bedtime-message--error {
	background: rgba(255, 176, 176, 0.14);
	color: #ffd7d7;
}

.bedtime-message--success {
	background: rgba(151, 244, 196, 0.14);
	color: #d7ffe9;
}

.bedtime-message--catalog {
	background: rgba(168, 215, 255, 0.08);
	border: 1px solid rgba(168, 215, 255, 0.16);
}

.bedtime-free-catalog-list {
	margin: 0.75rem 0 0;
	padding-left: 1.1rem;
	display: grid;
	gap: 0.45rem;
}

.bedtime-free-catalog-list li::marker {
	color: var(--accent);
}

.auth-card--accent {
	background:
		radial-gradient(circle at top right, rgba(216, 195, 255, 0.16), transparent 24%),
		linear-gradient(180deg, rgba(20, 31, 55, 0.96), rgba(15, 24, 42, 0.84));
}

.text-link {
	color: var(--accent);
}

.account-banner {
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	background:
		radial-gradient(circle at right top, rgba(216, 195, 255, 0.14), transparent 22%),
		linear-gradient(180deg, rgba(18, 29, 52, 0.95), rgba(13, 22, 41, 0.85));
}

.account-banner__actions {
	justify-content: flex-end;
}

.site-footer {
	padding: 2rem 0 2.8rem;
	border-top: 1px solid rgba(167, 186, 230, 0.08);
	background:
		radial-gradient(circle at 14% 0%, rgba(168, 215, 255, 0.12), transparent 26%),
		radial-gradient(circle at 88% 0%, rgba(216, 195, 255, 0.10), transparent 22%),
		linear-gradient(180deg, rgba(8, 15, 28, 0.95), rgba(8, 15, 28, 0.88));
	color: var(--ink-soft);
}

.site-footer__panel {
	padding: 1.8rem 0 0;
	border-radius: var(--radius);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--line);
}

.site-footer__column {
	display: grid;
	align-content: start;
	gap: 0.95rem;
}

.site-footer__heading {
	margin: 0;
	font-size: 0.9rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink);
}

.site-footer__text {
	margin: 0;
	max-width: 24rem;
	line-height: 1.8;
	color: var(--ink-soft);
}

.site-footer__payments {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.site-footer__payment-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--ink);
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.site-footer__payment-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 3.25rem;
	padding: 0.2rem;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.04);
}

.site-footer__payment-logo img {
	display: block;
	width: auto;
	height: 2.15rem;
}

.footer-nav a {
	color: var(--ink-soft);
	transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav a:hover {
	color: var(--ink);
	transform: translateX(2px);
}

.footer-nav {
	display: grid;
	gap: 0.85rem;
}

.site-footer__meta {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.5rem;
}

.site-footer__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1.15rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.88rem;
}

.footer-nav--social {
	justify-items: flex-start;
}

.site-footer__copyright {
	margin: 0;
	color: var(--ink-soft);
}

body.js-enhanced [data-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

body.js-enhanced [data-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 1120px) {
	.site-header__inner,
	.hero__grid,
	.editorial-grid,
	.story-grid,
	.bedtime-library-grid,
	.stat-strip,
	.auth-grid {
		grid-template-columns: 1fr;
	}

	.editorial-panel--generator,
	.editorial-panel--library {
		grid-column: auto;
		grid-row: auto;
	}

	.hero-note {
		margin: -4rem 0 0;
		max-width: none;
	}

	.hero-stage__copy {
		padding: 2rem;
	}

	.hero-note--hero {
		grid-template-columns: 1fr;
		gap: 1rem;
		margin: 0;
		max-width: none;
	}

	.hero-note__body {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero-note__actions {
		justify-content: flex-start;
		white-space: normal;
	}

	.site-header__inner {
		justify-items: start;
	}

	.site-nav {
		justify-self: start;
	}
}

@media (max-width: 760px) {
	.site-header {
		position: static;
	}

	.site-header__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.9rem;
		padding: 0.8rem 0;
	}

	.site-brand__text {
		font-size: 0.95rem;
	}

	.site-menu-toggle {
		display: inline-flex;
		flex-direction: column;
		gap: 0.28rem;
		padding: 0.75rem;
		border: 1px solid var(--line);
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.04);
		box-shadow: none;
	}

	.site-menu-toggle__line {
		width: 1.15rem;
		height: 2px;
		border-radius: 999px;
		background: var(--ink);
	}

	.site-header__panel {
		display: none;
		grid-column: 1 / -1;
		padding-top: 0.35rem;
	}

	body.menu-open .site-header__panel {
		display: grid;
		gap: 0.9rem;
	}

	.hero,
	.section {
		padding: 2.9rem 0;
	}

	.hero h1 {
		font-size: clamp(2.2rem, 9vw, 3.2rem);
		max-width: none;
	}

	.hero-stage {
		border-radius: 28px;
	}

	.hero-stage::after {
		background:
			linear-gradient(180deg, rgba(5, 10, 20, 0.08) 0%, rgba(5, 10, 20, 0.2) 100%);
	}

	.hero-stage__copy {
		position: static;
		display: flex;
		flex-direction: column;
		width: auto;
		padding: 1.35rem;
		background: linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(10, 18, 34, 0.92));
		border-top: 1px solid rgba(167, 186, 230, 0.12);
		text-shadow: none;
	}

	.hero-stage__copy .stat-strip {
		width: 100%;
		max-width: none;
		grid-template-columns: 1fr;
		margin-top: 1.25rem;
	}

	.hero-support .hero-note--hero {
		max-width: none;
		margin: 0;
	}

	.hero-note__body {
		grid-template-columns: 1fr;
	}

	.story-archive-controls,
	.story-toolbar {
		align-items: stretch;
	}

	.story-archive-controls {
		padding: 1rem;
	}

	.story-search__row {
		align-items: stretch;
	}

	.story-search__input,
	.story-search .button {
		width: 100%;
		flex: 1 1 100%;
	}

	.site-nav__list,
	.section-heading,
	.account-banner,
	.account-banner__actions,
	.site-footer__meta {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.site-nav {
		justify-self: stretch;
	}

	.site-nav__list {
		gap: 0.45rem;
		width: 100%;
	}

	.site-nav__list a {
		width: 100%;
		padding: 0.65rem 0.2rem;
		border-radius: 0.8rem;
	}

	.site-actions {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 0.65rem;
	}

	.site-header__panel .site-actions,
	.hero__actions,
	.account-banner__actions {
		width: 100%;
	}

	.site-actions .button {
		width: auto;
	}

	.hero__actions .button,
	.story-gate__actions .button,
	.account-banner__actions .button {
		width: 100%;
	}
}

/* --- Library Tabs & Queue --- */

.bedtime-library-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
	padding-bottom: 0.5rem;
	flex-wrap: wrap;
}

.bedtime-tab {
	background: none;
	border: none;
	color: var(--ink-soft);
	font: inherit;
	font-size: 0.92rem;
	padding: 0.4rem 0.8rem;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.bedtime-tab:hover {
	background: var(--surface-2);
	color: var(--ink);
}

.bedtime-tab.is-active {
	background: var(--surface-2);
	color: var(--accent);
}

.bedtime-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.75rem;
}

.bedtime-card-actions .button {
	font-size: 0.8rem;
	padding: 0.3rem 0.6rem;
}

.bedtime-queue-actions {
	margin-bottom: 1rem;
}

.bedtime-queue-actions .button {
	font-size: 0.88rem;
}

.story-actions--top {
	padding-top: 1.5rem;
	padding-bottom: 0;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.bedtime-vote-box {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 0.55rem;
	column-gap: 0.7rem;
	max-width: 100%;
	padding: 0.68rem 1rem;
	border: 1px solid var(--line);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.04);
}

.bedtime-vote-box__label,
.bedtime-vote-box__total,
.bedtime-vote-box__message {
	color: var(--muted);
	font-size: 0.86rem;
}

.bedtime-vote-box__actions {
	display: inline-flex;
	gap: 0.35rem;
}

.bedtime-vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.34rem;
	min-width: 4rem;
	padding: 0.56rem 0.74rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--ink);
	box-shadow: none;
}

.bedtime-vote-btn.is-active {
	border-color: rgba(168, 215, 255, 0.5);
	background: rgba(168, 215, 255, 0.14);
}

.bedtime-vote-box__message {
	width: 100%;
	margin: -0.12rem 0 0;
	padding: 0 0.1rem;
}

.button--danger {
	border-color: rgba(255, 120, 120, 0.3);
	color: #ffa0a0;
}

.button--danger:hover {
	background: rgba(255, 120, 120, 0.12);
	border-color: rgba(255, 120, 120, 0.5);
}

/* --- Library Preview (compact) --- */

.bedtime-library-preview-list {
	display: grid;
	gap: 0.5rem;
}

.bedtime-library-preview-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.9rem 0.5rem 0.5rem;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.03);
	transition: background 0.15s;
}

img.bedtime-library-preview-thumb {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
}

.bedtime-library-preview-thumb--placeholder {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1.1rem;
	opacity: 0.5;
}

.bedtime-library-preview-item:hover {
	background: rgba(255, 255, 255, 0.06);
}

.bedtime-library-preview-title {
	font-weight: 700;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 1;
}

.bedtime-library-preview-more {
	margin: 0.6rem 0 0;
	font-size: 0.88rem;
}
