.mmuv-puzzle {
	--mmuv-ink: #17202a;
	--mmuv-blue: #1769d1;
	--mmuv-green: #14853b;
	--mmuv-red: #c92a2a;
	background: #fff;
	border: 1px solid #d9dee5;
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(23, 32, 42, .08);
	box-sizing: border-box;
	color: var(--mmuv-ink);
	margin: 1.5em auto;
	max-width: 920px;
	padding: clamp(18px, 4vw, 36px);
	width: 100%;
}

.mmuv-puzzle *,
.mmuv-puzzle *::before,
.mmuv-puzzle *::after { box-sizing: border-box; }

.mmuv-puzzle__title { margin: 0 0 .35em; }
.mmuv-puzzle__instructions { margin: 0 0 1.25em; }

.mmuv-puzzle__game {
	align-items: center;
	display: grid;
	gap: clamp(20px, 4vw, 46px);
	grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
}

.mmuv-puzzle__drawing svg {
	display: block;
	height: auto;
	margin: auto;
	max-height: 330px;
	width: 100%;
}

.mmuv-gallows,
.mmuv-person {
	fill: none;
	stroke: var(--mmuv-ink);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 8;
}

.mmuv-gallows { stroke: #65717e; }
.mmuv-part { opacity: 0; transition: opacity .2s ease; }
.mmuv-part.is-visible { opacity: 1; }
.is-lost .mmuv-person { stroke: var(--mmuv-red); }

.mmuv-puzzle__round {
	color: #65717e;
	font-size: .9em;
	font-weight: 700;
	letter-spacing: .05em;
	margin-bottom: 10px;
	text-transform: uppercase;
}

.mmuv-puzzle__word {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	justify-content: center;
	margin: 4px 0 22px;
	min-height: 52px;
}

.mmuv-word-group {
	display: inline-flex;
	gap: clamp(4px, 1vw, 8px);
}

.mmuv-word-space { display: none; }

.mmuv-word-letter {
	align-items: center;
	border-bottom: 4px solid var(--mmuv-ink);
	display: inline-flex;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(24px, 5vw, 38px);
	font-weight: 800;
	height: 50px;
	justify-content: center;
	line-height: 1;
	min-width: clamp(22px, 4.6vw, 36px);
}

.is-won .mmuv-word-letter { border-color: var(--mmuv-green); color: var(--mmuv-green); }
.is-lost .mmuv-word-letter { border-color: var(--mmuv-red); color: var(--mmuv-red); }

.mmuv-puzzle__status {
	font-weight: 700;
	margin: 0 0 16px;
	min-height: 1.5em;
	text-align: center;
}

.is-won .mmuv-puzzle__status { color: var(--mmuv-green); }
.is-lost .mmuv-puzzle__status { color: var(--mmuv-red); }

.mmuv-puzzle__keyboard {
	display: grid;
	gap: 7px;
	grid-template-columns: repeat(9, minmax(32px, 1fr));
	margin: auto;
	max-width: 560px;
}

.mmuv-key {
	align-items: center;
	appearance: none;
	background: #f5f7fa;
	border: 2px solid #aeb7c2;
	border-radius: 7px;
	color: var(--mmuv-ink);
	cursor: pointer;
	display: flex;
	font: 800 clamp(15px, 2.2vw, 20px)/1 Arial, Helvetica, sans-serif;
	height: 44px;
	justify-content: center;
	padding: 0;
	touch-action: manipulation;
}

.mmuv-key:hover:not(:disabled),
.mmuv-key:focus-visible { background: #e8f1ff; border-color: var(--mmuv-blue); outline: 2px solid transparent; }
.mmuv-key:disabled { cursor: default; opacity: .72; }
.mmuv-key.is-correct { background: #e7f7eb; border-color: var(--mmuv-green); color: #075a24; }
.mmuv-key.is-wrong { background: #fff0f0; border-color: var(--mmuv-red); color: #941b1b; text-decoration: line-through; }

.mmuv-puzzle__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 18px;
}

.mmuv-puzzle__button {
	appearance: none;
	background: #fff;
	border: 2px solid var(--mmuv-ink);
	border-radius: 7px;
	color: var(--mmuv-ink);
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: .58em 1em;
}

.mmuv-puzzle__button:hover,
.mmuv-puzzle__button:focus-visible { border-color: var(--mmuv-blue); color: var(--mmuv-blue); }
.mmuv-next { background: var(--mmuv-blue); border-color: var(--mmuv-blue); color: #fff; }

@media (max-width: 720px) {
	.mmuv-puzzle__game { grid-template-columns: 1fr; }
	.mmuv-puzzle__drawing { margin: auto; max-width: 210px; width: 55%; }
	.mmuv-puzzle__keyboard { grid-template-columns: repeat(7, minmax(34px, 1fr)); }
}

@media (max-width: 430px) {
	.mmuv-puzzle { border-radius: 8px; padding: 16px 12px; }
	.mmuv-puzzle__drawing { max-width: 165px; }
	.mmuv-puzzle__keyboard { gap: 5px; grid-template-columns: repeat(6, minmax(34px, 1fr)); }
	.mmuv-key { height: 42px; }
	.mmuv-word-letter { border-bottom-width: 3px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.mmuv-part { transition: none; }
}
