:root {
	--ptmg-bg: #fff7ec;
	--ptmg-card: #ffffff;
	--ptmg-main: #c84f1f;
	--ptmg-accent: #234c30;
	--ptmg-text: #241914;
	--ptmg-muted: #493a31;
	--ptmg-danger: #b3261e;
	--ptmg-success: #17642f;
}

.ptmg-game,
.ptmg-game * {
	box-sizing: border-box;
}

.ptmg-game {
	color: var(--ptmg-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.7;
	margin: 24px auto;
	max-width: 920px;
}

.ptmg-card {
	background:
		linear-gradient(135deg, rgba(232, 111, 44, 0.18), rgba(47, 93, 58, 0.13)),
		var(--ptmg-bg);
	border: 1px solid rgba(45, 36, 31, 0.2);
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(45, 36, 31, 0.12);
	padding: 28px;
}

.ptmg-title {
	font-size: clamp(1.45rem, 3vw, 2rem);
	line-height: 1.3;
	margin: 0 0 12px;
}

.ptmg-lead,
.ptmg-level-description,
.ptmg-result-comment,
.ptmg-advice,
.ptmg-feedback-text {
	color: var(--ptmg-muted);
	margin: 0 0 16px;
}

.ptmg-level-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 22px;
}

.ptmg-level-card {
	background: var(--ptmg-card);
	border: 1px solid rgba(45, 36, 31, 0.2);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
}

.ptmg-level-name {
	color: var(--ptmg-text);
	font-size: 1.05rem;
	line-height: 1.45;
	margin: 0;
}

.ptmg-level-description {
	flex: 1;
	font-size: 0.95rem;
}

.ptmg-eyebrow,
.ptmg-question-label,
.ptmg-result-level,
.ptmg-result-small,
.ptmg-result-caption {
	color: var(--ptmg-muted);
	font-size: 0.92rem;
	margin: 0 0 8px;
}

.ptmg-question-header {
	align-items: center;
	display: flex;
	gap: 14px;
	margin-bottom: 8px;
}

.ptmg-question {
	font-size: clamp(1.2rem, 2.4vw, 1.55rem);
	line-height: 1.55;
	margin: 0 0 18px;
}

.ptmg-notice {
	background: rgba(255, 255, 255, 0.86);
	border: 1px solid rgba(35, 76, 48, 0.24);
	border-left: 5px solid var(--ptmg-accent);
	border-radius: 8px;
	color: var(--ptmg-text);
	font-size: 0.94rem;
	font-weight: 700;
	margin: 0 0 18px;
	padding: 12px 14px;
	white-space: pre-line;
}

.ptmg-choices {
	display: grid;
	gap: 10px;
}

.ptmg-choice,
.ptmg-button,
.ptmg-level-button {
	appearance: none;
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	min-height: 46px;
	padding: 11px 16px;
	text-align: left;
	text-decoration: none;
	transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ptmg-choice {
	background: var(--ptmg-card);
	border-color: rgba(45, 36, 31, 0.24);
	color: var(--ptmg-text);
	width: 100%;
}

.ptmg-choice:hover:not(:disabled),
.ptmg-button:hover,
.ptmg-level-button:hover {
	transform: translateY(-1px);
}

.ptmg-choice:focus-visible,
.ptmg-button:focus-visible,
.ptmg-level-button:focus-visible,
.ptmg-button--link:focus-visible {
	outline: 3px solid rgba(47, 93, 58, 0.45);
	outline-offset: 3px;
}

.ptmg-choice.is-selected {
	border-color: var(--ptmg-main);
}

.ptmg-choice.is-correct {
	background: rgba(37, 122, 62, 0.12);
	border-color: var(--ptmg-success);
}

.ptmg-choice.is-wrong {
	background: rgba(179, 38, 30, 0.1);
	border-color: var(--ptmg-danger);
}

.ptmg-choice:disabled {
	cursor: default;
	opacity: 0.95;
}

.ptmg-feedback {
	background: rgba(255, 255, 255, 0.86);
	border: 1px solid rgba(45, 36, 31, 0.16);
	border-radius: 8px;
	margin-top: 18px;
	padding: 16px;
}

.ptmg-feedback:empty {
	display: none;
}

.ptmg-feedback-title {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 6px;
}

.ptmg-feedback-title.is-correct {
	color: var(--ptmg-success);
}

.ptmg-feedback-title.is-wrong {
	color: var(--ptmg-danger);
}

.ptmg-button,
.ptmg-level-button {
	align-items: center;
	background: var(--ptmg-card);
	border-color: rgba(45, 36, 31, 0.28);
	color: var(--ptmg-text);
	display: inline-flex;
	justify-content: center;
	text-align: center;
}

.ptmg-button--primary,
.ptmg-level-button {
	background: var(--ptmg-main);
	color: #ffffff;
}

.ptmg-button--link {
	background: var(--ptmg-accent);
	color: #ffffff;
}

.ptmg-result-card {
	background: var(--ptmg-card);
	border: 1px solid rgba(45, 36, 31, 0.18);
	border-radius: 8px;
	margin: 18px auto;
	max-width: 760px;
	overflow: hidden;
	padding: 0;
	text-align: center;
}

.ptmg-result-image {
	display: block;
	height: auto;
	width: 100%;
}

.ptmg-result-card .ptmg-result-caption {
	background: #ffffff;
	color: var(--ptmg-muted);
	font-weight: 700;
	margin: 0;
	padding: 12px 14px;
}

.ptmg-result-card--exam {
	background:
		linear-gradient(160deg, rgba(47, 93, 58, 0.9), rgba(200, 79, 31, 0.92)),
		var(--ptmg-accent);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 420px;
	min-height: 620px;
	padding: 28px;
}

.ptmg-result-card--exam.ptmg-result-card--image {
	background: var(--ptmg-card);
	display: block;
	max-width: 760px;
	min-height: 0;
	padding: 0;
}

.ptmg-result-card--exam .ptmg-result-level,
.ptmg-result-card--exam .ptmg-result-small,
.ptmg-result-card--exam .ptmg-result-caption,
.ptmg-result-card--exam .ptmg-mascot__name,
.ptmg-result-card--exam .ptmg-mascot__role {
	color: rgba(255, 255, 255, 0.92);
}

.ptmg-result-card--exam .ptmg-result-caption {
	background: transparent;
	padding: 0;
}

.ptmg-result-card--exam.ptmg-result-card--image .ptmg-result-caption {
	background: #ffffff;
	color: var(--ptmg-muted);
	padding: 12px 14px;
}

.ptmg-result-summary {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 10px 0 16px;
}

.ptmg-pass-badge {
	border-radius: 999px;
	color: #ffffff;
	font-weight: 900;
	margin: 0;
	padding: 5px 12px;
}

.ptmg-pass-badge.is-pass {
	background: var(--ptmg-success);
}

.ptmg-pass-badge.is-retry {
	background: var(--ptmg-main);
}

.ptmg-mascot {
	align-items: center;
	display: flex;
	gap: 10px;
}

.ptmg-mascot__art {
	background: #fff3df;
	border: 1px solid rgba(45, 36, 31, 0.16);
	border-radius: 8px;
	display: block;
	filter: drop-shadow(0 8px 12px rgba(45, 36, 31, 0.18));
	flex: 0 0 auto;
	height: 118px;
	object-fit: cover;
	object-position: center top;
	width: 92px;
}

.ptmg-mascot__text {
	display: grid;
	gap: 2px;
	text-align: left;
}

.ptmg-mascot__name {
	color: var(--ptmg-text);
	font-size: 1.05rem;
	font-weight: 900;
}

.ptmg-mascot__role {
	color: var(--ptmg-muted);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.45;
}

.ptmg-mascot--small {
	justify-content: center;
	margin-bottom: 4px;
}

.ptmg-mascot--small .ptmg-mascot__art {
	height: 168px;
	width: 130px;
}

.ptmg-mascot--compact .ptmg-mascot__art {
	height: 78px;
	width: 62px;
}

.ptmg-mascot--compact .ptmg-mascot__name {
	font-size: 0.98rem;
}

.ptmg-mascot--result {
	flex-direction: column;
	gap: 4px;
	margin-bottom: 8px;
}

.ptmg-mascot--result .ptmg-mascot__art {
	border-color: rgba(255, 255, 255, 0.56);
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
	height: 208px;
	width: 150px;
}

.ptmg-mascot--result .ptmg-mascot__text {
	text-align: center;
}

.ptmg-result-rank {
	font-size: clamp(1.7rem, 5vw, 2.3rem);
	font-weight: 900;
	line-height: 1.25;
	margin: 0;
}

.ptmg-result-score {
	font-size: 2rem;
	font-weight: 900;
	margin: 0;
}

.ptmg-subtitle {
	font-size: 1.1rem;
	margin: 22px 0 10px;
}

.ptmg-score-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.ptmg-review {
	margin-top: 18px;
}

.ptmg-review-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
}

.ptmg-review-item {
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(45, 36, 31, 0.18);
	border-radius: 8px;
	display: grid;
	gap: 6px;
	padding: 12px 14px;
}

.ptmg-review-empty {
	background: rgba(37, 122, 62, 0.12);
	border: 1px solid rgba(23, 100, 47, 0.26);
	border-radius: 8px;
	color: var(--ptmg-text);
	font-weight: 700;
	margin: 0 0 18px;
	padding: 12px 14px;
}

.ptmg-score-item {
	align-items: center;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(45, 36, 31, 0.18);
	border-radius: 8px;
	display: flex;
	justify-content: space-between;
	padding: 10px 14px;
}

.ptmg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.ptmg-copy-message {
	color: var(--ptmg-accent);
	font-weight: 700;
	margin: 12px 0 0;
}

@media (max-width: 760px) {
	.ptmg-game {
		margin: 18px auto;
	}

	.ptmg-card {
		padding: 20px;
	}

	.ptmg-level-grid {
		grid-template-columns: 1fr;
	}

	.ptmg-actions {
		flex-direction: column;
	}

	.ptmg-question-header,
	.ptmg-mascot {
		align-items: flex-start;
	}

	.ptmg-mascot--small {
		justify-content: flex-start;
	}

	.ptmg-button,
	.ptmg-level-button {
		width: 100%;
	}
}
