.ivp-wrapper {
	max-width: 100%;
	margin: 20px 0;
	font-family: inherit;
	position: relative;
	z-index: 0;
	padding: 16px;
	border-radius: 10px;
}

.ivp-bg-layer {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 10px;
	pointer-events: none;
}

.ivp-counter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #eef6ff;
	border: 1px solid #cfe3fb;
	border-radius: 20px;
	padding: 6px 16px;
	font-weight: 600;
	color: #1e88e5;
	margin-bottom: 16px;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ivp-counter.ivp-counter-complete {
	background: #edfaef;
	border-color: #b7e4bd;
	color: #1e5b26;
}

.ivp-difficulty {
	font-size: 18px;
	letter-spacing: 2px;
	color: #f5a623;
	margin-bottom: 16px;
}

/* Kindvriendelijk uitlegblokje */
.ivp-kids-help {
	display: flex;
	align-items: center;
	gap: 14px;
	background: linear-gradient(135deg, #fff3b0, #ffd166);
	border: 3px dashed #f4a300;
	border-radius: 16px;
	padding: 14px 18px;
	font-size: 15px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.ivp-kids-help-icon {
	font-size: 28px;
	flex: 0 0 auto;
}

.ivp-kids-help-text {
	flex: 1 1 220px;
	color: #5c3d00;
	line-height: 1.5;
}

.ivp-kids-help-text strong {
	color: #a15c00;
}

.ivp-demo-tag {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 4px;
	font-weight: 700;
	color: #fff;
}

.ivp-demo-tag-red {
	background: #e53935;
}

.ivp-demo-tag-key {
	background: #999;
}

.ivp-kids-help-demo {
	display: flex;
	gap: 4px;
	flex: 0 0 auto;
}

.ivp-demo-cell {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 2px solid #333;
	border-radius: 6px;
	font-weight: 700;
	font-size: 16px;
}

.ivp-demo-cell-key {
	background: #ccc;
}

/* Indeling: vragenlijst links/rechts/onder */
.ivp-puzzle-row {
	display: block;
}

.ivp-puzzle-row.ivp-layout-links,
.ivp-puzzle-row.ivp-layout-rechts {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.ivp-puzzle-row.ivp-layout-links .ivp-cluelist,
.ivp-puzzle-row.ivp-layout-rechts .ivp-cluelist {
	flex: 1 1 260px;
	max-width: 360px;
}

/* Zoom */
.ivp-zoom-outer {
	display: inline-block;
	overflow: visible;
}

.ivp-grid-stage {
	position: relative;
	display: inline-block;
	margin-bottom: 20px;
	transform-origin: top left;
	transition: transform 0.12s ease;
}

.ivp-zoom-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.ivp-zoom-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #ccc;
	background: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
}

.ivp-zoom-btn:hover {
	background: #f0f0f0;
}

.ivp-zoom-slider {
	width: 140px;
}

.ivp-zoom-value {
	font-size: 13px;
	color: #555;
	min-width: 42px;
}

/* Rooster: losse rijen, elk met een eigen horizontale verschuiving zodat
   de sleutelkolom overal uitkomt. */
.ivp-rows {
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: fit-content;
}

.ivp-row {
	display: flex;
	align-items: stretch;
}

.ivp-row-label {
	flex: 0 0 40px;
	display: flex;
	align-items: center;
	font-size: 18px;
	font-weight: 700;
	color: #333;
}

.ivp-row-cells {
	display: flex;
	gap: 2px;
	background: #ddd;
	border: 2px solid #333;
	width: fit-content;
	touch-action: manipulation;
}

.ivp-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #fff;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	text-transform: uppercase;
	-webkit-user-select: none;
	user-select: none;
	color: #222;
}

.ivp-cell.ivp-cell-key {
	background: #ccc;
}

.ivp-cell.ivp-cell-active {
	background: #cfe8ff;
	outline: 2px solid #1e88e5;
	outline-offset: -2px;
}

.ivp-cell.ivp-cell-key.ivp-cell-active {
	background: #9fd0ff;
}

.ivp-cell.ivp-cell-correct {
	color: #1e5b26;
}

.ivp-cell.ivp-cell-incorrect {
	background: #ffcdd2;
	color: #b32d2e;
	animation: ivp-shake 0.25s ease;
}

@keyframes ivp-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-2px); }
	75% { transform: translateX(2px); }
}

.ivp-answer-key .ivp-cell {
	cursor: default;
}

/* Vragenlijst */
.ivp-cluelist-list {
	margin: 8px 0 0 22px;
	padding: 0;
}

.ivp-cluelist-list li {
	margin-bottom: 8px;
	line-height: 1.5;
}

/* Oplossing-invoer (het geheime woord) */
.ivp-solution-box {
	margin-top: 20px;
	padding: 14px 18px;
	background: #f7f9fc;
	border: 1px solid #e0e6ef;
	border-radius: 10px;
}

.ivp-solution-box label {
	font-weight: 600;
	display: block;
	margin-bottom: 8px;
}

.ivp-solution-row {
	display: flex;
	gap: 8px;
}

.ivp-solution-input {
	flex: 1;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.ivp-solution-check {
	padding: 8px 16px;
	border: none;
	background: #2271b1;
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
}

.ivp-solution-check:hover {
	background: #135e96;
}

.ivp-solution-feedback {
	margin-top: 8px;
	font-weight: 600;
	min-height: 20px;
}

.ivp-solution-feedback.ivp-solution-correct {
	color: #1e5b26;
}

.ivp-solution-feedback.ivp-solution-incorrect {
	color: #b32d2e;
}

.ivp-solution-answer {
	margin-top: 16px;
	padding: 10px 14px;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 4px;
	font-size: 15px;
}

.ivp-feedback {
	margin-top: 12px;
	font-weight: 600;
	min-height: 20px;
}
