html, body.hcis-hangman-embed {
	margin: 0;
	padding: 0;
	background: #f5f6fa;
	min-height: 100vh;
}

body.hcis-hangman-embed {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 20px 12px;
	box-sizing: border-box;
}

.hcis-hangman {
	position: relative;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	padding: 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: center;
	box-sizing: border-box;
}

.hcis-hangman * {
	box-sizing: border-box;
}

.hcis-hangman__board {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 12px;
}

.hcis-hangman__figure {
	width: 160px;
	height: 176px;
}

.hh-part {
	fill: none;
	stroke: #2b2f38;
	stroke-width: 5;
	stroke-linecap: round;
}

.hh-guess {
	opacity: 0;
	transition: opacity 0.2s ease-in;
}

.hh-guess.hh-visible {
	opacity: 1;
}

.hcis-hangman__status {
	margin-top: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	font-weight: 600;
	flex-wrap: wrap;
}

.hcis-hangman__lives-label {
	color: #d64545;
}

.hcis-hangman__score-label {
	color: #3a5ad9;
}

.hcis-hangman__hint {
	font-style: italic;
	color: #666;
	min-height: 20px;
	margin-bottom: 10px;
}

.hcis-hangman__word {
	font-size: 1.3rem;
	letter-spacing: 0.15rem;
	font-weight: 700;
	margin: 16px 0;
	overflow-wrap: break-word;
	white-space: pre-wrap;
	line-height: 1.6;
}

/* A single real word — never allowed to break across lines. */
.hcis-hangman__word .hh-word-chunk {
	white-space: nowrap;
}

.hcis-hangman__word .hh-word-gap {
	display: inline-block;
	width: 0.75rem;
}

.hcis-hangman__keyboard {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-bottom: 16px;
}

.hcis-hangman__key {
	width: 36px;
	height: 40px;
	border: none;
	border-radius: 6px;
	background: #eef0f4;
	font-weight: 700;
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.15s ease;
}

.hcis-hangman__key:hover:not(:disabled) {
	background: #d8ddf5;
}

.hcis-hangman__key.correct {
	background: #4caf7d;
	color: #fff;
}

.hcis-hangman__key.wrong {
	background: #e05c5c;
	color: #fff;
}

.hcis-hangman__key:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.hcis-hangman__message {
	min-height: 28px;
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 8px;
}

.hcis-hangman__message.win {
	color: #2e9e5b;
}

.hcis-hangman__message.lose {
	color: #d64545;
}

.hcis-hangman__btn {
	background: #3a5ad9;
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
	font-size: 0.95rem;
}

.hcis-hangman__btn:hover {
	background: #2c47b0;
}

.hcis-hangman__complete-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.97);
	border-radius: 12px;
	overflow: hidden;
	z-index: 10;
}

.hcis-hangman__complete-overlay[hidden] {
	display: none;
}

.hcis-hangman__confetti {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hcis-hangman__complete-content {
	position: relative;
	z-index: 1;
	padding: 24px;
}

.hcis-hangman__complete-text {
	font-size: 1.7rem;
	font-weight: 800;
	line-height: 1.35;
	margin-bottom: 22px;
	color: #2e9e5b;
}

/* Shown when the round score is 50% or below — still encouraging, just
   without the confetti and win-green styling. */
.hcis-hangman__complete-overlay.hh-encourage .hcis-hangman__complete-text {
	color: #cf7f1e;
}

.hcis-hangman__btn--big {
	font-size: 1.15rem;
	padding: 14px 34px;
}
