/* TalesTroupe — Immersive story reading */

.tt-story-page {
	position: relative;
	min-height: 100vh;
	background: var(--tt-navy);
	color: var(--tt-text);
}

.tt-story-page::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	background-image: var(--story-bg);
	background-size: cover;
	background-position: center;
	filter: blur(28px) saturate(1.1);
	transform: scale(1.08);
	opacity: 0.45;
}

.tt-story-page::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(180deg, rgba(11, 16, 32, 0.92) 0%, rgba(17, 24, 39, 0.88) 40%, rgba(26, 26, 46, 0.95) 100%);
	pointer-events: none;
}

.tt-story-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	height: 3px;
	background: rgba(255, 255, 255, 0.08);
}

.tt-story-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--tt-gold), var(--tt-cyan));
	box-shadow: 0 0 12px rgba(232, 184, 74, 0.5);
	transition: width 0.15s ease-out;
}

.tt-story-topbar,
.tt-story-article {
	position: relative;
	z-index: 2;
}

.tt-story-article {
	max-width: 46rem;
	margin: 0 auto;
	padding: 0 clamp(1rem, 4vw, 2rem) 4rem;
}

.tt-story-header {
	padding-top: 1rem;
	margin-bottom: 1.25rem;
}

.tt-story-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
	font-size: 0.82rem;
}

.tt-story-breadcrumb a {
	color: var(--tt-cyan);
	text-decoration: none;
}

.tt-story-header h1 {
	margin: 0 0 0.85rem;
	font-family: var(--tt-font-display);
	font-size: clamp(2rem, 6vw, 3.25rem);
	font-weight: 600;
	line-height: 1.08;
	text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.tt-story-header__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tt-story-header__meta span {
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--tt-muted);
}

.tt-story-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 0.5rem;
}

.tt-story-modes button {
	padding: 0.45rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--tt-muted);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tt-story-modes button.is-active {
	background: rgba(232, 184, 74, 0.2);
	border-color: rgba(232, 184, 74, 0.55);
	color: var(--tt-gold-soft);
}

.tt-story-modes button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.tt-story-modes__note {
	margin: 0 0 1.25rem;
	font-size: 0.78rem;
	color: rgba(244, 241, 234, 0.45);
}

.tt-story-shell {
	padding: clamp(1.25rem, 4vw, 2rem);
	border-radius: var(--tt-radius-lg);
	background: rgba(17, 24, 39, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(12px);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.tt-story-content {
	font-size: clamp(1.05rem, 2vw, 1.2rem);
	line-height: 1.85;
	color: rgba(244, 241, 234, 0.9);
}

.tt-story-content p {
	margin: 0 0 1.35rem;
}

.tt-story-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--tt-radius);
}

.tt-story-rating {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tt-story-rating h2 {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

.tt-story-footer-actions {
	margin-top: 2rem;
	text-align: center;
}

@media (max-width: 640px) {
	.tt-story-modes {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 0.25rem;
		scrollbar-width: none;
	}

	.tt-story-modes::-webkit-scrollbar {
		display: none;
	}

	.tt-story-modes button {
		flex-shrink: 0;
	}
}
