/* ==========================================================================
   fmovie — LAYOUT STYLES
   ==========================================================================
   Ten arrangements each for the home page, the movie listing and the TV listing,
   and ten header treatments. Chosen in Fmovies → Layouts.

   TWO CLASSES ON <body> DO ALL OF IT
   ----------------------------------
       fm-layout-home--magazine    the arrangement
       fm-header--centered         the header

   Nothing in the templates branches on the choice, so a layout cannot break a loop,
   change a query, or alter what a page contains — it only moves and sizes what the
   page already prints.

   HOW EACH GROUP IS WRITTEN
   -------------------------
   The card grid in this theme is driven by one custom property:

       .filmlist { grid-template-columns: repeat(auto-fill, minmax(var(--fm-card), 1fr)) }

   so most arrangements are a `--fm-card` value and a gap rather than a new grid. That
   is why thirty of these fit in one file without thirty copies of a layout engine,
   and why a style cannot produce a broken row.

   A NOTE ON `--fm-card`
   --------------------
   premium.css sizes the grid without a sidebar through

       .aside-wrapper.no-sidebar .movies.items,
       .aside-wrapper.no-sidebar .filmlist { --fm-card: 152px }

   The first of those is FOUR classes deep, and the listing elements carry both
   `.movies` and `.items`, so it matched every grid on the site. Chasing it with more
   classes turned into a specificity arms race — scoping through `.aside-wrapper` raised
   the arrangement to three classes and the rule still won at four, and every style
   rendered at the same card width with only the header changing.

   `--fm-card` is a layout token and nothing else reads it, so the arrangements declare
   it `!important` and stop competing. The alternative was a selector per arrangement
   long enough to be unreadable, to win a fight nobody benefits from winning.

   Header variants are all built from the same markup — height, edge, background,
   alignment and decoration. Reordering the DOM per style was rejected: the header
   carries the menu, the search and the account link, and rearranging them in CSS
   would eventually leave one of them unreachable on a phone.
   ========================================================================== */

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

/* Flush with the page edge, no radius — the base every variant starts from. */
body[class*="fm-header--"] #masthead {
	border-radius: 0 !important;
}

/* 1. Classic Bar — the theme's own arrangement, tightened. */
body.fm-header--classic #masthead .wrapper {
	min-height: 74px;
}

/* --------------------------------------------------------------------------
   2. Centered Mark — the logo centred, a hairline beneath
   -------------------------------------------------------------------------- */
body.fm-header--centered #masthead {
	background: rgba( 5, 5, 5, 0.94 );
	border-bottom: 1px solid var(--fm-border-soft);
}

body.fm-header--centered #masthead .wrapper {
	min-height: 84px;
	position: relative;
	justify-content: space-between !important;
}

body.fm-header--centered #masthead .start {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate( -50%, -50% );
	z-index: 2;
}

/* The menu toggle moves clear of the centred mark. */
body.fm-header--centered #masthead .start .fm-submenu-toggle,
body.fm-header--centered #masthead .start > .nav-toggle {
	position: absolute;
	left: -46vw;
	top: 50%;
	transform: translateY( -50% );
}

body.fm-header--centered #masthead #menu {
	position: absolute;
	left: -34vw;
	top: 50%;
	transform: translateY( -50% );
}

body.fm-header--centered #masthead #menu > ul { gap: 1.1rem; }

/* --------------------------------------------------------------------------
   3. Split — navigation left, mark centre, tools right; taller bar
   -------------------------------------------------------------------------- */
body.fm-header--split #masthead {
	background: #080808;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
}

body.fm-header--split #masthead .wrapper { min-height: 96px; }

body.fm-header--split #masthead .start { flex: 1 1 0; }

body.fm-header--split #masthead .end { flex: 1 1 0; justify-content: flex-end; }

body.fm-header--split #masthead .wrapper > form,
body.fm-header--split #masthead .wrapper > .search-wrap {
	order: 3;
}

body.fm-header--split #masthead .start > .site-branding,
body.fm-header--split #masthead .start > a.custom-logo-link {
	position: absolute;
	left: 50%;
	transform: translateX( -50% );
}

/* --------------------------------------------------------------------------
   4. Overlay — sits on the hero, no edge of its own
   -------------------------------------------------------------------------- */
body.fm-header--overlay #masthead {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 1030;
	background: linear-gradient( 180deg, rgba( 3, 3, 3, 0.86 ) 0%, rgba( 3, 3, 3, 0.25 ) 62%, transparent 100% );
	border: 0;
	box-shadow: none;
}

body.fm-header--overlay #masthead .wrapper { min-height: 92px; }

/* Whatever follows the header has to clear it, since it no longer occupies space. */
body.fm-header--overlay main { padding-top: 0; }
body.fm-header--overlay #featured { margin-top: 0; }

/* --------------------------------------------------------------------------
   5. Floating Pill — a rounded bar held clear of the edges
   -------------------------------------------------------------------------- */
body.fm-header--pill #masthead {
	position: sticky;
	top: 10px;
	margin: 10px 14px;
	border-radius: var(--fm-r-pill );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	background: rgba( 10, 10, 10, 0.86 );
	-webkit-backdrop-filter: blur( 14px ) saturate( 140% );
	backdrop-filter: blur( 14px ) saturate( 140% );
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.45 );
}

body.fm-header--pill #masthead .wrapper { min-height: 64px; padding-inline: 1rem; }

body.fm-header--pill #masthead .container { max-width: 100%; }

/* --------------------------------------------------------------------------
   6. Hairline — flush, short, with a single accent rule underneath
   -------------------------------------------------------------------------- */
body.fm-header--rule #masthead {
	background: #050505;
	border: 0;
	box-shadow: inset 0 -2px 0 var(--fm-accent );
}

body.fm-header--rule #masthead .wrapper { min-height: 68px; }

body.fm-header--rule #masthead .start > .site-branding img,
body.fm-header--rule #masthead .custom-logo { max-height: 34px; }

/* --------------------------------------------------------------------------
   7. Stacked — branding and tools on one row, navigation on the next
   -------------------------------------------------------------------------- */
body.fm-header--stacked #masthead {
	background: #070707;
	border-bottom: 1px solid var(--fm-border-soft);
}

body.fm-header--stacked #masthead .wrapper {
	flex-wrap: wrap;
	min-height: 0;
	padding-top: 0.7rem;
	padding-bottom: 0.5rem;
	row-gap: 0.45rem;
}

body.fm-header--stacked #masthead .start { flex: 1 1 auto; }

body.fm-header--stacked #masthead #menu {
	order: 5;
	flex: 1 0 100%;
	padding-top: 0.4rem;
	border-top: 1px solid rgba( 255, 255, 255, 0.06 );
}

body.fm-header--stacked #masthead #menu > ul { gap: 1.4rem; }

body.fm-header--stacked #masthead #menu > ul > li > a {
	font-size: 0.76rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   8. Compact — a short bar, small mark, icons only
   -------------------------------------------------------------------------- */
body.fm-header--compact #masthead {
	background: #0a0a0a;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.05 );
}

body.fm-header--compact #masthead .wrapper { min-height: 56px; }

body.fm-header--compact #masthead .custom-logo,
body.fm-header--compact #masthead .site-branding img { max-height: 26px; }

body.fm-header--compact #masthead #menu > ul > li > a {
	font-size: 0.74rem;
	padding-block: 0.25rem;
}

/* --------------------------------------------------------------------------
   9. Boxed — the bar is a bordered box inset from the page
   -------------------------------------------------------------------------- */
body.fm-header--boxed #masthead {
	margin: 14px;
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	border-radius: var(--fm-r-lg );
	background: #0b0b0b;
	box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.05 );
}

body.fm-header--boxed #masthead .container { max-width: 100%; }

body.fm-header--boxed #masthead .wrapper { min-height: 70px; padding-inline: 1rem; }

/* A second, inset rule — the detail that makes a boxed bar read as deliberate. */
body.fm-header--boxed #masthead .wrapper::after {
	content: "";
	position: absolute;
	inset: 5px;
	border-radius: calc( var(--fm-r-lg ) - 4px );
	border: 1px solid rgba( 255, 255, 255, 0.05 );
	pointer-events: none;
}

body.fm-header--boxed #masthead .wrapper { position: relative; }

/* --------------------------------------------------------------------------
   10. Fade — no edge, the bar dissolves into the page
   -------------------------------------------------------------------------- */
body.fm-header--fade #masthead {
	background: linear-gradient( 180deg, #0a0a0a 0%, rgba( 10, 10, 10, 0.72 ) 48%, transparent 100% );
	border: 0;
	box-shadow: none;
	-webkit-mask-image: linear-gradient( 180deg, #000 60%, transparent 100% );
	mask-image: linear-gradient( 180deg, #000 60%, transparent 100% );
}

body.fm-header--fade #masthead .wrapper { min-height: 96px; align-items: flex-start !important; padding-top: 0.6rem; }

/* --------------------------------------------------------------------------
   HOME — ten arrangements
   -------------------------------------------------------------------------- */

/* 1. Rails — the original: slider, then horizontal rows. */
body.fm-layout-home--rails .aside-wrapper .filmlist { --fm-card: 150px !important; }

/* 2. Grid First — the grid leads, the hero moves underneath it. */
body.fm-layout-home--grid-first main {
	display: flex;
	flex-direction: column;
}

body.fm-layout-home--grid-first main > .container { order: 1; }
body.fm-layout-home--grid-first main > #featured { order: 2; margin-top: var(--fm-gap-lg ); }
body.fm-layout-home--grid-first .aside-wrapper .filmlist { --fm-card: 156px !important; }

/* 3. Sidebar Left — the column moves to the left of the content. */
body.fm-layout-home--sidebar-left .aside-wrapper { direction: rtl; }
body.fm-layout-home--sidebar-left .aside-wrapper > * { direction: ltr; }
body.fm-layout-home--sidebar-left .aside-wrapper > .main { order: 2; }
body.fm-layout-home--sidebar-left .aside-wrapper > .sidebar { order: 1; }
body.fm-layout-home--sidebar-left .aside-wrapper .filmlist { --fm-card: 142px !important; }

/* 4. Magazine — two unequal columns of dense type. */
body.fm-layout-home--magazine .aside-wrapper {
	grid-template-columns: minmax( 0, 1fr ) 320px;
}

body.fm-layout-home--magazine .aside-wrapper .filmlist {
	--fm-card: 132px !important;
	column-gap: calc( var(--fm-gap ) * 0.7 );
}

body.fm-layout-home--magazine .head .title { font-size: 1.35rem; letter-spacing: -0.02em; }

body.fm-layout-home--magazine .aside-wrapper > .main > section + section { margin-top: calc( var(--fm-gap-lg ) * 0.7 ); }

/* 5. List — single column, wide artwork. */
body.fm-layout-home--list .aside-wrapper .filmlist {
	grid-template-columns: 1fr;
	--fm-card: 100% !important;
	gap: 0.75rem;
}

body.fm-layout-home--list .aside-wrapper .filmlist .item {
	display: grid;
	grid-template-columns: 88px minmax( 0, 1fr );
	align-items: center;
	gap: 1rem;
	padding: 0.6rem;
	border-radius: var(--fm-r );
	background: var(--fm-surface-1 );
}

body.fm-layout-home--list .aside-wrapper .filmlist .item .poster,
body.fm-layout-home--list .aside-wrapper .filmlist .item .image { aspect-ratio: 2 / 3; }

/* 6. Full Width — no side column, the grid runs to the edges. */
body.fm-layout-home--full .aside-wrapper { grid-template-columns: 1fr; }
body.fm-layout-home--full .aside-wrapper > .sidebar { display: none; }
body.fm-layout-home--full .container { max-width: 100%; padding-inline: 1.5rem; }
body.fm-layout-home--full .aside-wrapper .filmlist { --fm-card: 168px !important; }

/* 7. Masonry — columns of differing heights, no shared baseline. */
body.fm-layout-home--masonry .aside-wrapper .filmlist {
	grid-auto-rows: 10px;
	align-items: start;
	--fm-card: 146px !important;
}

body.fm-layout-home--masonry .aside-wrapper .filmlist .item { height: auto; }
body.fm-layout-home--masonry .aside-wrapper .filmlist .item:nth-child( 3n ) .poster,
body.fm-layout-home--masonry .aside-wrapper .filmlist .item:nth-child( 3n ) .image { aspect-ratio: 3 / 4; }
body.fm-layout-home--masonry .aside-wrapper .filmlist .item:nth-child( 4n ) .poster,
body.fm-layout-home--masonry .aside-wrapper .filmlist .item:nth-child( 4n ) .image { aspect-ratio: 2 / 3; }

/* 8. Spotlight — the first title takes the full width. */
body.fm-layout-home--spotlight .aside-wrapper .filmlist { --fm-card: 148px !important; }

body.fm-layout-home--spotlight .aside-wrapper .filmlist .item:first-child {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 260px minmax( 0, 1fr );
	gap: 1.5rem;
	align-items: center;
	padding: 1rem;
	border-radius: var(--fm-r-lg );
	background: linear-gradient( 120deg, var(--fm-surface-2 ), var(--fm-surface-1 ) );
}

body.fm-layout-home--spotlight .aside-wrapper .filmlist .item:first-child .poster,
body.fm-layout-home--spotlight .aside-wrapper .filmlist .item:first-child .image { aspect-ratio: 16 / 9; }

/* 9. Dense — smaller posters, more per row, less air. */
body.fm-layout-home--dense .aside-wrapper .filmlist { --fm-card: 118px !important; gap: calc( var(--fm-gap ) * 0.6 ); }
body.fm-layout-home--dense .aside-wrapper .filmlist .item .title,
body.fm-layout-home--dense .aside-wrapper .filmlist .item .entry-title { font-size: 0.8rem; }
body.fm-layout-home--dense .aside-wrapper > .main > section + section { margin-top: calc( var(--fm-gap-lg ) * 0.6 ); }

/* 10. Panels — each section boxed with a visible edge. */
body.fm-layout-home--panels .aside-wrapper > .main > section {
	padding: 1rem 1.1rem 1.2rem;
	border: 1px solid var(--fm-border-soft );
	border-radius: var(--fm-r-lg );
	background: var(--fm-surface-1 );
}

body.fm-layout-home--panels .aside-wrapper .filmlist { --fm-card: 144px !important; }
body.fm-layout-home--panels .aside-wrapper > .main { gap: var(--fm-gap-lg ); display: flex; flex-direction: column; }

/* --------------------------------------------------------------------------
   MOVIES — ten arrangements
   -------------------------------------------------------------------------- */

/* 1. Classic Grid */
body.fm-layout-movie--classic .aside-wrapper .filmlist { --fm-card: 150px !important; }

/* 2. Dense Grid */
body.fm-layout-movie--dense .aside-wrapper .filmlist { --fm-card: 112px !important; gap: calc( var(--fm-gap ) * 0.55 ); }
body.fm-layout-movie--dense .aside-wrapper .filmlist .item .title,
body.fm-layout-movie--dense .aside-wrapper .filmlist .item .entry-title { font-size: 0.78rem; }

/* 3. Roomy Grid */
body.fm-layout-movie--roomy .aside-wrapper .filmlist { --fm-card: 210px !important; gap: calc( var(--fm-gap ) * 1.5 ); }

/* 4. Rows — poster beside the title */
body.fm-layout-movie--rows .aside-wrapper .filmlist { grid-template-columns: 1fr; gap: 0.7rem; --fm-card: 100% !important; }

body.fm-layout-movie--rows .aside-wrapper .filmlist .item {
	display: grid;
	grid-template-columns: 92px minmax( 0, 1fr );
	gap: 1rem;
	align-items: center;
	padding: 0.65rem;
	border-radius: var(--fm-r );
	background: var(--fm-surface-1 );
}

/* 5. Split — the column moves left */
body.fm-layout-movie--split .aside-wrapper > .main { order: 2; }
body.fm-layout-movie--split .aside-wrapper > .sidebar { order: 1; }
body.fm-layout-movie--split .aside-wrapper .filmlist { --fm-card: 138px !important; }

/* 6. Masonry */
body.fm-layout-movie--masonry .aside-wrapper .filmlist { --fm-card: 142px !important; align-items: start; }

body.fm-layout-movie--masonry .aside-wrapper .filmlist .item:nth-child( 4n + 2 ) .poster,
body.fm-layout-movie--masonry .aside-wrapper .filmlist .item:nth-child( 4n + 2 ) .image { aspect-ratio: 3 / 4; }

body.fm-layout-movie--masonry .aside-wrapper .filmlist .item:nth-child( 5n ) .poster,
body.fm-layout-movie--masonry .aside-wrapper .filmlist .item:nth-child( 5n ) .image { aspect-ratio: 4 / 5; }

/* 7. Leader — the first title spans the row */
body.fm-layout-movie--leader .aside-wrapper .filmlist { --fm-card: 146px !important; }

body.fm-layout-movie--leader .aside-wrapper .filmlist .item:first-child {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 240px minmax( 0, 1fr );
	gap: 1.4rem;
	align-items: center;
	padding: 1rem;
	border-radius: var(--fm-r-lg );
	background: linear-gradient( 120deg, var(--fm-surface-2 ), var(--fm-surface-1 ) );
}

/* 8. Bare — artwork only */
body.fm-layout-movie--bare .aside-wrapper .filmlist { --fm-card: 156px !important; gap: calc( var(--fm-gap ) * 0.8 ); }

body.fm-layout-movie--bare .aside-wrapper .filmlist .item {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
}

body.fm-layout-movie--bare .aside-wrapper .filmlist .item .meta,
body.fm-layout-movie--bare .aside-wrapper .filmlist .item .quality,
body.fm-layout-movie--bare .aside-wrapper .filmlist .item .rating { display: none; }

/* 9. Index — a dense list with the metadata in columns */
body.fm-layout-movie--index .aside-wrapper .filmlist { grid-template-columns: 1fr; gap: 0; --fm-card: 100% !important; }

body.fm-layout-movie--index .aside-wrapper .filmlist .item {
	display: grid;
	grid-template-columns: 54px minmax( 0, 1fr ) auto;
	gap: 0.9rem;
	align-items: center;
	padding: 0.5rem 0.6rem;
	border-radius: 0;
	border-bottom: 1px solid var(--fm-border-soft );
	background: none;
}

body.fm-layout-movie--index .aside-wrapper .filmlist .item .poster,
body.fm-layout-movie--index .aside-wrapper .filmlist .item .image { aspect-ratio: 2 / 3; width: 54px; }

/* 10. Feature — a wide lead card above a normal grid */
body.fm-layout-movie--feature .aside-wrapper .filmlist { --fm-card: 148px !important; }

body.fm-layout-movie--feature .aside-wrapper .filmlist .item:first-child {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) 300px;
	gap: 1.5rem;
	align-items: center;
	padding: 1.2rem;
	border-radius: var(--fm-r-lg );
	background: linear-gradient( 120deg, var(--fm-surface-2 ), var(--fm-surface-1 ) );
}

body.fm-layout-movie--feature .aside-wrapper .filmlist .item:first-child .poster,
body.fm-layout-movie--feature .aside-wrapper .filmlist .item:first-child .image { aspect-ratio: 16 / 9; }

/* --------------------------------------------------------------------------
   TV — ten arrangements
   -------------------------------------------------------------------------- */

/* 1. Shelves — wide cards, landscape artwork */
body.fm-layout-tv--shelves .aside-wrapper .filmlist { --fm-card: 240px !important; gap: var(--fm-gap-lg ); }

body.fm-layout-tv--shelves .aside-wrapper .filmlist .item .poster,
body.fm-layout-tv--shelves .aside-wrapper .filmlist .item .image { aspect-ratio: 16 / 9; }

/* 2. Posters — standard portrait grid, four per row */
body.fm-layout-tv--posters .aside-wrapper .filmlist { --fm-card: 190px !important; }

/* 3. Wide — two per row, landscape */
body.fm-layout-tv--wide .aside-wrapper .filmlist {
	grid-template-columns: repeat(auto-fill, minmax( 320px, 1fr ) );
	gap: var(--fm-gap-lg );
	--fm-card: 320px !important;
}

body.fm-layout-tv--wide .aside-wrapper .filmlist .item .poster,
body.fm-layout-tv--wide .aside-wrapper .filmlist .item .image { aspect-ratio: 16 / 9; }

body.fm-layout-tv--wide .aside-wrapper .filmlist .item .title,
body.fm-layout-tv--wide .aside-wrapper .filmlist .item .entry-title { font-size: 1.05rem; }

/* 4. Episode List — each row reads like an episode entry */
body.fm-layout-tv--episodes .aside-wrapper .filmlist { grid-template-columns: 1fr; gap: 0.55rem; --fm-card: 100% !important; }

body.fm-layout-tv--episodes .aside-wrapper .filmlist .item {
	display: grid;
	grid-template-columns: 150px minmax( 0, 1fr );
	gap: 1rem;
	align-items: center;
	padding: 0.7rem;
	border-radius: var(--fm-r );
	background: var(--fm-surface-1 );
}

body.fm-layout-tv--episodes .aside-wrapper .filmlist .item .poster,
body.fm-layout-tv--episodes .aside-wrapper .filmlist .item .image { aspect-ratio: 16 / 9; }

/* 5. Seasons — tall cards with room for a badge */
body.fm-layout-tv--seasons .aside-wrapper .filmlist { --fm-card: 164px !important; }

body.fm-layout-tv--seasons .aside-wrapper .filmlist .item .poster,
body.fm-layout-tv--seasons .aside-wrapper .filmlist .item .image { aspect-ratio: 27 / 40; }

body.fm-layout-tv--seasons .aside-wrapper .filmlist .item .meta { min-height: 1.6rem; }

/* 6. Reel — short horizontal strips */
body.fm-layout-tv--reel .aside-wrapper .filmlist {
	grid-auto-flow: column;
	grid-auto-columns: 210px;
	grid-template-columns: none;
	overflow-x: auto;
	padding-bottom: 0.6rem;
	scroll-snap-type: x mandatory;
}

body.fm-layout-tv--reel .aside-wrapper .filmlist .item { scroll-snap-align: start; }

/* 7. Guide — compact columns, title first */
body.fm-layout-tv--guide .aside-wrapper .filmlist { --fm-card: 132px !important; gap: calc( var(--fm-gap ) * 0.6 ); }

body.fm-layout-tv--guide .aside-wrapper .filmlist .item .poster,
body.fm-layout-tv--guide .aside-wrapper .filmlist .item .image { aspect-ratio: 1 / 1; }

body.fm-layout-tv--guide .aside-wrapper .filmlist .item .title,
body.fm-layout-tv--guide .aside-wrapper .filmlist .item .entry-title { font-size: 0.78rem; order: -1; }

/* 8. Frame — each card inside a visible frame */
body.fm-layout-tv--frame .aside-wrapper .filmlist { --fm-card: 176px !important; }

body.fm-layout-tv--frame .aside-wrapper .filmlist .item {
	padding: 0.5rem;
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: var(--fm-r );
	background: rgba( 255, 255, 255, 0.02 );
}

/* 9. Banner — a lead banner across the top */
body.fm-layout-tv--banner .aside-wrapper .filmlist { --fm-card: 186px !important; }

body.fm-layout-tv--banner .aside-wrapper .filmlist .item:first-child {
	grid-column: 1 / -1;
	padding: 1.2rem;
	border-radius: var(--fm-r-lg );
	background: linear-gradient( 120deg, rgba( 0, 240, 181, 0.12 ), var(--fm-surface-1 ) 60% );
	border: 1px solid rgba( 0, 240, 181, 0.22 );
}

body.fm-layout-tv--banner .aside-wrapper .filmlist .item:first-child .poster,
body.fm-layout-tv--banner .aside-wrapper .filmlist .item:first-child .image { aspect-ratio: 21 / 9; }

/* 10. Compact — small portrait cards, six per row */
body.fm-layout-tv--compact .aside-wrapper .filmlist { --fm-card: 124px !important; gap: calc( var(--fm-gap ) * 0.65 ); }

body.fm-layout-tv--compact .aside-wrapper .filmlist .item .title,
body.fm-layout-tv--compact .aside-wrapper .filmlist .item .entry-title { font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   Phones
   --------------------------------------------------------------------------
   The horizontal header variants collapse: a centred mark over a menu, and a pill
   that stops floating, because a rounded bar with a 14px margin wastes two rows of a
   390px screen on nothing.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	body.fm-header--centered #masthead .start,
	body.fm-header--split #masthead .start > .site-branding,
	body.fm-header--split #masthead .start > a.custom-logo-link {
		position: static;
		transform: none;
		left: auto;
	}

	body.fm-header--centered #masthead .start .fm-submenu-toggle,
	body.fm-header--centered #masthead #menu {
		position: static;
		transform: none;
		left: auto;
	}

	body.fm-header--pill #masthead,
	body.fm-header--boxed #masthead { margin: 8px; border-radius: var(--fm-r ); }

	body.fm-header--overlay #masthead { background: rgba( 5, 5, 5, 0.92 ); }

	body.fm-header--stacked #masthead #menu { border-top: 0; }

	body.fm-layout-home--magazine .aside-wrapper,
	body.fm-layout-home--full .aside-wrapper { grid-template-columns: 1fr; }

	body.fm-layout-movie--leader .aside-wrapper .filmlist .item:first-child,
	body.fm-layout-movie--feature .aside-wrapper .filmlist .item:first-child,
	body.fm-layout-home--spotlight .aside-wrapper .filmlist .item:first-child {
		grid-template-columns: 1fr;
	}

	body.fm-layout-movie--index .aside-wrapper .filmlist .item { grid-template-columns: 44px minmax( 0, 1fr ); }
	body.fm-layout-tv--episodes .aside-wrapper .filmlist .item { grid-template-columns: 110px minmax( 0, 1fr ); }
}
