.mmub-puzzle {
	--mmub-blue: #1769d1;
	--mmub-green: #14853b;
	box-sizing: border-box;
	margin: 1.5em auto;
	max-width: 720px;
	width: 100%;
}

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

.mmub-puzzle__title {
	margin-bottom: .35em;
}

.mmub-puzzle__instructions {
	margin: 0 0 1em;
}

.mmub-puzzle__grid {
	aspect-ratio: 1;
	background: #171717;
	border: 2px solid #171717;
	display: grid;
	grid-template-columns: repeat(var(--mmub-grid-size, 10), 1fr);
	gap: 1px;
	overscroll-behavior: none;
	touch-action: none !important;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	width: 100%;
}

.mmub-puzzle__cell {
	align-items: center;
	aspect-ratio: 1;
	background: #fff;
	border: 3px solid transparent;
	color: #111;
	display: flex;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(14px, 5.4vw, 34px);
	font-weight: 700;
	justify-content: center;
	line-height: 1;
	transition: border-color .08s ease, color .15s ease, background-color .15s ease;
}

.mmub-puzzle__cell.is-found {
	background: #e7f7eb;
	border-color: var(--mmub-green);
	color: var(--mmub-green);
}

.mmub-puzzle__cell.is-hint {
	background: #e8f1ff;
	border-color: var(--mmub-blue);
	color: var(--mmub-blue);
}

.mmub-puzzle__cell.is-selecting {
	background: #e8f1ff;
	border-color: var(--mmub-blue);
	color: var(--mmub-blue);
}

.mmub-puzzle__toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.mmub-puzzle__button {
	background: #fff;
	border: 2px solid #222;
	border-radius: 4px;
	color: #111;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: .55em 1em;
}

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

.mmub-puzzle__progress {
	font-weight: 700;
	margin-left: auto;
}

.mmub-puzzle__message {
	background: #e7f7eb;
	border: 2px solid var(--mmub-green);
	border-radius: 5px;
	color: #075a24;
	font-size: 1.15em;
	font-weight: 700;
	margin-top: 16px;
	padding: 14px;
	text-align: center;
}

.mmub-puzzle__words {
	background: #f5f7fa;
	border-radius: 5px;
	margin-top: 16px;
	padding: 14px 16px;
}

.mmub-puzzle__words[hidden] {
	display: none !important;
}

.mmub-puzzle__words.is-visible {
	display: block !important;
}

.mmub-puzzle__word-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.mmub-puzzle__word {
	font-size: clamp(18px, 4vw, 26px);
	font-weight: 800;
	letter-spacing: .04em;
}

.mmub-puzzle__word.is-found {
	color: var(--mmub-green);
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

@media (max-width: 520px) {
	.mmub-puzzle__cell {
		border-width: 2px;
	}

	.mmub-puzzle__progress {
		flex-basis: 100%;
		margin-left: 0;
	}
}
