.im2p-wrap {
	max-width: 800px;
	margin: 0 auto;
}
.im2p-intro {
	background: #e7f3fe;
	border: 1px solid #b6d4fe;
	padding: 12px 15px;
	margin-bottom: 20px;
}
.im2p-progress {
	font-weight: bold;
	margin-bottom: 10px;
}
.im2p-question {
	border: 1px solid #ddd;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}
.im2p-image-pair {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.im2p-image-option {
	display: block;
	max-width: 320px;
	flex: 1 1 260px;
}
.im2p-zoom-hint {
	font-size: 0.9em;
	color: #666;
	margin: 0 0 8px;
}

/* Fixed-size thumbnail frame: both images in a pair always render at the
   same box size regardless of their original dimensions. object-fit:
   contain keeps the whole image visible (nothing cropped off), letterboxed
   inside the frame instead of stretched or unevenly sized. */
.im2p-thumb {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #f3f3f3;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	cursor: zoom-in;
	margin-bottom: 8px;
}
.im2p-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.im2p-zoom-icon {
	position: absolute;
	bottom: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	line-height: 24px;
	text-align: center;
	background: rgba( 0, 0, 0, 0.6 );
	color: #fff;
	border-radius: 50%;
	font-size: 18px;
	font-weight: bold;
	pointer-events: none;
}
.im2p-image-single .im2p-thumb {
	max-width: 420px;
	aspect-ratio: 4 / 3;
}

/* Lightbox overlay */
.im2p-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 30px;
}
.im2p-lightbox.im2p-lightbox-open {
	display: flex;
}
.im2p-lightbox-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 4px 30px rgba( 0, 0, 0, 0.5 );
}
.im2p-lightbox-close {
	position: absolute;
	top: 16px;
	right: 24px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 10px;
}
body.im2p-lightbox-active {
	overflow: hidden;
}
.im2p-option {
	display: block;
	margin: 4px 0;
}
.im2p-result {
	padding: 10px;
	margin-bottom: 10px;
	border-left: 4px solid #ccc;
}
.im2p-result.im2p-correct {
	border-left-color: #46b450;
	background: #f0f9f1;
}
.im2p-result.im2p-incorrect {
	border-left-color: #dc3232;
	background: #fdf0f0;
}
