/* ==========================================================================
   FuturisticStream — Design tokens & base layout
   No external font requests: system stack tuned for a technical/HUD feel,
   keeps CSP script/style-src locked to 'self' and shaves a network round trip.
   ========================================================================== */

:root {
	/* Palette */
	--bg-void: #07070f;
	--bg-surface: #0d0d1b;
	--bg-card: #12122388;
	--bg-card-solid: #14142a;
	--text: #e9e9f5;
	--text-muted: #8a8aab;
	--text-faint: #55556e;
	--accent: #7b61ff;      /* overridden inline per admin setting */
	--accent-2: #00e0c6;    /* secondary signal color, fixed */
	--danger: #ff5470;
	--border: #23233d;

	/* Type */
	--font-display: 'Chakra Petch', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', system-ui, sans-serif;
	--font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

	/* Layout */
	--radius: 10px;
	--radius-lg: 16px;
	--container: 1400px;
	--header-h: 72px;

	color-scheme: dark;
}

/* Since we skip webfonts, borrow Chakra Petch's angular feel via a
   condensed system fallback + letter-spacing/weight on headings instead. */

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg-void);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }

.fs-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.fs-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.fs-skip-link:focus { left: 0; }

:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
}

.fs-container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------------------------------- Header ---------------------------------- */

.fs-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	background: linear-gradient(to bottom, rgba(7,7,15,0.95), rgba(7,7,15,0.75));
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
	overflow: visible;
}

/* Lift header above the overlay when drawer is open so hamburger stays tappable */
body.fs-menu-open .fs-header {
	z-index: 10000;
}

.fs-header__inner {
	max-width: var(--container);
	margin: 0 auto;
	height: 100%;
	padding: 0 24px;
	display: flex;
	align-items: center;
	gap: 32px;
}

.fs-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.fs-logo__mark {
	width: 20px; height: 20px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	flex-shrink: 0;
}

.fs-nav {
	display: flex;
	gap: 28px;
	flex: 1;
}

/* wp_nav_menu outputs ul > li > a — strip default list styling */
.fs-nav__list {
	display: flex;
	align-items: center;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fs-nav__list li {
	margin: 0;
	padding: 0;
}

.fs-nav a,
.fs-nav__list li a {
	font-size: 14.5px;
	font-weight: 500;
	color: var(--text-muted);
	transition: color 0.15s ease;
	letter-spacing: 0.01em;
}

.fs-nav a:hover,
.fs-nav__list li a:hover { color: var(--text); }

/* Current/active menu item */
.fs-nav__list .current-menu-item > a,
.fs-nav__list .current-menu-ancestor > a {
	color: var(--text);
}

.fs-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fs-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	color: var(--text-muted);
	transition: background 0.15s ease, color 0.15s ease;
}
.fs-icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.fs-lang-switch select {
	background: var(--bg-card-solid);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 13px;
}

.fs-search-panel {
	position: absolute;
	top: 100%; left: 0; right: 0;
	background: rgba(9,9,18,0.98);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--border);
	padding: 20px 0;
}
.fs-search-panel__inner {
	max-width: 700px;
	margin: 0 auto;
	padding: 0 24px;
}
#fs-search-input {
	width: 100%;
	background: var(--bg-card-solid);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px 18px;
	font-size: 16px;
	color: var(--text);
}
#fs-search-input:focus { border-color: var(--accent); }

.fs-search-results {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
	max-height: 60vh;
	overflow-y: auto;
}

/* ---------------------------------- Hero ---------------------------------- */

.fs-hero {
	position: relative;
	min-height: 78vh;
	display: flex;
	align-items: flex-end;
	background-color: var(--bg-surface);
	background-image: var(--hero-bg);
	background-size: cover;
	background-position: center 20%;
	overflow: hidden;
}

.fs-hero__gradient {
	position: absolute; inset: 0;
	background:
		linear-gradient(to top, var(--bg-void) 4%, rgba(7,7,15,0.55) 45%, rgba(7,7,15,0.15) 75%),
		linear-gradient(to right, rgba(7,7,15,0.9) 0%, rgba(7,7,15,0.2) 55%);
}

/* Signature element: a slow scanline sweep across the hero, evoking a
   signal being locked/decoded — the one deliberate motion moment on the page. */
.fs-hero__scanline {
	position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(0,224,198,0.06) 50%, transparent 100%);
	background-size: 100% 240px;
	animation: fs-scan 7s linear infinite;
	pointer-events: none;
	mix-blend-mode: screen;
}
@keyframes fs-scan {
	0% { background-position: 0 -240px; }
	100% { background-position: 0 100vh; }
}
@media (prefers-reduced-motion: reduce) {
	.fs-hero__scanline { animation: none; display: none; }
}

.fs-hero__content {
	position: relative;
	max-width: 640px;
	padding: 0 24px 64px;
	margin: 0 auto 0 max(24px, calc((100vw - var(--container)) / 2 + 24px));
}

.fs-hero__eyebrow {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--accent-2);
	margin-bottom: 14px;
}

.fs-hero__title {
	font-family: var(--font-display);
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.01em;
	margin: 0 0 16px;
	text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.fs-hero__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--text-muted);
	font-size: 14px;
	margin-bottom: 18px;
}

.fs-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 5px;
	font-size: 12.5px;
	font-weight: 600;
	border: 1px solid var(--border);
}
.fs-badge--rating { color: #ffd166; border-color: rgba(255,209,102,0.3); background: rgba(255,209,102,0.08); }
.fs-badge--type { color: var(--accent-2); border-color: rgba(0,224,198,0.3); background: rgba(0,224,198,0.08); }
/* IMDb badge — links to the IMDb title page */
.fs-badge--imdb {
	color: #f5c518;
	border-color: rgba(245,197,24,0.35);
	background: rgba(245,197,24,0.08);
	text-decoration: none;
	gap: 5px;
	transition: background 0.15s, border-color 0.15s;
}
.fs-badge--imdb:hover { background: rgba(245,197,24,0.16); border-color: rgba(245,197,24,0.6); }
.fs-badge--imdb .fs-badge__sub { font-weight: 400; opacity: 0.75; font-size: 11px; }

.fs-hero__overview {
	color: var(--text-muted);
	font-size: 15.5px;
	margin: 0 0 28px;
	max-width: 56ch;
}

.fs-hero__actions { display: flex; gap: 12px; }

.fs-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: 14.5px;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fs-btn--primary {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 0 0 rgba(123,97,255,0);
}
.fs-btn--primary:hover { box-shadow: 0 6px 24px rgba(123,97,255,0.4); transform: translateY(-1px); }
.fs-btn--ghost {
	background: rgba(255,255,255,0.06);
	border: 1px solid var(--border);
	color: var(--text);
}
.fs-btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------------------------------- Rows / Cards ---------------------------------- */

.fs-rows { padding: 48px 24px 80px; }

.fs-row { margin-bottom: 44px; }

.fs-row__title {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.01em;
	margin: 0 0 16px;
}

.fs-row__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 170px;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x proximity;
}
.fs-row__track::-webkit-scrollbar { height: 6px; }
.fs-row__track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.fs-search-page__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 16px;
}

.fs-search-page__title {
	font-family: var(--font-display);
	font-size: clamp(22px, 3vw, 30px);
	margin: 32px 0 20px;
}

.fs-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin: 36px 0 8px;
	color: var(--text-muted);
	font-size: 14px;
}

.fs-card {
	position: relative;
	display: block;
	scroll-snap-align: start;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--bg-card-solid);
	transition: transform 0.2s ease;
}
.fs-card:hover { transform: translateY(-4px); }

.fs-card__poster {
	position: relative;
	aspect-ratio: 2 / 3;
	background: var(--bg-card-solid);
	overflow: hidden;
}
.fs-card__poster img { width: 100%; height: 100%; object-fit: cover; }
.fs-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-card-solid), var(--bg-surface)); }

/* HUD-style corner brackets on hover — the small signature touch
   echoed from the hero's scan motif, applied to targeting a title. */
.fs-card__poster::before,
.fs-card__poster::after {
	content: '';
	position: absolute;
	width: 18px; height: 18px;
	opacity: 0;
	transition: opacity 0.18s ease;
	pointer-events: none;
}
.fs-card__poster::before {
	top: 6px; left: 6px;
	border-top: 2px solid var(--accent-2);
	border-left: 2px solid var(--accent-2);
}
.fs-card__poster::after {
	bottom: 6px; right: 6px;
	border-bottom: 2px solid var(--accent-2);
	border-right: 2px solid var(--accent-2);
}
.fs-card:hover .fs-card__poster::before,
.fs-card:hover .fs-card__poster::after { opacity: 0.85; }

.fs-card__rating {
	position: absolute; top: 8px; right: 8px;
	background: rgba(0,0,0,0.65);
	backdrop-filter: blur(4px);
	color: #ffd166;
	font-size: 12px; font-weight: 700;
	padding: 3px 7px;
	border-radius: 5px;
}

.fs-card__play {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(7,7,15,0.35);
	color: #fff;
	opacity: 0;
	transition: opacity 0.18s ease;
}
.fs-card:hover .fs-card__play { opacity: 1; }

.fs-card__meta {
	padding: 10px 4px 2px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.fs-card__title {
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fs-card__year { font-size: 12px; color: var(--text-faint); }

/* ---------------------------------- Watch page ---------------------------------- */

.fs-watch { position: relative; }

.fs-watch__player-wrap { padding: 24px; }

.fs-watch__body {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 32px;
	padding: 0 24px 48px;
}
.fs-watch__poster {
	width: 100%;
	max-width: 220px;
}
.fs-watch__poster img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: var(--radius-lg);
}

.fs-watch__title {
	font-family: var(--font-display);
	font-size: clamp(24px, 3vw, 34px);
	margin: 0 0 12px;
}
.fs-watch__meta {
	display: flex; gap: 12px; align-items: center;
	color: var(--text-muted); font-size: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.fs-watch__overview { color: var(--text-muted); max-width: 75ch; margin-bottom: 28px; }

/* Overview read-more toggle (visible only on mobile via JS) */
.fs-overview-toggle {
	display: none; /* shown by JS only when needed */
	background: none;
	border: none;
	padding: 4px 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--accent-2);
	cursor: pointer;
	margin-top: -10px;
	margin-bottom: 20px;
}
.fs-overview-toggle:hover { opacity: 0.8; }

.fs-watch__cast h3 { font-size: 15px; margin-bottom: 12px; font-family: var(--font-display); }
.fs-cast-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.fs-cast-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; flex-shrink: 0; }
.fs-cast-chip img, .fs-cast-chip__placeholder { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--bg-card-solid); }
.fs-cast-chip span { font-size: 11.5px; text-align: center; color: var(--text-muted); line-height: 1.2; }

/* ---- Mobile watch page ---- */
@media (max-width: 720px) {
	/* Player: edge-to-edge, no side padding */
	.fs-watch__player-wrap { padding: 0; }

	/* Body: single column, contained — no horizontal overflow */
	.fs-watch__body {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 14px 14px 28px;
		/* Prevent any child from causing horizontal scroll */
		overflow: hidden;
		min-width: 0;
	}
	.fs-watch__poster { display: none; }

	/* Info column must also be constrained */
	.fs-watch__info {
		min-width: 0;
		overflow: hidden;
	}

	/* Title: wrap gracefully, readable size */
	.fs-watch__title {
		font-size: clamp(16px, 4.5vw, 22px);
		word-break: break-word;
		overflow-wrap: break-word;
		hyphens: auto;
		white-space: normal;
		margin-bottom: 8px;
		line-height: 1.25;
	}

	/* Meta badges: wrap, smaller text */
	.fs-watch__meta {
		gap: 6px 8px;
		font-size: 12.5px;
		margin-bottom: 12px;
		flex-wrap: wrap;
	}

	/* Description: clamp to 3 lines, "Read more" reveals the rest */
	.fs-watch__overview {
		font-size: 13px;
		line-height: 1.6;
		max-width: 100%;
		margin-bottom: 6px;
		/* Max-height clamp approach — works reliably across all browsers */
		max-height: calc(1.6em * 3);
		overflow: hidden;
		position: relative;
	}
	/* Fade-out gradient at bottom of clamped text */
	.fs-watch__overview:not(.is-expanded)::after {
		content: '';
		position: absolute;
		bottom: 0; left: 0; right: 0;
		height: 1.8em;
		background: linear-gradient(to bottom, transparent, var(--bg-void, #07070f));
		pointer-events: none;
	}
	/* Expanded: remove clamp */
	.fs-watch__overview.is-expanded {
		max-height: none;
		overflow: visible;
	}
	.fs-watch__overview.is-expanded::after { display: none; }

	/* Read more toggle */
	.fs-overview-toggle { display: inline-block; }

	/* Cast section: heading + horizontal scroll strip */
	.fs-watch__cast { overflow: hidden; }
	.fs-watch__cast h3 { font-size: 13.5px; margin-bottom: 8px; }

	/* Cast row: horizontal scroll, never wraps, never bleeds */
	.fs-cast-row {
		display: flex;
		flex-wrap: nowrap;
		gap: 10px;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 8px;
		/* Negative margin trick: pull scroll area to page edge for finger friendliness */
		margin: 0 -14px;
		padding-left: 14px;
		padding-right: 14px;
		/* Smooth momentum scroll on iOS */
		-webkit-overflow-scrolling: touch;
		/* Hide scrollbar visually but keep it functional */
		scrollbar-width: none;
	}
	.fs-cast-row::-webkit-scrollbar { display: none; }

	/* Cast chips: fixed size, never shrink */
	.fs-cast-chip {
		flex: 0 0 54px;
		width: 54px;
		gap: 4px;
	}
	.fs-cast-chip img,
	.fs-cast-chip__placeholder {
		width: 48px;
		height: 48px;
	}
	.fs-cast-chip span {
		font-size: 10px;
		line-height: 1.2;
	}
}

/* ---------------------------------- Episodes ---------------------------------- */

.fs-episodes { padding: 8px 0 48px; }
.fs-episodes__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fs-episodes__header h2 { font-family: var(--font-display); font-size: 19px; margin: 0; }
.fs-season-select select {
	background: var(--bg-card-solid); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px;
}

.fs-episodes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.fs-episode-card {
	display: flex; gap: 12px; padding: 8px; border-radius: var(--radius);
	background: var(--bg-card-solid); border: 1px solid transparent;
	transition: border-color 0.15s ease;
}
.fs-episode-card:hover { border-color: var(--border); }
.fs-episode-card.is-active { border-color: var(--accent); }

.fs-episode-card__thumb { position: relative; width: 120px; flex-shrink: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg-surface); }
.fs-episode-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fs-episode-card__num {
	position: absolute; bottom: 4px; left: 4px;
	background: rgba(0,0,0,0.7); font-size: 11px; padding: 2px 6px; border-radius: 4px;
}
.fs-episode-card__playing {
	position: absolute; top: 4px; right: 4px;
	background: var(--accent); font-size: 10px; font-weight: 700;
	padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.fs-episode-card__meta { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.fs-episode-card__title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fs-episode-card__runtime { font-size: 12px; color: var(--text-faint); }

/* ---------------------------------- Footer ---------------------------------- */

.fs-footer { border-top: 1px solid var(--border); padding: 40px 24px; margin-top: 40px; }
.fs-footer__inner { max-width: var(--container); margin: 0 auto; text-align: center; color: var(--text-faint); font-size: 13px; }
.fs-footer__brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); color: var(--text-muted); margin-bottom: 10px; }
.fs-footer__meta, .fs-footer__copy { margin: 4px 0; }

/* ---------------------------------- Misc ---------------------------------- */

.fs-notice { padding: 100px 24px; text-align: center; }
.fs-empty { color: var(--text-faint); padding: 40px; text-align: center; grid-column: 1 / -1; }

.fs-404 { text-align: center; padding: 120px 24px; }
.fs-404__code {
	font-family: var(--font-display); font-size: 72px; font-weight: 700;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 780px) {
	.fs-nav { display: none; }
	.fs-hero { min-height: 62vh; }
	.fs-hero__content { padding-bottom: 40px; }
}

/* ── Custom Logo Image ────────────────────────────────────────────────── */
.fs-logo__img {
	display: block;
	width: auto;
	max-width: 200px;
	/* max-height is driven by the inline style set from the admin option   */
	object-fit: contain;
	object-position: left center;
	flex-shrink: 0;
	/* Prevent logo from being taller than the header on any viewport */
	max-height: min(var(--logo-h, 40px), calc(var(--header-h, 60px) - 16px));
}

@media (max-width: 780px) {
	.fs-logo__img {
		/* Slightly smaller on mobile — 80% of desktop size, min 24px */
		max-height: max(calc(var(--logo-h, 40px) * 0.8), 24px);
		max-width: 160px;
	}
}

/* Hamburger floats above the drawer when open */
.fs-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	padding: 8px;
	flex-shrink: 0;
	position: relative; /* needed for z-index to take effect */
	z-index: 1;         /* default — sits in normal header stacking */
	transition: z-index 0s;
}

/* When menu is open, lift the hamburger above the drawer (9999) */
body.fs-menu-open .fs-hamburger {
	z-index: 10000;
}

.fs-hamburger__bar {
	display: block;
	width: 20px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
	transform-origin: center;
}

/* Animated X when open */
.fs-hamburger[aria-expanded="true"] .fs-hamburger__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.fs-hamburger[aria-expanded="true"] .fs-hamburger__bar:nth-child(2) {
	opacity: 0;
	width: 0;
}
.fs-hamburger[aria-expanded="true"] .fs-hamburger__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav drawer ───────────────────────────────────────────────── */
.fs-mobile-nav {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(280px, 80vw);
	background: rgba(9, 9, 20, 0.98);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-left: 1px solid var(--border);
	z-index: 9999;
	padding: calc(var(--header-h) + 24px) 0 32px;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
	visibility: hidden;
}

.fs-mobile-nav.is-open {
	transform: translateX(0);
	visibility: visible;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

/* Close (✕) button inside the drawer — top-right corner */
.fs-mobile-nav__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 50%;
	color: var(--text-muted);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	flex-shrink: 0;
}

.fs-mobile-nav__close:hover {
	background: rgba(255,255,255,0.14);
	color: var(--text);
}

.fs-mobile-nav nav {
	display: flex;
	flex-direction: column;
}

/* wp_nav_menu list — reset and stack vertically */
.fs-mobile-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.fs-mobile-nav__list li {
	margin: 0;
	padding: 0;
}

.fs-mobile-nav nav a,
.fs-mobile-nav__list li a {
	display: block;
	padding: 16px 28px;
	font-size: 16px;
	font-weight: 600;
	color: var(--text-muted);
	letter-spacing: 0.02em;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}

.fs-mobile-nav__list li:first-child a {
	border-top: 1px solid rgba(255,255,255,0.05);
}

.fs-mobile-nav nav a:hover,
.fs-mobile-nav nav a:focus-visible,
.fs-mobile-nav__list li a:hover,
.fs-mobile-nav__list li a:focus-visible {
	color: var(--text);
	background: rgba(255,255,255,0.04);
	padding-left: 36px;
}

/* Accent bar on active/current link */
.fs-mobile-nav nav a[aria-current="page"],
.fs-mobile-nav__list .current-menu-item > a,
.fs-mobile-nav__list .current-menu-ancestor > a {
	color: var(--accent);
	border-left: 3px solid var(--accent);
	padding-left: 25px;
}

/* ── Overlay (darkens page behind the drawer) ────────────────────────── */
.fs-mobile-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 9998;
	opacity: 0;
	pointer-events: none; /* invisible and non-interactive by default */
	transition: opacity 0.3s ease;
}

.fs-mobile-nav-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── Show hamburger only on mobile ──────────────────────────────────── */
@media (max-width: 780px) {
	.fs-hamburger {
		display: inline-flex;
	}
}

/* Prevent body scroll while drawer is open */
body.fs-menu-open {
	overflow: hidden;
}

/* ==========================================================================
   MOBILE-FIRST FIXES — comprehensive audit pass
   Prevents horizontal scroll, contains ads, tightens spacing, improves
   tap targets and readability on viewports < 480px.
   ========================================================================== */

/* ── 1. Global overflow guard ─────────────────────────────────────────── */
/* The single most important rule — no element can make the page wider
   than the viewport. Ads, iframes, wide tables: all contained. */
html {
	overflow-x: hidden;
}
body {
	overflow-x: hidden;
	/* Ensure background-attachment:fixed (futuristic.css) doesn't cause
	   iOS to repaint the grid on every scroll tick — degrade gracefully */
}
@media (max-width: 780px) {
	body {
		background-attachment: scroll; /* fixes iOS fixed-bg jank */
	}
}

/* ── 2. Container: tighter padding on small screens ──────────────────── */
@media (max-width: 480px) {
	.fs-container {
		padding: 0 14px;
	}
}

/* ── 3. Header: tighter on mobile ────────────────────────────────────── */
@media (max-width: 780px) {
	.fs-header__inner {
		padding: 0 14px;
		gap: 10px;
	}
	/* Constrain logo text so it never wraps and pushes things off-screen */
	.fs-logo {
		font-size: 16px;
		min-width: 0;
		flex-shrink: 1;
		overflow: hidden;
	}
	.fs-logo__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	/* Actions row: tighter */
	.fs-header__actions {
		gap: 6px;
		flex-shrink: 0;
	}
}

/* ── 4. Hero: fix content margin on narrow screens ───────────────────── */
@media (max-width: 780px) {
	.fs-hero__content {
		/* Remove the complex calc margin that can overshoot on narrow vp */
		margin: 0;
		padding: 0 14px 40px;
		max-width: 100%;
	}
	.fs-hero__title {
		font-size: clamp(22px, 6vw, 36px);
	}
	.fs-hero__overview {
		font-size: 14px;
		max-width: 100%;
	}
	.fs-hero__actions {
		flex-wrap: wrap;
	}
	.fs-btn {
		padding: 11px 18px;
		font-size: 13.5px;
	}
}

/* ── 5. Content rows: less padding, cards don't overflow ─────────────── */
@media (max-width: 780px) {
	.fs-rows {
		padding: 24px 0 48px;
	}
	.fs-row {
		margin-bottom: 28px;
	}
	.fs-row__title {
		font-size: 17px;
		padding: 0 14px;
		margin-bottom: 10px;
	}
	/* Track: pull to edges for finger-friendly scrolling */
	.fs-row__track {
		padding: 0 14px 10px;
		/* Cards can be slightly smaller on mobile */
		grid-auto-columns: 140px;
		/* Always snap cleanly */
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}
	.fs-card {
		scroll-snap-align: start;
	}
}
@media (max-width: 480px) {
	.fs-row__track {
		grid-auto-columns: 120px;
	}
}

/* ── 6. Search results grid: single column on mobile ─────────────────── */
@media (max-width: 480px) {
	.fs-search-results {
		grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
		gap: 8px;
	}
	.fs-search-page__grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 10px;
	}
}

/* ── 7. Episodes grid: single column on narrow screens ───────────────── */
@media (max-width: 600px) {
	.fs-episodes__grid {
		grid-template-columns: 1fr;
	}
	.fs-episode-card__thumb {
		width: 90px;
	}
}

/* ── 8. Footer: compact on mobile ────────────────────────────────────── */
@media (max-width: 480px) {
	.fs-footer {
		padding: 24px 14px;
	}
}

/* ── 9. Ad containment — the main complaint ──────────────────────────── */
/*
 * Adsterra social bar (160×300) and similar iframes/scripts can make
 * the page wider than the viewport on mobile, causing horizontal scroll.
 *
 * Strategy:
 *  a) Hard-cap every .fs-embed-ad to the viewport width
 *  b) Center it
 *  c) The social bar iframe itself: override width/height via CSS so
 *     it NEVER exceeds the container — the ad still displays but scales
 *  d) Wrap the body in overflow-x:hidden (rule 1 above) as the backstop
 */
.fs-embed-ad {
	max-width: 100vw;
	box-sizing: border-box;
	overflow: hidden;        /* clip any iframe that tries to exceed this */
}

/* On the MAIN site (non-embed pages) the social ad div wraps the iframe —
   constrain it so it doesn't cause a horizontal scrollbar on mobile */
@media (max-width: 480px) {
	.fs-embed-ad--social {
		/* Center the banner; if it's wider than viewport, clip, don't scroll */
		display: flex;
		justify-content: center;
		overflow: hidden;
		max-width: 100vw;
	}
	/* The Adsterra iframe writes its own width inline — override */
	.fs-embed-ad--social iframe,
	.fs-embed-ad--social ins,
	.fs-embed-ad--social > * {
		max-width: 100% !important;
		height: auto !important;
	}
}

/* Pop/onclick ad container is invisible — keep it that way and zero-size */
.fs-embed-ad--pop,
.fs-embed-ad--pop-1,
.fs-embed-ad--pop-2 {
	position: absolute !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	pointer-events: none;    /* don't trap taps */
	opacity: 0;
}

/* ── 10. Search panel: full-width input on mobile ────────────────────── */
@media (max-width: 600px) {
	.fs-search-panel__inner {
		padding: 0 14px;
	}
	#fs-search-input {
		font-size: 16px; /* prevents iOS zoom-on-focus */
		padding: 12px 14px;
	}
}

/* ── 11. Misc: tap target minimum sizes ──────────────────────────────── */
@media (max-width: 780px) {
	/* All icon buttons: at least 44×44 per WCAG 2.5.5 */
	.fs-icon-btn {
		min-width: 44px;
		min-height: 44px;
	}
	/* Card play overlay: disable on mobile — no hover state exists */
	.fs-card__play {
		display: none;
	}
	/* HUD corner brackets: disable on mobile (hover doesn't exist) */
	.fs-card__poster::before,
	.fs-card__poster::after {
		display: none;
	}
	/* Badges: don't let long IMDb IDs wrap weirdly */
	.fs-badge {
		white-space: nowrap;
		font-size: 11.5px;
	}
}

/* ── 12. Prevent the WP admin bar from hiding behind sticky header ───── */
@media (max-width: 782px) {
	/* WP sets html margin-top for its admin bar — let our sticky header
	   account for it so it doesn't overlap content */
	.admin-bar .fs-header {
		top: 46px; /* WP mobile admin bar height */
	}
}
