.loi-iv-pm-list {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.loi-iv-pm-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.loi-iv-pm-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	color: oklch(var(--p));
}

.loi-iv-pm-panes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.loi-iv-pm-pane {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	cursor: pointer;
	text-align: left;
}

.loi-iv-pm-pane:focus-visible {
	outline: 2px solid oklch(var(--p));
	outline-offset: 3px;
}

.loi-iv-pm-pane.is-target {
	outline: 3px solid oklch(var(--p));
	outline-offset: 2px;
}

.loi-iv-pm-frame {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 0.5rem;
	background: oklch(var(--b2));
	min-height: 12rem;
}

.loi-iv-pm-frame img {
	display: block;
	width: 100%;
	height: auto;
	min-height: 12rem;
	object-fit: contain;
	pointer-events: none;
}

.loi-iv-pm-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 0.5rem;
	pointer-events: none;
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.loi-iv-pm-pane:hover .loi-iv-pm-overlay,
.loi-iv-pm-pane:focus-visible .loi-iv-pm-overlay {
	opacity: 1;
}

.loi-iv-pm-chip {
	display: inline-flex;
	align-items: center;
	max-width: 80%;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	background: oklch(var(--b1) / 0.78);
	backdrop-filter: blur(8px);
	box-shadow: 0 1px 8px oklch(var(--bc) / 0.12);
}

.loi-iv-pm-overlay-name {
	min-width: 0;
	font-size: 0.8125rem;
	font-weight: 800;
	line-height: 1.2;
	color: oklch(var(--p));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.loi-iv-pm-thumbs {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	overflow-x: auto;
	padding-bottom: 0.25rem;
}

.loi-iv-pm-thumb {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 7.5rem;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 0.5rem;
	background: transparent;
	cursor: pointer;
}

.loi-iv-pm-thumb:focus-visible {
	outline: 2px solid oklch(var(--p));
	outline-offset: 2px;
}

.loi-iv-pm-thumb img {
	display: block;
	width: 100%;
	height: 4.5rem;
	object-fit: cover;
	border-radius: 0.35rem 0.35rem 0 0;
	pointer-events: none;
}

.loi-iv-pm-thumb-label {
	padding: 0.25rem 0.35rem;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

.loi-iv-pm-thumb.is-shown-left,
.loi-iv-pm-thumb.is-shown-right {
	border-color: oklch(var(--p));
}

.loi-iv-pm-thumb:disabled,
.loi-iv-pm-thumb[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.45;
}

.loi-iv-pm-compare.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100vh;
	height: 100dvh;
	padding: 1rem;
	overflow-y: auto;
	background: oklch(var(--b2));
}

.loi-iv-pm-compare.is-fullscreen .loi-iv-pm-toolbar {
	position: sticky;
	top: 0;
	z-index: 1;
	padding-bottom: 0.5rem;
	background: oklch(var(--b2));
}

.loi-iv-pm-compare.is-fullscreen .loi-iv-pm-frame img {
	max-height: min(70vh, 70dvh);
}

html.loi-iv-pm-lock,
body.loi-iv-pm-lock {
	overflow: hidden;
}

@media (max-width: 767px) {
	.loi-iv-pm-panes {
		display: flex;
		flex-direction: column;
	}
}

@media (hover: none) {
	.loi-iv-pm-overlay {
		opacity: 0.92;
	}
}

@media (prefers-reduced-motion: reduce) {
	.loi-iv-pm-overlay {
		transition: none;
	}
}
