.madefa-ad-module {
	--madefa-border: #CDCDCD;
	--madefa-soft: #F2F2F2;
	--madefa-text: #333333;
	--madefa-muted: #999999;
	--madefa-link: #336699;
	--madefa-accent: #F26C4F;
	box-sizing: border-box;
	width: 100%;
	margin: var(--madefa-module-gap, 10px) 0;
	color: var(--madefa-text);
	font-family: inherit;
}
.madefa-ad-module *, .madefa-ad-module *:before, .madefa-ad-module *:after { box-sizing: border-box; }
.madefa-ad-banner-track {
	display: grid;
	grid-template-columns: repeat(var(--madefa-columns), minmax(0, 1fr));
	gap: var(--madefa-gap, 10px);
	width: 100%;
}
.madefa-ad-banner-item {
	position: relative;
	display: block;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--madefa-border);
	border-radius: 3px;
	background: #FFFFFF;
	color: var(--madefa-link);
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease, opacity .35s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.madefa-ad-banner-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 20 / 3;
	object-fit: cover;
	background: var(--madefa-soft);
}
.madefa-ad-banner-item.is-image-error { aspect-ratio: 20 / 3; }
.madefa-ad-banner-item.is-image-error picture { display: none; }
.madefa-ad-image-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	padding: 14px 52px 14px 14px;
	background: var(--madefa-soft);
	color: var(--madefa-text);
	font-size: 14px;
	line-height: 1.5;
	opacity: 0;
	pointer-events: none;
}
.madefa-ad-banner-item.is-image-error .madefa-ad-image-fallback { opacity: 1; }
.madefa-ad-fallback-right { justify-content: flex-end; padding-right: 52px; padding-left: 14px; text-align: right; }
.madefa-ad-placeholder {
	cursor: default;
	background: var(--madefa-soft);
	color: var(--madefa-muted);
}
.madefa-ad-banner-item.madefa-ad-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 20 / 3;
}
.madefa-ad-banner-item.madefa-ad-placeholder img { position: absolute; inset: 0; height: 100%; }
.madefa-ad-placeholder-text {
	position: relative;
	z-index: 1;
	max-width: calc(100% - 80px);
	padding: 4px 8px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .88);
	color: var(--madefa-muted);
	font-size: 12px;
	line-height: 18px;
	text-align: center;
}
.madefa-ad-banner-item:hover, .madefa-ad-banner-item:focus-visible {
	border-color: var(--madefa-link);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	outline: 0;
}
.madefa-ad-brand {
	position: absolute;
	left: 8px;
	bottom: 7px;
	max-width: calc(100% - 52px);
	padding: 3px 6px;
	border-radius: 2px;
	background: rgba(0, 0, 0, .62);
	color: #FFFFFF;
	font-size: 12px;
	line-height: 18px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.madefa-ad-badge {
	position: absolute;
	top: 7px;
	right: 7px;
	min-width: 26px;
	padding: 2px 5px;
	border: 1px solid rgba(255, 255, 255, .65);
	border-radius: 2px;
	background: rgba(0, 0, 0, .58);
	color: var(--madefa-ad-color, #FFFFFF);
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
}
.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item.is-active {
	grid-column: 1 / -1;
	z-index: 2;
}
.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item.is-active img { aspect-ratio: 8 / 1; }
.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item:not(.is-active) {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	transform: scale(.97);
}
.madefa-ad-stage {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 48px;
	align-items: stretch;
	max-height: 0;
	margin-bottom: 0;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: 3px;
	background: #FFFFFF;
	opacity: 0;
	transform: translateY(6px);
	visibility: hidden;
	transition: max-height .45s ease, margin .45s ease, opacity .25s ease, transform .45s ease, visibility 0s linear .45s;
}
.madefa-ad-mode-brand-stage.has-active .madefa-ad-stage {
	max-height: 220px;
	margin-bottom: var(--madefa-gap, 10px);
	border-color: var(--madefa-border);
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 0s;
}
.madefa-ad-stage-brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px;
	border-right: 1px solid var(--madefa-border);
	background: var(--madefa-soft);
}
.madefa-ad-stage-brand small { color: var(--madefa-muted); }
.madefa-ad-stage-brand strong { margin-top: 5px; color: var(--madefa-text); font-size: 18px; overflow-wrap: anywhere; }
.madefa-ad-stage.has-no-brand { grid-template-columns: minmax(0, 1fr) 48px; }
.madefa-ad-stage.has-no-brand .madefa-ad-stage-brand { display: none; }
.madefa-ad-no-badge .madefa-ad-stage { grid-template-columns: 150px minmax(0, 1fr); }
.madefa-ad-no-badge .madefa-ad-stage.has-no-brand { grid-template-columns: minmax(0, 1fr); }
.madefa-ad-stage > a { min-width: 0; }
.madefa-ad-stage > a:focus-visible { outline: 2px solid var(--madefa-link); outline-offset: -2px; }
.madefa-ad-stage img { display: block; width: 100%; height: 100%; aspect-ratio: 8 / 1; object-fit: cover; }
.madefa-ad-stage > span { display: grid; place-items: center; border-left: 1px solid var(--madefa-border); color: var(--madefa-ad-color, var(--madefa-muted)); font-size: 11px; font-weight: 700; }
.madefa-ad-mode-brand-stage.has-active .madefa-ad-banner-item { opacity: .72; }
.madefa-ad-mode-brand-stage.has-active .madefa-ad-banner-item.is-active { border-color: var(--madefa-link); opacity: 1; }
.madefa-ad-mode-fade-carousel .madefa-ad-banner-track {
	display: grid;
	grid-template-columns: 1fr;
	overflow: hidden;
}
.madefa-ad-mode-fade-carousel .madefa-ad-banner-item {
	grid-area: 1 / 1;
	opacity: 0;
	pointer-events: none;
}
.madefa-ad-mode-fade-carousel .madefa-ad-banner-item.is-active { opacity: 1; pointer-events: auto; }
.madefa-ad-mode-slide-carousel { overflow: hidden; }
.madefa-ad-mode-slide-carousel .madefa-ad-banner-track {
	display: flex;
	gap: 0;
	transition: transform .48s cubic-bezier(.22, 1, .36, 1);
}
.madefa-ad-mode-slide-carousel .madefa-ad-banner-item { flex: 0 0 100%; }
.madefa-ad-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 28px;
	margin-top: 5px;
	color: var(--madefa-muted);
	font-size: 12px;
}
.madefa-ad-controls button {
	width: 26px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--madefa-border);
	border-radius: 2px;
	background: #FFFFFF;
	color: var(--madefa-link);
	font: 18px/20px Arial, sans-serif;
	cursor: pointer;
}
.madefa-ad-controls button:hover, .madefa-ad-controls button:focus-visible { border-color: var(--madefa-link); outline: 0; }
.madefa-ad-text-grid {
	display: grid;
	grid-template-columns: repeat(var(--madefa-columns), minmax(0, 1fr));
	gap: var(--madefa-gap, 8px);
	width: 100%;
	background: transparent;
}
.madefa-ad-text-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 38px;
	padding: 7px 42px;
	border: var(--madefa-card-border-width, 1px) solid var(--madefa-card-border-color, var(--madefa-border));
	border-radius: 3px;
	background: var(--madefa-text-bg, #FFFFFF);
	color: var(--madefa-link);
	text-decoration: none;
	box-shadow: var(--madefa-card-shadow, none);
	transition: color var(--madefa-hover-duration, .2s) ease, background-color var(--madefa-hover-duration, .2s) ease, border-color var(--madefa-hover-duration, .2s) ease, box-shadow var(--madefa-hover-duration, .2s) ease, transform var(--madefa-hover-duration, .2s) ease;
}
.madefa-ad-text-item:focus-visible { outline: 2px solid var(--madefa-link); outline-offset: 1px; }
.madefa-ad-hover-enabled .madefa-ad-text-item:hover,
.madefa-ad-hover-enabled .madefa-ad-text-item:focus-visible {
	border-color: var(--madefa-hover-border, var(--madefa-link));
	background: var(--madefa-hover-bg, var(--madefa-soft));
	color: var(--madefa-hover-color, var(--madefa-link));
	box-shadow: 0 2px 8px var(--madefa-hover-shadow, rgba(0, 0, 0, .12));
	transform: translateY(calc(0px - var(--madefa-hover-lift, 0px)));
}
.madefa-ad-hover-enabled .madefa-ad-text-item:hover .madefa-ad-copy,
.madefa-ad-hover-enabled .madefa-ad-text-item:focus-visible .madefa-ad-copy {
	color: var(--madefa-hover-color) !important;
	-webkit-text-fill-color: var(--madefa-hover-color) !important;
}
.madefa-ad-layout-cards .madefa-ad-text-item { min-height: 48px; border-radius: 6px; box-shadow: var(--madefa-card-shadow, none); }
.madefa-ad-layout-lines .madefa-ad-text-item { border-right: 0; border-left: 0; border-radius: 0; background: transparent; }
.madefa-ad-layout-strip .madefa-ad-text-item { min-height: 44px; border-radius: 2px; background: linear-gradient(90deg, var(--madefa-text-bg, #FFFFFF) 0, var(--madefa-text-bg, #FFFFFF) calc(100% - 5px), #336699 calc(100% - 5px)); }
.madefa-ad-text-item.madefa-ad-placeholder { justify-content: center; }
.madefa-ad-text-item.madefa-ad-placeholder .madefa-ad-copy { color: var(--madefa-muted); }
.madefa-ad-text-badge {
	position: absolute;
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
	color: var(--madefa-ad-color, var(--madefa-muted));
	font-size: 10px;
	font-weight: 700;
}
.madefa-ad-badge-right .madefa-ad-text-badge { right: 10px; left: auto; }
.madefa-ad-text-label {
	position: absolute;
	top: 50%;
	left: 10px;
	max-width: 28%;
	padding: 1px 5px;
	border-radius: 2px;
	background: var(--madefa-label-bg, var(--madefa-soft));
	color: var(--madefa-label-color, var(--madefa-text));
	font-size: 11px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transform: translateY(-50%);
}
.madefa-ad-badge-left .madefa-ad-text-label { left: 34px; }
.madefa-ad-no-badge .madefa-ad-text-label, .madefa-ad-badge-right .madefa-ad-text-label { left: 10px; }
.madefa-ad-copy { display: block; width: 100%; min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s ease; }
.madefa-ad-copy.is-changing { opacity: 0; }

/* Layout styles share one strict grid; only the card interior changes. */
.madefa-ad-layout-signal_glass .madefa-ad-text-item,
.madefa-ad-layout-editorial_luxe .madefa-ad-text-item,
.madefa-ad-layout-kinetic_frame .madefa-ad-text-item,
.madefa-ad-layout-prism_shift .madefa-ad-text-item,
.madefa-ad-layout-terminal_matrix .madefa-ad-text-item,
.madefa-ad-layout-executive_plate .madefa-ad-text-item {
	min-height: 56px;
	border-width: var(--madefa-card-border-width, 1px);
	border-color: var(--madefa-card-border-color, var(--madefa-border));
	box-shadow: var(--madefa-card-shadow, none);
}
.madefa-ad-layout-signal_glass .madefa-ad-text-item > *,
.madefa-ad-layout-editorial_luxe .madefa-ad-text-item > *,
.madefa-ad-layout-kinetic_frame .madefa-ad-text-item > *,
.madefa-ad-layout-prism_shift .madefa-ad-text-item > *,
.madefa-ad-layout-terminal_matrix .madefa-ad-text-item > *,
.madefa-ad-layout-executive_plate .madefa-ad-text-item > * { z-index: 2; }

.madefa-ad-layout-signal_glass .madefa-ad-text-item {
	overflow: hidden;
	padding: 10px 44px;
	border-radius: 6px;
	background: var(--madefa-text-bg, linear-gradient(135deg, #101827, #18243A));
	color: #D8F7F3;
}
.madefa-ad-layout-signal_glass .madefa-ad-text-item:before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 4px;
	background: #00B8A9;
}
.madefa-ad-layout-signal_glass .madefa-ad-text-item:after {
	content: "";
	position: absolute;
	right: 14px;
	bottom: 10px;
	width: 20px;
	height: 3px;
	background: repeating-linear-gradient(90deg, #00B8A9 0 3px, transparent 3px 6px);
	opacity: .72;
}
.madefa-ad-layout-signal_glass .madefa-ad-copy { color: #D8F7F3; font-weight: 600; }
.madefa-ad-layout-signal_glass .madefa-ad-text-label { border: 1px solid rgba(0, 184, 169, .4); background: rgba(0, 184, 169, .12); color: #82E8DD; }

.madefa-ad-layout-editorial_luxe .madefa-ad-text-item {
	align-items: flex-end;
	min-height: 64px;
	padding: 25px 28px 11px;
	border-radius: 0;
	background: var(--madefa-text-bg, #FBFBFC);
	color: #151A22;
}
.madefa-ad-layout-editorial_luxe .madefa-ad-text-item:before {
	content: "";
	position: absolute;
	top: 10px;
	right: 12px;
	left: 12px;
	height: 1px;
	background: linear-gradient(90deg, #B68A3A 0 28%, #D9DCE2 28% 100%);
}
.madefa-ad-layout-editorial_luxe .madefa-ad-copy { color: #151A22; font-family: Georgia, "Songti SC", SimSun, serif; font-size: 15px; font-weight: 700; }
.madefa-ad-layout-editorial_luxe .madefa-ad-text-label { top: 18px; padding: 0; background: transparent; color: #846426; font-size: 10px; transform: none; }
.madefa-ad-layout-editorial_luxe .madefa-ad-text-badge { top: 14px; transform: none; }

.madefa-ad-layout-kinetic_frame .madefa-ad-text-item {
	overflow: hidden;
	border-color: var(--madefa-card-border-color, transparent);
	border-radius: 5px;
	background: var(--madefa-text-bg, #111827);
	color: #FFFFFF;
}
.madefa-ad-layout-kinetic_frame .madefa-ad-text-item:before {
	content: "";
	position: absolute;
	inset: 0;
	padding: var(--madefa-card-border-width, 1px);
	border-radius: inherit;
	background: linear-gradient(110deg, #2563EB, #00B8A9, #F3C969, #2563EB) 0 0 / 260% 100%;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
	animation: madefa-frame-trace 4.8s linear infinite;
}
.madefa-ad-layout-kinetic_frame .madefa-ad-copy { color: #F7FAFF; font-weight: 700; }
.madefa-ad-layout-kinetic_frame .madefa-ad-text-label { background: #2563EB; color: #FFFFFF; }

.madefa-ad-layout-prism_shift .madefa-ad-text-item {
	overflow: hidden;
	border-radius: 6px;
	background: var(--madefa-text-bg, #F7F9FC);
	color: #263147;
}
.madefa-ad-layout-prism_shift .madefa-ad-text-item:before {
	content: "";
	position: absolute;
	inset: -80% -30%;
	background: linear-gradient(105deg, transparent 36%, rgba(0, 184, 169, .18) 44%, rgba(37, 99, 235, .22) 50%, rgba(217, 72, 95, .16) 56%, transparent 64%);
	transform: translateX(-42%) rotate(7deg);
	animation: madefa-prism-pass 6s ease-in-out infinite;
}
.madefa-ad-layout-prism_shift .madefa-ad-copy { color: #263147; font-weight: 700; }
.madefa-ad-layout-prism_shift .madefa-ad-text-label { border-radius: 10px; background: #FFFFFF; color: #35415A; box-shadow: 0 1px 5px rgba(38, 49, 71, .12); }

.madefa-ad-layout-terminal_matrix .madefa-ad-text-item {
	overflow: hidden;
	justify-content: flex-start;
	padding: 19px 36px 8px;
	border-radius: 2px;
	background-color: var(--madefa-text-bg, #07120F);
	background-image: linear-gradient(rgba(83, 214, 167, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(83, 214, 167, .06) 1px, transparent 1px);
	background-size: 12px 12px;
	color: #7BE0B5;
}
.madefa-ad-layout-terminal_matrix .madefa-ad-text-item:after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 2px;
	background: #53D6A7;
	transform: translateY(53px);
	opacity: .45;
	animation: madefa-terminal-scan 3.8s linear infinite;
}
.madefa-ad-layout-terminal_matrix .madefa-ad-copy { color: #A2F2D2; font-family: Consolas, "Lucida Console", monospace; font-size: 12px; text-align: left; }
.madefa-ad-layout-terminal_matrix .madefa-ad-text-label { top: 6px; padding: 0; background: transparent; color: #53D6A7; font-family: Consolas, monospace; transform: none; }

.madefa-ad-layout-executive_plate .madefa-ad-text-item {
	justify-content: flex-start;
	padding: 18px 24px 9px 54px;
	border-radius: 4px;
	background: var(--madefa-text-bg, #FFFFFF);
	color: #17233A;
}
.madefa-ad-layout-executive_plate .madefa-ad-text-item:before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 38px;
	background: linear-gradient(180deg, #1E3A5F, #12243C);
	clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}
.madefa-ad-layout-executive_plate .madefa-ad-text-item:after {
	content: "";
	position: absolute;
	right: 16px;
	bottom: 8px;
	width: 28px;
	height: 1px;
	background: #B68A3A;
}
.madefa-ad-layout-executive_plate .madefa-ad-copy { color: #17233A; font-weight: 700; text-align: left; }
.madefa-ad-layout-executive_plate .madefa-ad-text-label { top: 7px; left: 54px !important; padding: 0; background: transparent; color: #718096; transform: none; }
.madefa-ad-layout-executive_plate .madefa-ad-text-badge { color: #DCE8F8; }

/* The stage family turns each thumbnail into a deliberate brand presentation. */
.madefa-ad-stage-mode .madefa-ad-stage {
	position: relative;
	grid-template-columns: 190px minmax(0, 1fr) 104px;
	min-height: 0;
	max-height: 0;
	border: 0;
	border-radius: 6px;
	box-shadow: 0 18px 46px rgba(17, 24, 39, .12);
	transform: translateY(10px) scale(.995);
	transition: max-height .58s cubic-bezier(.22, 1, .36, 1), margin .58s cubic-bezier(.22, 1, .36, 1), opacity .25s ease, transform .58s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .58s;
}
.madefa-ad-stage-mode.has-active .madefa-ad-stage {
	max-height: 240px;
	margin-bottom: var(--madefa-gap, 10px);
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 0s;
}
.madefa-ad-stage-mode .madefa-ad-stage-brand {
	position: relative;
	padding: 24px 20px;
	border: 0;
	background: #111827;
	color: #FFFFFF;
}
.madefa-ad-stage-mode .madefa-ad-stage-brand small { color: #8FA0B8; font-size: 11px; letter-spacing: 0; }
.madefa-ad-stage-mode .madefa-ad-stage-brand strong {
	display: block;
	min-width: 0;
	max-width: 100%;
	margin-top: 8px;
	overflow: hidden;
	color: #FFFFFF;
	font-size: 16px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.madefa-ad-stage-mode .madefa-ad-stage-brand em { margin-top: 10px; color: #AAB5C6; font-size: 10px; font-style: normal; }
.madefa-ad-stage-rule { position: absolute; top: 20px; bottom: 20px; left: 0; width: 3px; background: #2563EB; }
.madefa-ad-stage-mode .madefa-ad-stage-media {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	aspect-ratio: 8 / 1;
	background: #E9EDF3;
	isolation: isolate;
}
.madefa-ad-stage-mode .madefa-ad-stage-media img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: contain;
	object-position: center center;
	transition: filter .4s ease;
}
.madefa-ad-stage-mode .madefa-ad-stage-badge {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border: 0;
	background: #172033;
	color: #DCE5F1;
}
.madefa-ad-stage-badge i { width: 24px; height: 2px; background: #2563EB; }
.madefa-ad-stage-badge b { padding: 4px 7px; border-radius: 2px; background: #050608; color: var(--madefa-ad-color, #FFFFFF); font-size: 14px; line-height: 1; }
.madefa-ad-stage-badge em { color: #96A4B8; font-size: 9px; font-style: normal; }
.madefa-ad-mode-brand-stage .madefa-ad-stage-badge {
	border-left: 1px solid rgba(255, 255, 255, .1);
	background: #172033;
	color: #DCE5F1;
}
.madefa-ad-mode-brand-stage .madefa-ad-stage-badge em { color: #96A4B8; }
.madefa-ad-stage-mode.madefa-ad-no-badge .madefa-ad-stage { grid-template-columns: 190px minmax(0, 1fr); }
.madefa-ad-stage-mode.has-active .madefa-ad-banner-item { opacity: .58; filter: saturate(.74); }
.madefa-ad-stage-mode.has-active .madefa-ad-banner-item.is-active { border-color: #2563EB; opacity: 1; filter: none; }

.madefa-ad-mode-brand-cinema .madefa-ad-stage { grid-template-columns: 220px minmax(0, 1fr) 92px; border-radius: 2px; background: #080A0E; box-shadow: 0 22px 55px rgba(0, 0, 0, .28); }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-brand { background: #080A0E; }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-rule { right: 0; left: auto; width: 1px; background: #D9485F; }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-media { background: #080A0E; }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-media img { filter: contrast(1.07) saturate(.82); }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-badge { background: #10141B; color: #AEB8C7; }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-badge i { background: #D9485F; }
.madefa-ad-mode-brand-cinema .madefa-ad-stage-badge em { color: #7E8999; }

.madefa-ad-mode-brand-gallery .madefa-ad-stage { grid-template-columns: 200px minmax(0, 1fr) 120px; border: 1px solid #D8DDE6; border-radius: 0; background: #FFFFFF; box-shadow: 0 14px 36px rgba(31, 41, 55, .09); }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-media { background: #FFFFFF; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-brand { border-right: 1px solid #D8DDE6; background: #FFFFFF; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-brand small, .madefa-ad-mode-brand-gallery .madefa-ad-stage-brand em { color: #5E6673; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-brand strong { color: #141922; font-family: Georgia, "Songti SC", SimSun, serif; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-rule { top: 0; right: 20px; bottom: auto; left: 20px; width: auto; height: 3px; background: #B68A3A; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-badge { border-left: 1px solid #D8DDE6; background: #FFFFFF; color: #364152; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-badge i { background: #B68A3A; }
.madefa-ad-mode-brand-gallery .madefa-ad-stage-badge em { color: #5C6573; }

.madefa-ad-mode-brand-authority .madefa-ad-stage { border: 1px solid #263D5E; border-radius: 2px; background: #13233A; box-shadow: 0 18px 42px rgba(15, 34, 58, .22); }
.madefa-ad-mode-brand-authority .madefa-ad-stage-media { background: #13233A; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-brand { background: #13233A; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-brand small, .madefa-ad-mode-brand-authority .madefa-ad-stage-brand em { color: #9FB0C8; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-rule { background: #C39A4A; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-badge { border-left: 1px solid #385171; background: #172A45; color: #D5DEEA; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-badge i { background: #C39A4A; }
.madefa-ad-mode-brand-authority .madefa-ad-stage-badge em { color: #9FB0C8; }

.madefa-ad-mode-brand-prism .madefa-ad-stage { border: 1px solid #D9DFEB; background: #F8FAFD; box-shadow: 0 18px 44px rgba(59, 74, 104, .15); }
.madefa-ad-mode-brand-prism .madefa-ad-stage-media { background: #F8FAFD; }
.madefa-ad-mode-brand-prism .madefa-ad-stage:before { content: ""; position: absolute; z-index: 3; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #2563EB, #00B8A9, #D9485F, #B68A3A, #2563EB) 0 0 / 220% 100%; animation: madefa-prism-line 5s linear infinite; }
.madefa-ad-mode-brand-prism .madefa-ad-stage-brand { background: linear-gradient(135deg, #F5F8FC, #FFFFFF); }
.madefa-ad-mode-brand-prism .madefa-ad-stage-brand small, .madefa-ad-mode-brand-prism .madefa-ad-stage-brand em { color: #77839A; }
.madefa-ad-mode-brand-prism .madefa-ad-stage-brand strong { color: #202B40; }
.madefa-ad-mode-brand-prism .madefa-ad-stage-rule { display: none; }
.madefa-ad-mode-brand-prism .madefa-ad-stage-badge { background: #F3F6FB; color: #364152; }
.madefa-ad-mode-brand-prism .madefa-ad-stage-badge i { background: linear-gradient(90deg, #2563EB, #00B8A9, #D9485F); }
.madefa-ad-mode-brand-prism .madefa-ad-stage-badge em { color: #5C6573; }

.madefa-ad-mode-brand-orbit .madefa-ad-stage { grid-template-columns: 210px minmax(0, 1fr) 108px; border: 1px solid #1D5660; border-radius: 22px 5px 22px 5px; background: #07191D; box-shadow: 0 20px 48px rgba(5, 41, 47, .25); }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-media { background: #07191D; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-brand { background: radial-gradient(circle at 22px 50%, rgba(0,184,169,.2), transparent 46%), #07191D; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-brand small, .madefa-ad-mode-brand-orbit .madefa-ad-stage-brand em { color: #75A9AC; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-brand strong { color: #D7F7F2; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-rule { top: 50%; left: 17px; width: 9px; height: 9px; border: 2px solid #00B8A9; border-radius: 50%; background: transparent; transform: translateY(-50%); box-shadow: 0 0 0 6px rgba(0,184,169,.09); }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-badge { border-left: 1px solid #1D5660; background: #0B2227; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-badge i { width: 10px; height: 10px; border: 2px solid #00B8A9; border-radius: 50%; background: transparent; }
.madefa-ad-mode-brand-orbit .madefa-ad-stage-badge em { color: #75A9AC; }

.madefa-ad-mode-brand-monolith .madefa-ad-stage { grid-template-columns: minmax(230px, 32%) minmax(0, 1fr) 88px; border-radius: 0; background: #15171B; box-shadow: 0 24px 54px rgba(0,0,0,.26); }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-media { background: #15171B; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-brand { align-items: flex-start; padding-left: 28px; background: #15171B; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-brand strong { max-width: 100%; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-brand small, .madefa-ad-mode-brand-monolith .madefa-ad-stage-brand em { color: #949AA4; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-rule { top: auto; right: 28px; bottom: 16px; left: 28px; width: auto; height: 1px; background: #D1A14C; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-badge { background: #24272D; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-badge i { width: 1px; height: 26px; background: #D1A14C; }
.madefa-ad-mode-brand-monolith .madefa-ad-stage-badge em { color: #949AA4; writing-mode: vertical-rl; }

@keyframes madefa-frame-trace { to { background-position: 260% 0; } }
@keyframes madefa-prism-pass { 0%, 18% { transform: translateX(-48%) rotate(7deg); } 72%, 100% { transform: translateX(48%) rotate(7deg); } }
@keyframes madefa-terminal-scan { 0% { transform: translateY(0); } 100% { transform: translateY(56px); } }
@keyframes madefa-prism-line { to { background-position: 220% 0; } }
.madefa-ad-module [hidden] { display: none !important; }
@media (max-width: 760px) {
	.madefa-ad-banner-track, .madefa-ad-text-grid { grid-template-columns: 1fr; }
	.madefa-ad-text-grid { grid-template-columns: repeat(var(--madefa-columns), minmax(0, 1fr)); }
	.madefa-ad-text-item { min-height: 50px; padding-right: 24px; padding-left: 24px; }
	.madefa-ad-text-label { top: 4px; left: 7px !important; max-width: 48%; transform: none; }
	.madefa-ad-text-badge { top: 5px; right: 7px; left: auto; transform: none; }
	.madefa-ad-copy { font-size: 11px; }
	.madefa-ad-banner-item img { aspect-ratio: 25 / 8; }
	.madefa-ad-banner-item.is-image-error, .madefa-ad-banner-item.madefa-ad-placeholder { aspect-ratio: 25 / 8; }
	.madefa-ad-stage { display: none; }
	.madefa-ad-stage-mode .madefa-ad-stage,
	.madefa-ad-stage-mode.madefa-ad-no-badge .madefa-ad-stage {
		display: grid;
		grid-template-columns: 1fr;
		max-height: 0;
	}
	.madefa-ad-stage-mode.has-active .madefa-ad-stage { max-height: 360px; }
	.madefa-ad-stage-mode .madefa-ad-stage-brand { min-height: 74px; padding: 13px 74px 13px 16px; }
	.madefa-ad-stage-mode .madefa-ad-stage-brand strong { margin-top: 3px; font-size: 16px; }
	.madefa-ad-stage-mode .madefa-ad-stage-brand em { margin-top: 3px; }
	.madefa-ad-stage-mode .madefa-ad-stage-media { aspect-ratio: 25 / 8; }
	.madefa-ad-stage-mode .madefa-ad-stage-media img { aspect-ratio: 25 / 8; }
	.madefa-ad-stage-mode .madefa-ad-stage-badge { position: absolute; z-index: 4; top: 12px; right: 10px; width: 54px; min-height: 50px; border: 0; background: transparent; }
	.madefa-ad-stage-mode .madefa-ad-stage-badge em { color: #AAB5C6; font-size: 8px; writing-mode: horizontal-tb; }
	.madefa-ad-mode-brand-gallery .madefa-ad-stage-badge em,
	.madefa-ad-mode-brand-prism .madefa-ad-stage-badge em { color: #5C6573; }
	.madefa-ad-mode-brand-monolith .madefa-ad-stage-brand { padding-left: 20px; }
	.madefa-ad-mode-brand-monolith .madefa-ad-stage-rule { right: 20px; left: 20px; }
	.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item.is-active img { aspect-ratio: 25 / 8; }
	.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item:not(.is-active) { position: relative; opacity: 1; pointer-events: auto; transform: none; }
}
@media (pointer: coarse) {
	.madefa-ad-stage { display: none; }
	.madefa-ad-stage-mode .madefa-ad-stage { display: grid; }
	.madefa-ad-mode-focus-expand.has-active .madefa-ad-banner-item:not(.is-active) { position: relative; opacity: 1; pointer-events: auto; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.madefa-ad-module *, .madefa-ad-module *:before, .madefa-ad-module *:after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* 2.2 compact text layouts. The configured height is authoritative. */
.madefa-ad-text .madefa-ad-text-grid {
	grid-template-columns: repeat(var(--madefa-columns), minmax(0, 1fr));
	grid-auto-rows: var(--madefa-item-height, 25px);
}
.madefa-ad-text .madefa-ad-text-item {
	height: var(--madefa-item-height, 25px);
	min-height: var(--madefa-item-height, 25px);
	padding: 0 36px;
	line-height: 1.2;
}
.madefa-ad-text .madefa-ad-text-badge {
	top: 50%;
	left: 8px;
	padding: 1px 3px;
	border-radius: 2px;
	background: #000000;
	font-size: 9px;
	line-height: 12px;
	transform: translateY(-50%);
}
.madefa-ad-text.madefa-ad-badge-right .madefa-ad-text-badge { right: 8px; left: auto; }
.madefa-ad-text .madefa-ad-text-label {
	top: 50%;
	left: 8px;
	max-width: 27%;
	padding: 0 4px;
	font-size: 10px;
	line-height: 16px;
	transform: translateY(-50%);
}
.madefa-ad-text.madefa-ad-badge-left .madefa-ad-text-label { left: 31px; }
.madefa-ad-text.madefa-ad-no-badge .madefa-ad-text-label,
.madefa-ad-text.madefa-ad-badge-right .madefa-ad-text-label { left: 8px; }
.madefa-ad-text .madefa-ad-copy { font-size: 12px; line-height: 1.2; text-align: center; }

/* Discuz-native table: no card gap, radius, shadow, or ornamental surface. */
.madefa-ad-text.madefa-ad-layout-grid > .madefa-ad-text-grid {
	gap: 0;
	border-top: var(--madefa-card-border-width, 1px) solid var(--madefa-card-border-color, #CDCDCD);
	border-left: var(--madefa-card-border-width, 1px) solid var(--madefa-card-border-color, #CDCDCD);
	background: var(--madefa-text-bg, #FFFFFF);
}
.madefa-ad-text.madefa-ad-layout-grid > .madefa-ad-text-grid > .madefa-ad-text-item {
	border-width: 0 var(--madefa-card-border-width, 1px) var(--madefa-card-border-width, 1px) 0;
	border-style: solid;
	border-color: var(--madefa-card-border-color, #CDCDCD);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

/* Patched-style announcements: every advertisement owns a full row. */
.madefa-ad-layout-cards .madefa-ad-text-grid {
	grid-template-columns: minmax(0, 1fr) !important;
	grid-auto-rows: var(--madefa-item-height, 25px);
	gap: var(--madefa-gap, 8px);
}
.madefa-ad-layout-cards .madefa-ad-text-item {
	height: var(--madefa-item-height, 25px);
	min-height: var(--madefa-item-height, 25px);
	border-radius: 5px;
	background: var(--madefa-text-bg, #292929);
	color: #CCFFFF;
	box-shadow: var(--madefa-card-shadow, none);
}
.madefa-ad-layout-cards .madefa-ad-copy { color: #CCFFFF; font-weight: 700; }
.madefa-ad-layout-cards .madefa-ad-text-label { border: 0; background: rgba(255,255,255,.08); color: #FF9F43; }
.madefa-ad-layout-cards .madefa-ad-placeholder .madefa-ad-copy { color: #AEB8C6; }

.madefa-ad-layout-lines .madefa-ad-text-item,
.madefa-ad-layout-strip .madefa-ad-text-item {
	height: var(--madefa-item-height, 25px);
	min-height: var(--madefa-item-height, 25px);
}
.madefa-ad-layout-lines .madefa-ad-text-grid { row-gap: 0; }
.madefa-ad-layout-lines .madefa-ad-text-item { border-top: 0; border-right: 0; border-bottom-color: var(--madefa-card-border-color, #CDCDCD); border-left: 0; }
.madefa-ad-layout-strip .madefa-ad-text-item { border-radius: 2px; background: linear-gradient(90deg, #19324F 0 5px, var(--madefa-text-bg, #FFFFFF) 5px 100%); }

.madefa-ad-text.madefa-ad-layout-signal_glass .madefa-ad-text-item,
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-item,
.madefa-ad-text.madefa-ad-layout-kinetic_frame .madefa-ad-text-item,
.madefa-ad-text.madefa-ad-layout-prism_shift .madefa-ad-text-item,
.madefa-ad-text.madefa-ad-layout-terminal_matrix .madefa-ad-text-item,
.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-text-item {
	height: var(--madefa-item-height, 25px);
	min-height: var(--madefa-item-height, 25px);
	padding: 0 36px;
	align-items: center;
	justify-content: center;
}

.madefa-ad-text.madefa-ad-layout-signal_glass .madefa-ad-text-item { border-radius: 4px; background: var(--madefa-text-bg, linear-gradient(90deg, #101827, #17263B)); }
.madefa-ad-text.madefa-ad-layout-signal_glass .madefa-ad-text-item:before { width: 3px; }
.madefa-ad-text.madefa-ad-layout-signal_glass .madefa-ad-text-item:after { top: 50%; right: 9px; bottom: auto; width: 14px; transform: translateY(-50%); }
.madefa-ad-text.madefa-ad-layout-signal_glass .madefa-ad-text-label { background: rgba(0,184,169,.12); color: #82E8DD; }

.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-item { border-radius: 0; background: var(--madefa-text-bg, #FBFBFC); }
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-item:before { top: 0; right: 0; bottom: 0; left: 0; width: 3px; height: auto; background: #B68A3A; }
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-copy { color: #151A22; font-family: Georgia, "Songti SC", SimSun, serif; font-size: 12px; }
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-label,
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-badge { top: 50%; transform: translateY(-50%); }
.madefa-ad-text.madefa-ad-layout-editorial_luxe .madefa-ad-text-label { padding: 0 4px; }

.madefa-ad-text.madefa-ad-layout-kinetic_frame .madefa-ad-text-item { border-radius: 4px; }
.madefa-ad-text.madefa-ad-layout-kinetic_frame .madefa-ad-copy { font-size: 12px; }

.madefa-ad-text.madefa-ad-layout-prism_shift .madefa-ad-text-item { border-radius: 4px; }
.madefa-ad-text.madefa-ad-layout-prism_shift .madefa-ad-text-item:before { inset: -180% -30%; }
.madefa-ad-text.madefa-ad-layout-prism_shift .madefa-ad-text-label { border-radius: 8px; box-shadow: none; }

.madefa-ad-text.madefa-ad-layout-terminal_matrix .madefa-ad-text-item {
	padding: 0 36px;
	justify-content: center;
	background-size: 10px 10px;
}
.madefa-ad-text.madefa-ad-layout-terminal_matrix .madefa-ad-text-item:after {
	top: 0;
	height: 1px;
	transform: translateY(0);
	animation: madefa-terminal-sweep 3.8s linear infinite;
}
.madefa-ad-text.madefa-ad-layout-terminal_matrix .madefa-ad-copy { font-size: 11px; text-align: center; }
.madefa-ad-text.madefa-ad-layout-terminal_matrix .madefa-ad-text-label { top: 50%; padding: 0 4px; transform: translateY(-50%); }

.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-text-item { padding: 0 36px; justify-content: center; }
.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-text-item:before { width: 27px; }
.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-text-item:after { right: 9px; bottom: 5px; width: 18px; }
.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-copy { font-size: 12px; text-align: center; }
.madefa-ad-text.madefa-ad-layout-executive_plate .madefa-ad-text-label { top: 50%; left: 33px !important; padding: 0 4px; transform: translateY(-50%); }

@keyframes madefa-terminal-sweep {
	from { transform: translateY(0); }
	to { transform: translateY(var(--madefa-item-height, 25px)); }
}
