.mmuhr-game {
	--mmuhr-blue: #1769d1;
	--mmuhr-green: #14853b;
	--mmuhr-red: #b3261e;
	box-sizing: border-box;
	margin: 1.5em auto;
	max-width: 720px;
	position: relative;
	width: 100%;
}

.mmuhr-game *,
.mmuhr-game *::before,
.mmuhr-game *::after {
	box-sizing: border-box;
}

.mmuhr-game__intro,
.mmuhr-game__play,
.mmuhr-finish,
.mmuhr-leaderboard {
	background: #f5f7fa;
	border: 1px solid #d8dee6;
	border-radius: 10px;
	padding: clamp(18px, 4vw, 30px);
}

.mmuhr-game h3,
.mmuhr-game h4 {
	margin-top: 0;
}

.mmuhr-button {
	-webkit-appearance: none;
	background: #fff;
	border: 2px solid #222;
	border-radius: 5px;
	color: #111;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: .65em 1.15em;
}

.mmuhr-button:hover,
.mmuhr-button:focus-visible {
	border-color: var(--mmuhr-blue);
	color: var(--mmuhr-blue);
}

.mmuhr-button:disabled {
	cursor: wait;
	opacity: .55;
}

.mmuhr-start,
.mmuhr-score-form [type="submit"] {
	background: var(--mmuhr-blue);
	border-color: var(--mmuhr-blue);
	color: #fff;
}

.mmuhr-game__meta {
	display: flex;
	flex-wrap: wrap;
	font-size: 1.05em;
	gap: 12px;
	justify-content: space-between;
}

.mmuhr-timer {
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(22px, 6vw, 32px);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
}

.mmuhr-equation {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(32px, 10vw, 64px);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	gap: .25em;
	justify-content: center;
	margin: clamp(22px, 5vw, 42px) 0;
}

.mmuhr-answer-form label,
.mmuhr-score-form label {
	display: block;
	font-weight: 700;
	margin: 12px 0;
}

.mmuhr-answer-row {
	align-items: stretch;
	display: flex;
	gap: 10px;
}

.mmuhr-answer-fields {
	display: flex;
	flex: 1 1 auto;
	gap: clamp(5px, 1.5vw, 10px);
	min-width: 0;
}

.mmuhr-answer,
.mmuhr-score-form input {
	background: #fff;
	border: 2px solid #777;
	border-radius: 5px;
	font: inherit;
	padding: 9px 11px;
	width: 100%;
}

.mmuhr-answer {
	aspect-ratio: 1;
	flex: 1 1 0;
	font-size: clamp(38px, 9vw, 60px);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1;
	min-width: 0;
	padding: 6px 2px;
	text-align: center;
}

.mmuhr-feedback {
	font-weight: 800;
	min-height: 1.6em;
	padding-top: 12px;
}

.mmuhr-feedback.is-success {
	color: var(--mmuhr-green);
}

.mmuhr-feedback.is-error {
	color: var(--mmuhr-red);
}

.mmuhr-feedback.is-info {
	color: var(--mmuhr-blue);
}

.mmuhr-help-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.mmuhr-number-firework {
	height: 0;
	left: 50%;
	pointer-events: none;
	position: absolute;
	top: 35%;
	width: 0;
	z-index: 20;
}

.mmuhr-number-firework span {
	animation: mmuhr-number-burst 1s cubic-bezier(.1, .7, .2, 1) var(--mmuhr-delay) forwards;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(18px, 5vw, 32px);
	font-weight: 900;
	left: 0;
	opacity: 0;
	position: absolute;
	text-shadow: 0 1px 0 #fff;
	top: 0;
	transform: translate(-50%, -50%);
}

@keyframes mmuhr-number-burst {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); }
	15% { opacity: 1; }
	75% { opacity: 1; }
	100% { opacity: 0; transform: translate(calc(-50% + var(--mmuhr-x)), calc(-50% + var(--mmuhr-y))) scale(1.15) rotate(var(--mmuhr-r)); }
}

.mmuhr-finish,
.mmuhr-leaderboard {
	margin-top: 16px;
}

.mmuhr-finish__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 16px;
}

.mmuhr-score-status {
	font-weight: 700;
	margin-top: 10px;
}

.mmuhr-leaderboard ol {
	counter-reset: mmuhr-rank;
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
}

.mmuhr-leaderboard li {
	border-bottom: 1px solid #d6dce2;
	counter-increment: mmuhr-rank;
	display: grid;
	gap: 12px;
	grid-template-columns: 2em 1fr auto;
	padding: 8px 2px;
}

.mmuhr-leaderboard li::before {
	content: counter(mmuhr-rank) ".";
	font-weight: 800;
}

.mmuhr-leaderboard li strong::after {
	content: " pravilnih";
	font-size: .8em;
	font-weight: 400;
}

.mmuhr-leaderboard__empty {
	font-style: italic;
}

.mmuhr-leaderboard sup {
	color: var(--mmuhr-red);
	font-weight: 900;
	margin-left: 2px;
}

.mmuhr-leaderboard__note {
	font-size: .9em;
}

@media (prefers-reduced-motion: reduce) {
	.mmuhr-number-firework {
		display: none;
	}
}

.mmuhr-game [hidden] {
	display: none !important;
}

@media (max-width: 480px) {
	.mmuhr-answer-row {
		align-items: stretch;
		flex-direction: column;
	}

	.mmuhr-answer-row .mmuhr-button {
		width: 100%;
	}
}
