:root {
	--fma-feed-bg: #ffffff;
	--fma-feed-surface: #f3f6fa;
	--fma-feed-card: #ffffff;
	--fma-feed-text: #07111f;
	--fma-feed-muted: #586779;
	--fma-feed-border: #d7e0ea;
	--fma-feed-blue: #0756b8;
	--fma-feed-blue-dark: #003b86;
	--fma-feed-gold: #d4ac0d;
	color-scheme: light;
}

html:is(.dark-mode,.dark,.dark-theme,.theme-dark,.wp-dark-mode-active,[data-theme="dark"],[data-mode="dark"]),
body:is(.dark-mode,.dark,.dark-theme,.theme-dark,.wp-dark-mode-active),
body[data-theme="dark"],body[data-mode="dark"] {
	--fma-feed-bg: #07111f;
	--fma-feed-surface: #0c1d31;
	--fma-feed-card: #0c1d31;
	--fma-feed-text: #f4f7fb;
	--fma-feed-muted: #b7c6d8;
	--fma-feed-border: #294765;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	html:not(.light-mode):not([data-theme="light"]):not([data-mode="light"]) {
		--fma-feed-bg: #07111f;
		--fma-feed-surface: #0c1d31;
		--fma-feed-card: #0c1d31;
		--fma-feed-text: #f4f7fb;
		--fma-feed-muted: #b7c6d8;
		--fma-feed-border: #294765;
		color-scheme: dark;
	}
}

html:has(body.fma-video-feed-body),
body.fma-video-feed-body {
	margin: 0 !important;
	min-height: 100%;
	background: var(--fma-feed-bg) !important;
	color: var(--fma-feed-text) !important;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.45;
	overflow-x: hidden;
}

body.fma-video-feed-body #wpadminbar,
body.fma-video-feed-body .cky-btn-revisit-wrapper,
body.fma-video-feed-body .cky-consent-container {
	display: none !important;
}

.fma-video-feed-body *,
.fma-video-feed-body *::before,
.fma-video-feed-body *::after { box-sizing: border-box; }

.fma-video-feed-topbar {
	min-height: 72px;
	padding: 9px clamp(16px, 4vw, 64px);
	background: #05080e;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-bottom: 3px solid var(--fma-feed-blue);
}

.fma-video-feed-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #fff !important;
	text-decoration: none !important;
}

.fma-video-feed-brand img,
.fma-video-feed-brand-mark {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 3px;
	background: #071d4c;
}

.fma-video-feed-brand-mark {
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 18px;
	font-weight: 900;
}

.fma-video-feed-brand-copy { display: flex; flex-direction: column; line-height: 1.12; }
.fma-video-feed-brand-copy strong { font-size: clamp(15px, 1.5vw, 22px); letter-spacing: .01em; }
.fma-video-feed-brand-copy small { margin-top: 4px; font-size: 9px; letter-spacing: .14em; }
.fma-video-feed-account { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.fma-video-feed-account a { color: #fff !important; text-decoration: none !important; font-weight: 700; }
.fma-video-feed-account a:hover,.fma-video-feed-brand:hover { color: #b9d8ff !important; }

.fma-video-feed-page {
	width: min(100% - 48px, 1420px) !important;
	max-width: 1420px !important;
	margin: 0 auto !important;
	padding: 24px 0 52px;
}

.fma-video-feed-section { margin: 0 0 34px; }
.fma-video-feed-section h1,.fma-video-feed-section h2 {
	margin: 0 0 13px;
	padding: 0 0 9px 13px;
	border-bottom: 1px solid var(--fma-feed-border);
	border-left: 5px solid var(--fma-feed-blue);
	color: var(--fma-feed-text);
	font-size: clamp(22px, 2.1vw, 30px);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -.025em;
}
.fma-video-feed-section h1 { font-size: clamp(25px, 2.4vw, 34px); }
.fma-video-feed-row { position: relative; margin: 0 0 16px; }
.fma-row-track {
	display: flex;
	align-items: stretch;
	gap: 12px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--fma-feed-blue) transparent;
	padding: 2px 2px 10px;
}
.fma-row-track::-webkit-scrollbar { height: 7px; }
.fma-row-track::-webkit-scrollbar-thumb { background: var(--fma-feed-blue); border-radius: 8px; }
.fma-row-track::-webkit-scrollbar-track { background: transparent; }

.fma-video-card {
	position: relative;
	flex: 0 0 auto;
	width: clamp(200px, 14vw, 240px);
	overflow: hidden;
	scroll-snap-align: start;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--fma-feed-text);
}
.fma-video-card.is-horizontal { width: clamp(300px, 22vw, 390px); }
.fma-video-card-media {
	position: relative;
	width: 100%;
	background: #05080e;
	overflow: hidden;
	border-radius: 12px;
}
.fma-video-card.is-vertical .fma-video-card-media { aspect-ratio: 9 / 16; }
.fma-video-card.is-horizontal .fma-video-card-media { aspect-ratio: 16 / 9; }
.fma-video-card-media video,.fma-video-card-media iframe,.fma-video-preview,.fma-video-card-fallback,.fma-video-preview img,.fma-video-card-fallback img {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}
.fma-video-card-media iframe,.fma-video-preview,.fma-video-card-fallback { position: absolute; inset: 0; }
.fma-video-preview,.fma-video-card-fallback { padding: 0; overflow: hidden; cursor: pointer; background: #07111f; }
.fma-video-preview img,.fma-video-card-fallback img { position: absolute; inset: 0; }
.fma-video-preview:not(.is-no-poster)::after,.fma-video-card-fallback:not(.is-no-poster)::after {
	content: ""; position: absolute; inset: 35% 0 0;
	background: linear-gradient(transparent,rgba(0,0,0,.52)); pointer-events: none;
}
.fma-video-preview-play,.fma-video-card-fallback > span:last-child {
	position: absolute;
	right: 10px; bottom: 10px;
	display: grid; place-items: center;
	width: 34px; height: 28px;
	border: 0; border-radius: 6px;
	background: rgba(0,0,0,.72); color: #fff;
	font-size: 14px; line-height: 1; z-index: 1;
}
.fma-video-preview-placeholder { position:absolute; inset:0; display:grid; place-content:center; text-align:center; color:#e8f1fb; font-weight:900; letter-spacing:.12em; font-size:clamp(16px,2vw,24px); line-height:1.1; background:linear-gradient(145deg,#0a1b31,#123866); }
.fma-video-preview.is-no-poster:hover,.fma-video-card-fallback.is-no-poster:hover { filter:brightness(1.15); }
.fma-video-loaded-player { display:block;position:absolute;inset:0;width:100%;height:100%;border:0;background:#000;object-fit:contain; }
.fma-video-card-copy { padding: 10px 2px 11px; }
.fma-video-card-copy h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 700; text-transform: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.7em; }
.fma-video-card-copy h3 a { color: var(--fma-feed-text) !important; text-decoration: none !important; }
.fma-video-card-copy h3 a:hover { color: var(--fma-feed-blue) !important; }
.fma-video-card-copy .fma-video-reactions { margin: 9px 0 0; }
.fma-video-reactions { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--fma-feed-text); }
.fma-video-reaction-results { display: flex; flex-wrap: wrap; gap: 5px; }
.fma-video-reaction-result,.fma-video-reaction-toggle,.fma-video-reaction-option { border: 1px solid var(--fma-feed-border); border-radius: 999px; background: var(--fma-feed-card); color: var(--fma-feed-text); cursor: pointer; }
.fma-video-reaction-result { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 15px; }
.fma-video-reaction-result small { font-size: 11px; color: var(--fma-feed-muted); }
.fma-video-reaction-result.is-selected,.fma-video-reaction-option.is-selected { border-color: var(--fma-feed-blue); box-shadow: 0 0 0 1px var(--fma-feed-blue); }
.fma-video-reaction-toggle { padding: 5px 9px; font-size: 12px; }
.fma-video-reaction-picker { position: absolute; z-index: 10; top: calc(100% + 5px); left: 0; display: grid; grid-template-columns: repeat(7, 34px); gap: 3px; max-width: min(285px,90vw); padding: 7px; border: 1px solid var(--fma-feed-border); border-radius: 11px; background: var(--fma-feed-card); box-shadow: 0 8px 28px #0004; }
.fma-video-reaction-picker[hidden] { display: none; }
.fma-video-reaction-option { width: 34px; height: 34px; font-size: 18px; }
.fma-video-reaction-login { color: var(--fma-feed-blue); font-size: 11px; }
.fma-video-card-source { display: inline-block; margin-top: 5px; color: var(--fma-feed-muted) !important; font-size: 12px; font-weight: 500; text-decoration: none !important; }
.fma-save-video {
	position: absolute;
	top: 8px; right: 8px;
	z-index: 2;
	width: 31px; height: 31px;
	display: grid; place-items: center;
	border: 1px solid rgba(255,255,255,.75);
	border-radius: 50%;
	background: rgba(0,0,0,.62);
	color: #fff !important;
	font-size: 20px; line-height: 1;
	text-decoration: none !important;
	cursor: pointer;
}
.fma-save-video.is-saved { background: var(--fma-feed-blue); border-color: #fff; color: #fff !important; }
.fma-save-video:disabled { opacity: .65; cursor: progress; }
.fma-row-arrow {
	position: absolute;
	top: 42%; z-index: 3;
	width: 36px; height: 36px;
	border: 1px solid var(--fma-feed-border);
	border-radius: 50%;
	background: var(--fma-feed-card);
	color: var(--fma-feed-text);
	font-size: 24px; line-height: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,.13);
	cursor: pointer;
}
.fma-row-arrow:hover { border-color: var(--fma-feed-blue); color: var(--fma-feed-blue); }
.fma-row-arrow.is-prev { left: -15px; }
.fma-row-arrow.is-next { right: -15px; }
.fma-video-feed-empty { padding: 30px; border-radius: 12px; background: var(--fma-feed-surface); color: var(--fma-feed-muted); }

.fma-video-lightbox[hidden] { display: none !important; }
.fma-video-lightbox {
	position: fixed; inset: 0; z-index: 999999;
	display: grid; place-items: center;
	padding: 24px;
	background: rgba(3,8,16,.78);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f4f7fb;
}
.fma-video-lightbox-shell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-height: 96vh; }
.fma-lightbox-close {
	position: fixed; top: 16px; right: 20px; z-index: 3;
	width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%;
	background: rgba(4,10,18,.75); color: #fff; font-size: 32px; line-height: 1; cursor: pointer;
}
.fma-lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; }
.fma-lightbox-player { position: relative; overflow: hidden; border-radius: 10px; background: #000; box-shadow: 0 18px 80px rgba(0,0,0,.6); }
.fma-lightbox-player.is-horizontal { width: min(86vw,1280px,142vh); aspect-ratio: 16/9; }
.fma-lightbox-player.is-vertical { width: min(84vw,44vh,480px); aspect-ratio: 9/16; }
.fma-lightbox-player iframe,.fma-lightbox-player video { position:absolute; inset:0; display:block; width:100%; height:100%; border:0; background:#000; object-fit:contain; }
.fma-lightbox-nav {
	position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
	width: 48px; height: 60px; display:grid; place-items:center;
	border:1px solid rgba(255,255,255,.65); border-radius:12px;
	background:rgba(5,12,22,.72); color:#fff; font-size:42px; line-height:1; cursor:pointer;
	transition:background .16s ease,transform .16s ease;
}
.fma-lightbox-nav:hover { background:var(--fma-feed-blue); transform:translateY(-50%) scale(1.04); }
.fma-lightbox-nav:disabled { opacity:.3; cursor:not-allowed; }
.fma-lightbox-nav.is-previous { left:max(12px,calc((100% - min(86vw,1280px,142vh))/2 - 64px)); }
.fma-lightbox-nav.is-next { right:max(12px,calc((100% - min(86vw,1280px,142vh))/2 - 64px)); }
.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-nav.is-previous { left:max(8px,calc((100% - min(84vw,44vh,480px))/2 - 64px)); }
.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-nav.is-next { right:max(8px,calc((100% - min(84vw,44vh,480px))/2 - 64px)); }
.fma-lightbox-copy { width:min(86vw,1280px,142vh); color:#fff; text-align:left; }
.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-copy { width:min(84vw,44vh,480px); }
.fma-lightbox-copy h2 { margin:0; font-size:clamp(17px,2vw,24px); line-height:1.25; }
.fma-lightbox-copy p { margin:5px 0 0; color:rgba(255,255,255,.8); font-size:14px; }
.fma-lightbox-reactions .fma-video-reaction-result,.fma-lightbox-reactions .fma-video-reaction-toggle,.fma-lightbox-reactions .fma-video-reaction-option { background:rgba(7,17,31,.88); color:#fff; border-color:rgba(255,255,255,.26); }
.fma-lightbox-reactions .fma-video-reaction-result small { color:rgba(255,255,255,.72); }
.fma-lightbox-reactions .fma-video-reaction-picker { background:#0c1d31; }
.fma-lightbox-copy span { display:block; margin-top:6px; color:rgba(255,255,255,.56); font-size:11px; }
html.fma-video-feed-lightbox-locked,
html.fma-video-feed-lightbox-locked body.fma-video-feed-body {
	overflow: hidden !important;
	overscroll-behavior: none !important;
}

@media (max-width: 680px) {
	.fma-video-feed-topbar { min-height: 62px; padding: 7px 12px; gap: 8px; }
	.fma-video-feed-brand { gap: 8px; }
	.fma-video-feed-brand img,.fma-video-feed-brand-mark { width: 40px; height: 40px; }
	.fma-video-feed-brand-copy strong { font-size: 14px; }
	.fma-video-feed-brand-copy small { font-size: 7px; letter-spacing: .1em; }
	.fma-video-feed-account { gap: 12px; font-size: 12px; }
	.fma-video-feed-page { width: calc(100% - 22px) !important; max-width: none !important; padding-top: 18px; }
	.fma-video-feed-section { margin-bottom: 25px; }
	.fma-video-feed-section h1,.fma-video-feed-section h2 { margin-bottom: 10px; font-size: 22px; }
	.fma-video-card { width: min(62vw,220px); max-width:none; }
	.fma-video-card.is-horizontal { width: min(82vw,390px); max-width:none; }
	.fma-video-card-copy { padding: 8px; }
	.fma-video-card-copy { padding: 8px 2px; }
	.fma-video-card-copy h3 { font-size: 14px; }
	.fma-row-arrow { display: none; }
	.fma-video-lightbox { padding: 12px; }
	.fma-video-lightbox-shell { gap:10px; }
	.fma-lightbox-close { top:8px; right:8px; width:40px; height:40px; font-size:28px; }
	.fma-lightbox-player.is-horizontal { width:min(94vw,160vh); }
	.fma-lightbox-player.is-vertical { width:min(78vw,44vh,420px); }
	.fma-lightbox-nav { width:38px; height:50px; font-size:34px; }
	.fma-lightbox-nav.is-previous { left:2px !important; }
	.fma-lightbox-nav.is-next { right:2px !important; }
	.fma-lightbox-copy { width:min(94vw,160vh); }
	.fma-lightbox-copy h2 { font-size:16px; }
	.fma-lightbox-copy p { font-size:12px; }
	.fma-lightbox-copy span { display:none; }
}

@media (prefers-reduced-motion: reduce) { .fma-video-feed-body * { scroll-behavior: auto !important; } }

/* Video actions and the comments drawer in the player. */
.fma-video-action-buttons { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.fma-video-like,.fma-video-share,.fma-video-comments-trigger { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid var(--fma-feed-border); border-radius:999px; background:var(--fma-feed-card); color:var(--fma-feed-text); font-size:12px; cursor:pointer; }
.fma-video-like.is-liked { border-color:var(--fma-feed-blue); color:var(--fma-feed-blue); }
.fma-video-like small,.fma-video-comments-trigger small { color:var(--fma-feed-muted); font-size:11px; }
.fma-video-like:disabled { opacity:.55; cursor:default; }
.fma-video-action-buttons .fma-save-video { position:static; width:auto; height:auto; display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid var(--fma-feed-border); border-radius:999px; background:var(--fma-feed-card); color:var(--fma-feed-text) !important; font-size:12px; text-decoration:none !important; }
.fma-video-action-buttons .fma-save-video.is-saved { border-color:var(--fma-feed-blue); background:var(--fma-feed-card); color:var(--fma-feed-blue) !important; }
.fma-video-lightbox-shell { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; align-items:center; gap:12px; width:min(96vw,1600px); height:min(94vh,1000px); max-height:96vh; }
.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr) minmax(290px,350px); }
.fma-lightbox-stage { grid-column:1; grid-row:1; }
.fma-lightbox-player.is-horizontal { width:min(100%,1280px,142vh); }
.fma-lightbox-player.is-vertical { width:min(100%,44vh,480px); }
.fma-lightbox-copy,.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-copy { grid-column:1; grid-row:2; align-self:start; width:100%; }
.fma-lightbox-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:8px 0; }
.fma-video-lightbox .fma-video-reaction-results { display:none; }
.fma-video-lightbox .fma-video-reaction-picker { top:auto; bottom:calc(100% + 5px); }
.fma-video-lightbox .fma-video-like,.fma-video-lightbox .fma-video-reaction-toggle,.fma-video-lightbox .fma-video-share,.fma-video-lightbox .fma-video-comments-trigger,.fma-video-lightbox .fma-save-video { position:static; display:inline-flex; align-items:center; gap:5px; width:auto; height:auto; border:1px solid rgba(255,255,255,.26); border-radius:999px; padding:7px 10px; background:rgba(7,17,31,.9); color:#fff; font-size:13px; cursor:pointer; }
.fma-lightbox-comments { grid-column:2; grid-row:1/3; display:flex; flex-direction:column; min-width:0; max-height:100%; overflow:hidden; border:1px solid rgba(255,255,255,.17); border-radius:12px; background:#081523; color:#fff; }
.fma-lightbox-comments[hidden] { display:none !important; }
.fma-lightbox-comments header { display:flex; align-items:center; justify-content:space-between; padding:13px 14px; border-bottom:1px solid rgba(255,255,255,.16); }
.fma-lightbox-comments header strong { font-size:16px; }
.fma-lightbox-comments-close { width:32px; height:32px; border:0; border-radius:50%; background:transparent; color:#fff; font-size:22px; cursor:pointer; }
.fma-lightbox-comments-list { flex:1; min-height:100px; overflow:auto; overscroll-behavior:contain; padding:8px 14px; }
.fma-video-comment { padding:10px 0; border-bottom:1px solid rgba(255,255,255,.1); }
.fma-video-comment strong { font-size:13px; }
.fma-video-comment time { margin-left:8px; color:rgba(255,255,255,.55); font-size:11px; }
.fma-video-comment p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:rgba(255,255,255,.9); font-size:13px; }
.fma-comments-empty { color:rgba(255,255,255,.68); font-size:13px; }
.fma-lightbox-comment-form { padding:10px 14px 12px; border-top:1px solid rgba(255,255,255,.16); }
.fma-lightbox-comment-form label { display:block; margin-bottom:5px; font-size:12px; font-weight:700; }
.fma-lightbox-comment-form textarea { width:100%; min-height:70px; resize:vertical; border:1px solid #37516e; border-radius:8px; padding:8px; background:#0c1d31; color:#fff; font:inherit; font-size:13px; }
.fma-lightbox-comment-form-meta { display:flex; align-items:center; justify-content:space-between; margin-top:6px; color:rgba(255,255,255,.6); font-size:11px; }
.fma-lightbox-comment-form-meta button { border:0; border-radius:7px; padding:7px 12px; background:var(--fma-feed-blue); color:#fff; font-weight:700; cursor:pointer; }
.fma-lightbox-comment-form-meta button:disabled { opacity:.5; }
.fma-lightbox-comment-status,.fma-lightbox-comment-login { margin:6px 0 0; color:#c8dcf5; font-size:12px; }
.fma-lightbox-comment-login { padding:10px 14px; }
.fma-lightbox-comment-login a { color:#9dc9ff; }
@media(max-width:850px) {
	.fma-video-lightbox-shell,.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto minmax(0,34vh); gap:10px; height:94vh; }
	.fma-lightbox-copy,.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-copy { width:100%; }
	.fma-lightbox-comments { grid-column:1; grid-row:3; min-height:0; }
}

/* Reels-like floating player: only the four unlabeled controls sit beside the video. */
.fma-video-lightbox-shell { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; }
.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr) minmax(280px,320px); }
.fma-lightbox-stage { display:flex; align-items:center; justify-content:center; gap:10px; min-width:0; }
.fma-lightbox-player.is-horizontal { width:min(calc(100% - 58px),1280px,142vh); flex:0 1 auto; }
.fma-lightbox-player.is-vertical { width:min(44vh,480px); flex:0 1 auto; }
.fma-lightbox-action-rail { display:flex; flex:0 0 48px; flex-direction:column; align-items:center; justify-content:flex-end; gap:22px; padding:8px 0 34px; color:#fff; }
.fma-lightbox-action-rail button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-width:44px; min-height:46px; padding:0; border:0; outline:0; background:transparent; color:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.fma-lightbox-action-rail button:hover { transform:scale(1.08); }
.fma-lightbox-action-rail button:focus-visible { outline:2px solid #fff; outline-offset:3px; border-radius:50%; }
.fma-lightbox-action-rail button:disabled { opacity:.55; cursor:progress; }
.fma-lightbox-action-rail svg { display:block; width:30px; height:30px; overflow:visible; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.fma-lightbox-action-rail button.is-liked svg { fill:#ff2d55; stroke:#ff2d55; }
.fma-lightbox-action-rail button.is-saved svg { fill:#fff; }
.fma-lightbox-action-rail small { min-height:12px; color:#fff; font-size:11px; font-weight:700; line-height:1; text-shadow:0 1px 3px #000; }
.fma-lightbox-nav.is-previous { left:0; }
.fma-lightbox-nav.is-next { right:58px; }
.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-nav.is-previous { left:0; }
.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-nav.is-next { right:58px; }
.fma-lightbox-copy,.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-copy { grid-column:1; grid-row:2; width:100%; align-self:start; }
.fma-lightbox-comments { grid-column:2; grid-row:1/3; margin-left:0; border-color:rgba(255,255,255,.1); background:#081523; border-radius:14px; }
.fma-lightbox-comments header { min-height:48px; padding:10px 13px; }
.fma-lightbox-comments-list { padding:6px 13px; }
.fma-lightbox-comment-form { padding:8px 11px 10px; }
.fma-lightbox-comment-form textarea { min-height:42px; height:42px; max-height:72px; resize:none; padding:7px 9px; border-radius:18px; background:#0c1d31; }
.fma-lightbox-comment-form-meta { margin-top:5px; }
.fma-lightbox-comment-form-meta button { display:grid; place-items:center; width:31px; height:31px; padding:0; border-radius:50%; }
.fma-lightbox-comment-form-meta button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.fma-lightbox-comment-status { max-height:32px; overflow:auto; }
@media(max-width:850px) {
	.fma-video-lightbox-shell { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; }
	.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto minmax(0,34vh); }
	.fma-lightbox-stage { gap:6px; }
	.fma-lightbox-player.is-horizontal { width:min(calc(100% - 54px),160vh); }
	.fma-lightbox-player.is-vertical { width:min(calc(100% - 54px),44vh,420px); }
	.fma-lightbox-action-rail { flex-basis:42px; gap:18px; padding-bottom:28px; }
	.fma-lightbox-action-rail svg { width:27px; height:27px; }
	.fma-lightbox-nav { width:34px; height:46px; font-size:30px; }
	.fma-lightbox-nav.is-previous { left:0 !important; }
	.fma-lightbox-nav.is-next { right:48px !important; }
	.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-nav.is-next { right:48px !important; }
	.fma-lightbox-comments { grid-column:1; grid-row:3; min-height:0; }
	.fma-lightbox-copy,.fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical) .fma-lightbox-copy { grid-column:1; grid-row:2; width:100%; }
}

/* Keep the player and its action rail together; anchor comments near the save icon. */
.fma-lightbox-stage { position:relative; display:flex; align-items:stretch; justify-content:center; gap:10px; min-width:0; width:100%; }
.fma-lightbox-media { position:relative; display:flex; flex:0 1 auto; align-items:stretch; justify-content:center; gap:10px; min-width:0; }
.fma-lightbox-player { flex:0 1 auto; min-width:0; }
.fma-lightbox-player.is-horizontal { width:min(86vw,1280px,142vh); max-width:100%; }
.fma-lightbox-player.is-vertical { width:min(44vh,480px); max-width:100%; }
.fma-lightbox-action-rail { flex:0 0 52px; align-self:stretch; height:auto; justify-content:flex-end; gap:19px; padding:8px 0 30px; }
.fma-lightbox-view-count { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-width:44px; color:#fff; }
.fma-lightbox-view-count svg { display:block; width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.fma-lightbox-view-count small { min-height:12px; color:#fff; font-size:11px; font-weight:700; line-height:1; text-shadow:0 1px 3px #000; }
.fma-video-home-link { display:block; flex:0 0 44px; width:44px; height:44px; overflow:hidden; border:1px solid rgba(255,255,255,.35); border-radius:8px; background:#071d4c; box-shadow:0 1px 5px #0008; }
.fma-video-home-link img { display:block; width:100%; height:100%; object-fit:cover; }
.fma-video-home-link:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.fma-lightbox-swipe-zone { display:none; }
.fma-lightbox-comments { flex:0 0 clamp(270px,30vw,360px); align-self:flex-end; width:clamp(270px,30vw,360px); height:min(66vh,480px); min-height:0; max-height:calc(100% - 30px); margin:0 0 30px; }
.fma-lightbox-nav.is-previous { left:-58px; }
.fma-lightbox-nav.is-next { right:2px; }
@media(max-width:850px) {
	.fma-video-lightbox-shell { height:94vh; }
	.fma-lightbox-stage { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:8px; }
	.fma-lightbox-media { flex:0 1 auto; max-width:100%; min-height:0; }
	.fma-lightbox-player.is-horizontal { width:min(calc(100vw - 62px),160vh); }
	.fma-lightbox-player.is-vertical { width:min(calc(100vw - 62px),46vh,480px); }
	.fma-lightbox-action-rail { flex-basis:42px; gap:16px; padding-bottom:24px; }
	.fma-lightbox-swipe-zone { position:absolute; z-index:3; top:0; right:0; bottom:0; display:block; width:28px; background:transparent; touch-action:none; }
	.fma-lightbox-comments { flex:0 0 min(32vh,240px); width:min(100%,520px); height:100%; max-height:100%; margin:0; align-self:center; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-stage { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,32vh); }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-media { grid-column:1; grid-row:1; justify-self:center; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-player.is-vertical { width:min(calc(100vw - 62px),34vh,480px); }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-comments { grid-column:1; grid-row:2; justify-self:center; }
}

/* Opening comments must not resize or shift the centered player. */
@media(min-width:851px) {
	.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr); }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-stage,
	.fma-video-lightbox-shell.has-comments .fma-lightbox-copy { grid-column:1; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-comments {
		position:absolute;
		z-index:8;
		left:calc(50% + min(22vh,240px) + 66px);
		right:auto;
		bottom:30px;
		width:clamp(270px,30vw,360px);
		height:min(66vh,480px);
		margin:0;
	}
}

@media(max-width:850px) {
	.fma-video-lightbox-shell.has-comments { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-stage { display:flex; grid-column:1; grid-row:1; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-copy { grid-column:1; grid-row:2; }
	.fma-video-lightbox-shell.has-comments .fma-lightbox-comments {
		position:absolute;
		z-index:8;
		left:8px;
		right:8px;
		bottom:8px;
		width:auto;
		height:min(32vh,240px);
		max-height:40vh;
		margin:0;
	}
}


/* Keep the comments panel in the layout; it must never cover a landscape video. */
@media(min-width:851px){
 .fma-video-lightbox-shell.has-comments{grid-template-columns:minmax(0,1fr) minmax(280px,320px)!important;grid-template-rows:minmax(0,1fr) auto!important}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage{grid-column:1!important;grid-row:1!important;min-width:0}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-copy{grid-column:1!important;grid-row:2!important}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments{position:relative!important;inset:auto!important;grid-column:2!important;grid-row:1/3!important;width:auto!important;height:min(66vh,480px)!important;max-height:100%!important;margin:0!important;align-self:center}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-player.is-horizontal{width:min(86vw,calc(100vw - 430px),1280px,142vh)!important;max-width:100%}
}
@media(max-width:850px){
 .fma-video-lightbox-shell,.fma-video-lightbox-shell.has-comments{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:8px!important;height:94vh!important}
 .fma-video-lightbox-shell.has-comments{grid-template-rows:minmax(0,1fr) minmax(0,32vh) auto!important}
 .fma-video-lightbox-shell .fma-lightbox-stage{grid-column:1!important;grid-row:1!important;min-height:0;transition:transform .24s ease}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments{position:relative!important;inset:auto!important;grid-column:1!important;grid-row:2!important;justify-self:stretch!important;width:100%!important;height:auto!important;min-height:0!important;max-height:32vh!important;margin:0!important;align-self:stretch!important}
 .fma-video-lightbox-shell .fma-lightbox-copy{grid-column:1!important;grid-row:2!important;width:100%!important;align-self:start}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-copy{grid-row:3!important}
 .fma-video-lightbox-shell .fma-lightbox-media:has(.fma-lightbox-player.is-horizontal){width:100%;max-width:100%;flex-direction:column;align-items:center;gap:3px}
 .fma-video-lightbox-shell .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal){flex-direction:column;gap:4px}
 .fma-video-lightbox-shell .fma-lightbox-player.is-horizontal{width:min(94vw,160vh)!important;max-width:100%;}
 .fma-video-lightbox-shell .fma-lightbox-media:has(.fma-lightbox-player.is-vertical){max-width:100%}
 .fma-video-lightbox-shell .fma-lightbox-player.is-vertical{width:min(calc(100vw - 62px),38vh,420px)!important;max-width:100%}
 .fma-video-lightbox-shell .fma-lightbox-action-rail{flex-direction:column;flex-basis:48px;gap:12px;padding:4px 0;justify-content:center}
 .fma-video-lightbox-shell .fma-lightbox-media:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-action-rail{width:100%;height:auto;flex:0 0 auto;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;padding:3px 0}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-vertical){transform:translateY(-7px) scale(.96)}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal){transform:translateY(-4px) scale(.98)}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-player.is-vertical{width:min(calc(100vw - 62px),28vh,420px)!important}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments-list{min-height:40px}
}

/* Desktop: the shell must actually become a grid so the comments reserve a
   column beside the video and action rail instead of flowing over the player. */
@media(min-width:851px){
 .fma-video-lightbox-shell.has-comments{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-items:stretch!important;
  gap:12px!important;
  width:min(96vw,1500px)!important;
  height:min(90vh,850px)!important;
  max-height:96vh!important;
 }
 .fma-video-lightbox-shell{--fma-open-video-width:min(44vw,620px,max(130px,calc(100vw - 720px)));--fma-open-video-half:min(22vw,310px,max(65px,calc(50vw - 360px)));}
 .fma-video-lightbox-shell:has(.fma-lightbox-player.is-vertical){--fma-open-video-width:min(38vh,420px,max(130px,calc(100vw - 720px)));--fma-open-video-half:min(19vh,210px,max(65px,calc(50vw - 360px)));}
 .fma-video-lightbox-shell .fma-lightbox-player.is-horizontal{width:var(--fma-open-video-width)!important;max-width:100%!important;}
 .fma-video-lightbox-shell .fma-lightbox-player.is-vertical{width:var(--fma-open-video-width)!important;max-width:100%!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-player.is-horizontal{width:var(--fma-open-video-width)!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-player.is-vertical{width:var(--fma-open-video-width)!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage{grid-column:1!important;grid-row:1!important;min-height:0!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-copy{grid-column:1!important;grid-row:2!important;width:100%!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments{position:absolute!important;z-index:12!important;top:50%!important;left:calc(50% + var(--fma-open-video-half,150px) + 41px)!important;right:auto!important;transform:translateY(-50%)!important;width:clamp(220px,24vw,320px)!important;height:min(66vh,480px)!important;max-height:calc(100% - 20px)!important;margin:0!important;}
}

/* On phones, split the screen between a fully visible player and a comments
   panel that stretches to the bottom. Do not reserve a trailing title row. */
@media(max-width:850px){
 .fma-video-lightbox{padding:0!important;align-items:stretch!important;}
 .fma-video-lightbox .fma-lightbox-close{z-index:1000002!important;pointer-events:auto!important;}
 .fma-video-lightbox-shell.has-comments{display:block!important;position:static!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;padding:0!important;overflow:visible!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage{position:relative!important;display:flex!important;grid-column:auto!important;grid-row:auto!important;width:100%!important;min-height:0!important;align-self:auto!important;transform:none!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-copy{display:none!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments{position:fixed!important;z-index:1000001!important;display:flex!important;top:24dvh!important;right:12px!important;bottom:0!important;left:12px!important;grid-column:auto!important;grid-row:auto!important;align-self:stretch!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;transform:none!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-comments-list{flex:1 1 auto!important;min-height:0!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-vertical){display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;grid-template-rows:minmax(0,1fr)!important;align-items:center!important;justify-items:center!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-vertical) .fma-lightbox-media{grid-column:1!important;grid-row:1!important;max-width:100%!important;max-height:100%!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-vertical) .fma-lightbox-player.is-vertical{width:min(calc(100vw - 86px),26dvh,420px,27dvh)!important;max-width:100%!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-vertical) .fma-lightbox-action-rail{grid-column:2!important;grid-row:1!important;align-self:center!important;}
 .fma-video-lightbox-shell.has-comments:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-comments{top:22dvh!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal){display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;}
 .fma-video-lightbox-shell.has-comments:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-comments{top:22dvh!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-player.is-horizontal{width:min(94vw,55dvh,160vh)!important;max-width:100%!important;flex:none!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-media{width:100%!important;max-width:100%!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;}
 .fma-video-lightbox-shell.has-comments .fma-lightbox-stage:has(.fma-lightbox-player.is-horizontal) .fma-lightbox-action-rail{width:100%!important;flex-direction:row!important;flex:0 0 auto!important;justify-content:center!important;align-self:center!important;gap:10px!important;padding:3px 0!important;}
}
