/*
 * Expo Floor Plan Manager — Frontend (v1.0.2)
 * Editorial-luxury · glassmorphism · mobile-first.
 * All selectors scoped to .efpm to avoid leaking into the host theme.
 */

.efpm,
.efpm * {
	box-sizing: border-box;
}

.efpm {
	/* ---------- Design tokens ---------- */
	--efpm-font: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--efpm-radius: 16px;
	--efpm-radius-sm: 10px;
	--efpm-radius-lg: 26px;
	--efpm-shadow-1: 0 1px 2px rgba(15, 17, 21, .04), 0 4px 12px rgba(15, 17, 21, .06);
	--efpm-shadow-2: 0 8px 28px rgba(15, 17, 21, .12);
	--efpm-shadow-3: 0 24px 70px rgba(15, 17, 21, .25);
	--efpm-ease: cubic-bezier(.2, .8, .2, 1);

	/* Light theme */
	--efpm-bg:        #f7f7f4;
	--efpm-bg-2:      #ffffff;
	--efpm-bg-3:      #efeeea;
	--efpm-fg:        #0d0e11;
	--efpm-fg-2:      #4a4f59;
	--efpm-fg-3:      #8b919c;
	--efpm-border:    rgba(15, 17, 21, .07);
	--efpm-border-2:  rgba(15, 17, 21, .14);
	--efpm-accent:    #0d0e11;
	--efpm-accent-fg: #ffffff;
	--efpm-glass:     rgba(255, 255, 255, .72);
	--efpm-overlay:   rgba(15, 17, 21, .55);
	--efpm-blob-1:    radial-gradient(closest-side, rgba(13, 14, 17, .08), transparent);
	--efpm-blob-2:    radial-gradient(closest-side, rgba(168, 85, 247, .08), transparent);
	--efpm-grid-color:rgba(15, 17, 21, .035);

	font-family: var(--efpm-font);
	color: var(--efpm-fg);
	background: var(--efpm-bg);
	border-radius: var(--efpm-radius-lg);
	border: 1px solid var(--efpm-border);
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	letter-spacing: .005em;
	contain: layout paint;
	isolation: isolate;
	position: relative;
}

/* Dark theme */
.efpm[data-theme="dark"],
.efpm[data-theme="auto"][data-color-scheme="dark"] {
	--efpm-bg:        #08090b;
	--efpm-bg-2:      #11141a;
	--efpm-bg-3:      #181c23;
	--efpm-fg:        #f4f4f1;
	--efpm-fg-2:      #b6bcc6;
	--efpm-fg-3:      #757b87;
	--efpm-border:    rgba(255, 255, 255, .07);
	--efpm-border-2:  rgba(255, 255, 255, .16);
	--efpm-accent:    #ffffff;
	--efpm-accent-fg: #08090b;
	--efpm-glass:     rgba(17, 20, 26, .72);
	--efpm-overlay:   rgba(0, 0, 0, .68);
	--efpm-blob-1:    radial-gradient(closest-side, rgba(168, 85, 247, .14), transparent);
	--efpm-blob-2:    radial-gradient(closest-side, rgba(99, 102, 241, .14), transparent);
	--efpm-grid-color:rgba(255, 255, 255, .03);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	.efpm[data-theme="auto"]:not([data-color-scheme="light"]) {
		--efpm-bg:        #08090b;
		--efpm-bg-2:      #11141a;
		--efpm-bg-3:      #181c23;
		--efpm-fg:        #f4f4f1;
		--efpm-fg-2:      #b6bcc6;
		--efpm-fg-3:      #757b87;
		--efpm-border:    rgba(255, 255, 255, .07);
		--efpm-border-2:  rgba(255, 255, 255, .16);
		--efpm-accent:    #ffffff;
		--efpm-accent-fg: #08090b;
		--efpm-glass:     rgba(17, 20, 26, .72);
		--efpm-overlay:   rgba(0, 0, 0, .68);
		--efpm-blob-1:    radial-gradient(closest-side, rgba(168, 85, 247, .14), transparent);
		--efpm-blob-2:    radial-gradient(closest-side, rgba(99, 102, 241, .14), transparent);
		--efpm-grid-color:rgba(255, 255, 255, .03);
		color-scheme: dark;
	}
}

/* ---------- Decorative backdrop ---------- */
.efpm__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}
.efpm__bg-blob {
	position: absolute;
	width: 60vw;
	height: 60vw;
	max-width: 720px;
	max-height: 720px;
	filter: blur(40px);
	opacity: .9;
	animation: efpmFloat 18s var(--efpm-ease) infinite alternate;
}
.efpm__bg-blob--a { top: -10%; left: -8%; background: var(--efpm-blob-1); }
.efpm__bg-blob--b { bottom: -16%; right: -10%; background: var(--efpm-blob-2); animation-duration: 24s; animation-delay: -6s; }
@keyframes efpmFloat {
	0%   { transform: translate3d(0, 0, 0) scale(1); }
	100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}
.efpm__bg-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--efpm-grid-color) 1px, transparent 1px),
		linear-gradient(90deg, var(--efpm-grid-color) 1px, transparent 1px);
	background-size: 36px 36px;
	mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.85), transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.85), transparent 75%);
}
.efpm > *:not(.efpm__bg) { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.efpm__header {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 22px 22px 18px;
	border-bottom: 1px solid var(--efpm-border);
	background: var(--efpm-glass);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
}
.efpm__header-row {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
@media (min-width: 768px) {
	.efpm__header-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
	.efpm__header { padding: 26px 30px 22px; }
}
.efpm__title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.efpm__eyebrow {
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--efpm-fg-3);
}
.efpm__title {
	font-size: clamp(20px, 2.6vw, 30px);
	font-weight: 500;
	letter-spacing: -.015em;
	margin: 0;
	line-height: 1.1;
}
.efpm__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: var(--efpm-fg-2);
	font-size: 13px;
	margin-top: 4px;
}
.efpm__meta-stat strong {
	color: var(--efpm-fg);
	font-weight: 500;
	margin-right: 4px;
}

.efpm__controls {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

/* Language switcher (v1.2.0) */
.efpm__lang {
	display: inline-flex;
	gap: 2px;
	padding: 4px;
	background: var(--efpm-bg-2);
	border: 1px solid var(--efpm-border);
	border-radius: 10px;
}
.efpm a.efpm__lang-pill,
.efpm__lang-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 32px;
	padding: 0 10px;
	border-radius: 7px;
	font: 600 11px/1 var(--efpm-font);
	letter-spacing: .08em;
	color: var(--efpm-fg-2) !important;
	text-decoration: none !important;
	background: transparent;
	transition: background .15s var(--efpm-ease), color .15s var(--efpm-ease);
}
.efpm a.efpm__lang-pill:hover,
.efpm__lang-pill:hover {
	background: var(--efpm-bg-3);
	color: var(--efpm-fg) !important;
}
.efpm a.efpm__lang-pill.is-active,
.efpm__lang-pill.is-active {
	background: var(--efpm-fg);
	color: var(--efpm-bg-2) !important;
}
.efpm__search {
	flex: 1 1 240px;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--efpm-border);
	border-radius: 10px;
	background: var(--efpm-bg-2);
	transition: border-color .18s var(--efpm-ease);
	box-shadow: none;
}
.efpm__search:focus-within {
	border-color: var(--efpm-fg-2);
	box-shadow: none;
}
.efpm__search svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--efpm-fg-3); }
.efpm__search input {
	all: unset;
	flex: 1;
	min-width: 0;
	font: inherit;
	color: var(--efpm-fg);
	font-size: 14px;
	box-shadow: none !important;
	outline: 0 !important;
	background: transparent !important;
	border: 0 !important;
	height: auto;
}
.efpm__search input::placeholder { color: var(--efpm-fg-3); }

.efpm select,
.efpm__icon-btn {
	height: 44px;
	padding: 0 36px 0 14px;
	border: 1px solid var(--efpm-border);
	border-radius: 10px;
	background: var(--efpm-bg-2);
	color: var(--efpm-fg);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .18s var(--efpm-ease), background .18s var(--efpm-ease);
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}
.efpm select:hover,
.efpm__icon-btn:hover {
	border-color: var(--efpm-border-2);
	background-color: var(--efpm-bg-3);
}
.efpm__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	padding: 0;
	background-image: none;
}
.efpm__icon-btn svg { width: 18px; height: 18px; }

/* Status chips row (now interactive — they filter the plan + sidebar) */
.efpm__status-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}
.efpm__chip-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px 6px 10px;
	border: 1px solid var(--efpm-border);
	border-radius: 999px;
	background: var(--efpm-bg-2);
	font: 500 12px/1 var(--efpm-font);
	color: var(--efpm-fg-2);
}
/* Info-only legend variant (v1.1.4) — no hover, no cursor */
.efpm__status-chips--info .efpm__chip-status {
	cursor: default;
	user-select: none;
}
.efpm__chip-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--c, var(--efpm-fg-3));
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--efpm-fg-3)) 22%, transparent);
}

/* Floor tabs */
.efpm__floor-tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: var(--efpm-bg-3);
	border: 1px solid var(--efpm-border);
	border-radius: 12px;
	margin-top: 6px;
	width: max-content;
	max-width: 100%;
	overflow-x: auto;
}
.efpm__floor-tab {
	all: unset;
	padding: 8px 16px;
	font: 500 13px/1 var(--efpm-font);
	color: var(--efpm-fg-2);
	border-radius: 8px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .18s var(--efpm-ease), color .18s var(--efpm-ease);
}
.efpm__floor-tab:hover { color: var(--efpm-fg); }
.efpm__floor-tab.is-active {
	background: var(--efpm-bg-2);
	color: var(--efpm-fg);
	box-shadow: 0 1px 2px rgba(15, 17, 21, .06);
}

/* Status dot lives INSIDE the title as an inline-flex sibling — guaranteed
   to be vertically centered with the text via align-items: center on parent. */
.efpm__exh-status-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--c, var(--efpm-fg-3));
	flex-shrink: 0;
}

/* ---------- Stage ---------- */
.efpm__stage {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding: 18px;
}
@media (min-width: 1024px) {
	.efpm__stage {
		grid-template-columns: minmax(0, 1fr) 320px;
		padding: 22px 26px 26px;
		gap: 22px;
	}
}

.efpm__viewport {
	position: relative;
	width: 100%;
	aspect-ratio: var(--efpm-aspect, 16 / 9);
	overflow: hidden;
	border-radius: 14px;
	background:
		radial-gradient(800px 400px at 0% 0%, rgba(255,255,255,.012), transparent),
		var(--efpm-bg-2);
	border: 1px solid var(--efpm-border);
	box-shadow:
		inset 0 0 0 1px rgba(255,255,255,.02),
		0 1px 2px rgba(15, 17, 21, .04),
		0 12px 32px rgba(15, 17, 21, .08);
	touch-action: none;
}
.efpm__pannable {
	position: absolute;
	inset: 0;
	transform-origin: 0 0;
	transition: transform .25s var(--efpm-ease);
	will-change: transform;
}
.efpm__pannable.is-dragging { transition: none; }
.efpm__plan-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}
.efpm__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}
.efpm__overlay > * { pointer-events: auto; }
.efpm__viewport-empty {
	position: absolute;
	inset: auto 0 16px;
	margin: auto;
	width: max-content;
	max-width: 88%;
	padding: 10px 18px;
	background: var(--efpm-glass);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--efpm-border);
	border-radius: 999px;
	font-size: 13px;
	color: var(--efpm-fg-2);
	left: 0; right: 0;
	text-align: center;
	pointer-events: none;
}

/* Booth shapes — info-only (v1.1.4): hover tooltip, no click */
.efpm-booth {
	cursor: default;
	transition: filter .2s var(--efpm-ease), opacity .2s var(--efpm-ease);
	transform-box: fill-box;
	transform-origin: center;
}
.efpm-booth__fill { transition: fill .2s var(--efpm-ease); }
.efpm-booth__stroke {
	fill: none;
	stroke: var(--efpm-accent);
	stroke-width: .15;
	opacity: 0;
	transition: opacity .2s var(--efpm-ease);
	pointer-events: none;
}
.efpm-booth:hover { filter: brightness(1.08); }
.efpm-booth:hover .efpm-booth__stroke,
.efpm-booth.is-active .efpm-booth__stroke { opacity: 1; }
.efpm-booth.is-dim { opacity: .25; }
.efpm-booth__label {
	font: 500 1.6px/1 var(--efpm-font);
	fill: var(--efpm-fg);
	pointer-events: none;
	text-anchor: middle;
	dominant-baseline: middle;
	user-select: none;
}

/* Tooltip */
.efpm__tooltip {
	position: absolute;
	z-index: 4;
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--efpm-bg-2);
	border: 1px solid var(--efpm-border);
	box-shadow: var(--efpm-shadow-2);
	font-size: 13px;
	color: var(--efpm-fg);
	pointer-events: none;
	white-space: nowrap;
	transform: translate(-50%, -120%);
	opacity: 0;
	transition: opacity .15s var(--efpm-ease);
}
.efpm__tooltip.is-visible { opacity: 1; }
.efpm__tooltip strong { font-weight: 600; }
.efpm__tooltip small { color: var(--efpm-fg-3); margin-left: 6px; font-weight: 400; }

/* Zoom controls */
.efpm__zoom-controls {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	background: var(--efpm-glass);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border: 1px solid var(--efpm-border);
	border-radius: 999px;
	box-shadow: var(--efpm-shadow-1);
	font-size: 13px;
}
.efpm__zoom-controls button {
	all: unset;
	width: 36px; height: 36px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 500;
	color: var(--efpm-fg);
	transition: background .2s var(--efpm-ease);
}
.efpm__zoom-controls button:hover { background: var(--efpm-border); }
.efpm__zoom-controls span { padding: 0 8px; min-width: 56px; text-align: center; color: var(--efpm-fg-2); }

/* ---------- Sidebar ---------- */
.efpm__sidebar {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}
.efpm__sb-card {
	border: 1px solid var(--efpm-border);
	border-radius: 14px;
	background: var(--efpm-bg-2);
	padding: 16px;
	box-shadow: 0 1px 2px rgba(15, 17, 21, .04);
}
.efpm__sb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}
.efpm__sb-title {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--efpm-fg-3);
}
.efpm__sb-count {
	font-size: 11px;
	color: var(--efpm-fg-3);
	background: var(--efpm-bg-3);
	border-radius: 999px;
	padding: 2px 8px;
	font-feature-settings: 'tnum';
}

/* Mini-map */
.efpm__minimap-frame {
	position: relative;
	aspect-ratio: var(--efpm-aspect, 16 / 9);
	width: 100%;
	background: var(--efpm-bg-3);
	border-radius: var(--efpm-radius-sm);
	border: 1px solid var(--efpm-border);
	overflow: hidden;
	cursor: pointer;
}
.efpm__minimap-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.efpm__minimap-vp {
	position: absolute;
	border: 2px solid var(--efpm-accent);
	border-radius: 4px;
	background: color-mix(in srgb, var(--efpm-accent) 8%, transparent);
	pointer-events: none;
}
.efpm__minimap-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--efpm-fg-3);
	font-size: 18px;
	pointer-events: none;
}

/* Exhibitor list */
.efpm__sb-empty {
	color: var(--efpm-fg-3);
	font-size: 13px;
	text-align: center;
	padding: 14px 8px;
	margin: 0;
}
.efpm__exh-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 460px;
	overflow-y: auto;
	margin-right: -8px;
	padding-right: 8px;
}
.efpm__exh-item {
	all: unset;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	border-radius: 4px;
	cursor: pointer;
	transition: background .15s var(--efpm-ease);
	width: 100%;
	box-sizing: border-box;
}
.efpm__exh-item:hover {
	background: color-mix(in srgb, var(--efpm-fg) 4%, transparent);
}
.efpm__exh-item:hover,
.efpm__exh-item:focus-visible {
	background: var(--efpm-bg-3);
	border-color: var(--efpm-border);
	outline: none;
}
/* (avatar styling now lives in .efpm__exh-avatar above) */
.efpm__exh-item.is-hidden { display: none; }
.efpm__exh-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--efpm-fg);
	letter-spacing: -.005em;
	min-width: 0;
}
.efpm__exh-title-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}
.efpm__exh-sub {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--efpm-fg-3);
	overflow: hidden;
	padding-left: 18px; /* dot width (8) + gap (10) — aligns with title text */
}
.efpm__exh-country { white-space: nowrap; }
.efpm__exh-sep { opacity: .5; }
.efpm__exh-booths {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.efpm__exh-list::-webkit-scrollbar { width: 6px; }
.efpm__exh-list::-webkit-scrollbar-thumb { background: var(--efpm-border-2); border-radius: 6px; }

/* ---------- Modal ---------- */
.efpm__modal {
	width: min(96vw, 720px);
	max-height: 92dvh;
	border: 1px solid var(--efpm-border);
	border-radius: 18px;
	background: var(--efpm-bg-2);
	color: var(--efpm-fg);
	font-family: var(--efpm-font);
	box-shadow: var(--efpm-shadow-3);
	padding: 0;
	overflow: hidden;
	margin: auto;
}
.efpm__modal::backdrop {
	background: var(--efpm-overlay);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.efpm__modal[open] {
	animation: efpmModalIn .25s var(--efpm-ease) both;
}
@keyframes efpmModalIn {
	from { opacity: 0; transform: translateY(8px) scale(.985); }
	to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.efpm__modal-close {
	position: absolute;
	top: 14px; right: 14px;
	width: 38px; height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	border: 1px solid var(--efpm-border);
	background: var(--efpm-bg-2);
	color: var(--efpm-fg);
	cursor: pointer;
	z-index: 2;
	transition: background .2s var(--efpm-ease);
}
.efpm__modal-close:hover { background: var(--efpm-bg-3); }
.efpm__modal-close svg { width: 18px; height: 18px; }

.efpm__modal-body {
	padding: 28px 28px 24px;
	overflow-y: auto;
	max-height: 92dvh;
}
@media (min-width: 768px) { .efpm__modal-body { padding: 36px 40px 32px; } }

.efpm__modal-skeleton {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.efpm__modal-skeleton > div {
	height: 16px;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--efpm-border) 0%, var(--efpm-border-2) 50%, var(--efpm-border) 100%);
	background-size: 200% 100%;
	animation: efpm-shimmer 1.4s infinite linear;
}
.efpm__modal-skeleton > div:nth-child(1) { width: 60%; height: 24px; }
.efpm__modal-skeleton > div:nth-child(3) { width: 40%; }
@keyframes efpm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.efpm__card { display: flex; flex-direction: column; gap: 22px; }
.efpm__card-head { display: flex; align-items: center; gap: 16px; }

/* Stacked variant — logo on top centered, title below (v1.1.4) */
.efpm__card-head--stacked {
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
	padding-top: 8px;
	padding-bottom: 6px;
}
.efpm__card-head--stacked .efpm__card-logo {
	width: 96px;
	height: 96px;
	padding: 8px;
}
.efpm__card-title {
	font-size: clamp(22px, 2.8vw, 28px);
	font-weight: 500;
	letter-spacing: -.015em;
	margin: 0;
	line-height: 1.15;
	color: var(--efpm-fg);
	text-align: center;
}
.efpm__card-head--stacked .efpm__card-tags { justify-content: center; }

.efpm__card-logo {
	width: 64px; height: 64px;
	border-radius: 14px;
	border: 1px solid var(--efpm-border);
	background: var(--efpm-bg-3);
	object-fit: contain;
	flex-shrink: 0;
}
.efpm__card-meta { min-width: 0; }
.efpm__card-meta h3 {
	font-size: clamp(20px, 2.6vw, 26px);
	font-weight: 500;
	letter-spacing: -.01em;
	margin: 0 0 4px;
	line-height: 1.2;
}
.efpm__card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	font-size: 13px;
	color: var(--efpm-fg-2);
}
.efpm__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--efpm-bg-3);
	border: 1px solid var(--efpm-border);
	font-size: 12px;
	color: var(--efpm-fg-2);
}
.efpm__tag .efpm__swatch { width: 8px; height: 8px; border-radius: 50%; }

.efpm__card-desc { color: var(--efpm-fg-2); font-size: 15px; line-height: 1.6; }
.efpm__card-desc p { margin: 0 0 .8em; }
.efpm__card-desc :last-child { margin-bottom: 0; }

.efpm__card-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.efpm__card-list a {
	color: var(--efpm-fg);
	text-decoration: none;
	border-bottom: 1px solid var(--efpm-border);
	padding-bottom: 1px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: max-content;
}
.efpm__card-list a:hover { border-color: var(--efpm-fg); }
.efpm__card-list svg { width: 16px; height: 16px; flex-shrink: 0; }

.efpm__card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.efpm__card-grid img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--efpm-radius-sm);
	border: 1px solid var(--efpm-border);
}

.efpm__cta { display: flex; flex-wrap: wrap; gap: 10px; }
/* High-specificity selectors so the host theme (Salient, Astra, etc.) cannot
   override link / button color. The modal lives inside a <dialog> which
   browsers render in the top layer — but cascade still applies, and
   themes commonly target `a { color: #fff }` and steal our text. */
.efpm a.efpm__btn,
.efpm button.efpm__btn,
.efpm__modal a.efpm__btn,
.efpm__modal button.efpm__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 22px;
	border-radius: 10px;
	font: 500 14px/1 var(--efpm-font);
	cursor: pointer;
	transition: transform .15s var(--efpm-ease), background .2s var(--efpm-ease), border-color .2s var(--efpm-ease), opacity .2s;
	text-decoration: none !important;
	border: 1px solid var(--efpm-accent);
	background: var(--efpm-accent);
	color: var(--efpm-accent-fg) !important;
	box-shadow: none;
	letter-spacing: .005em;
}
.efpm a.efpm__btn:hover,
.efpm button.efpm__btn:hover,
.efpm__modal a.efpm__btn:hover,
.efpm__modal button.efpm__btn:hover {
	transform: translateY(-1px);
	color: var(--efpm-accent-fg) !important;
	opacity: .92;
}
.efpm a.efpm__btn--ghost,
.efpm button.efpm__btn--ghost,
.efpm__modal a.efpm__btn--ghost,
.efpm__modal button.efpm__btn--ghost {
	background: transparent;
	color: var(--efpm-fg) !important;
	border-color: var(--efpm-border-2);
}
.efpm a.efpm__btn--ghost:hover,
.efpm button.efpm__btn--ghost:hover {
	background: var(--efpm-bg-3);
	color: var(--efpm-fg) !important;
}
.efpm__btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.efpm__section-title {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--efpm-fg-3);
	font-weight: 500;
	margin: 0 0 10px;
}
.efpm__socials { display: flex; flex-wrap: wrap; gap: 8px; }
.efpm__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	border: 1px solid var(--efpm-border);
	border-radius: 999px;
	color: var(--efpm-fg);
	transition: background .2s var(--efpm-ease);
}
.efpm__social:hover { background: var(--efpm-bg-3); }
.efpm__social svg { width: 16px; height: 16px; }

.efpm__related { display: flex; flex-wrap: wrap; gap: 6px; }
.efpm__chip {
	all: unset;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 12px;
	border: 1px solid var(--efpm-border);
	border-radius: 999px;
	color: var(--efpm-fg-2);
	transition: background .2s var(--efpm-ease), border-color .2s var(--efpm-ease);
}
.efpm__chip:hover {
	background: var(--efpm-bg-3);
	border-color: var(--efpm-border-2);
	color: var(--efpm-fg);
}

/* Empty state */
.efpm-empty {
	padding: 40px;
	text-align: center;
	color: var(--efpm-fg-3);
	font-size: 14px;
}

/* Fullscreen */
.efpm.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 99999;
	border-radius: 0;
	height: 100dvh;
	display: flex;
	flex-direction: column;
}
.efpm.is-fullscreen .efpm__stage { flex: 1; min-height: 0; }
.efpm.is-fullscreen .efpm__viewport { height: 100%; aspect-ratio: auto; }

/* Print */
@media print {
	.efpm__controls,
	.efpm__zoom-controls,
	.efpm__sidebar,
	.efpm__bg { display: none !important; }
	.efpm { border: none; }
}

/* Translation-fallback notice (v1.2.0) */
.efpm__fallback-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	margin: 0 0 14px;
	border-radius: 10px;
	background: color-mix(in srgb, #f59e0b 14%, transparent);
	border: 1px solid color-mix(in srgb, #f59e0b 38%, transparent);
	color: var(--efpm-fg);
	font-size: 13px;
	line-height: 1.45;
}
.efpm__fallback-notice svg { width: 18px; height: 18px; flex-shrink: 0; color: #f59e0b; }

/* Brief excerpt under modal title */
.efpm__excerpt {
	font-size: 15px;
	line-height: 1.55;
	color: var(--efpm-fg-2);
	margin: 0;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--efpm-border);
}

/* Gallery thumbs become clickable */
.efpm__card-grid img {
	cursor: zoom-in;
	transition: transform .2s var(--efpm-ease), opacity .2s var(--efpm-ease);
}
.efpm__card-grid img:hover { transform: scale(1.03); }

/* Lightbox — defaults to fully inert so it can't ever steal clicks. */
.efpm__lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, .92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none; /* clicks pass through unless .is-open */
	visibility: hidden;   /* extra safety: never render hit-area */
	transition: opacity .2s var(--efpm-ease), visibility 0s linear .2s;
}
.efpm__lightbox[hidden] { display: none !important; }
.efpm__lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transition: opacity .2s var(--efpm-ease), visibility 0s linear 0s;
}
.efpm__lightbox img {
	max-width: 95vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 30px 80px rgba(0,0,0,.6);
	cursor: zoom-out;
}
.efpm__lightbox-close {
	position: fixed;
	top: 22px;
	right: 22px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	border: 1px solid rgba(255,255,255,.18);
	background: rgba(255,255,255,.06);
	color: #fff;
	cursor: pointer;
	transition: background .2s var(--efpm-ease);
}
.efpm__lightbox-close:hover { background: rgba(255,255,255,.14); }
.efpm__lightbox-close svg { width: 20px; height: 20px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.efpm,
	.efpm * { animation-duration: .001s !important; transition-duration: .001s !important; }
}
