:root {
	--mt-bg: #dce3ec;
	--mt-bg-deep: #c7d3e2;
	--mt-surface: rgba(247, 250, 253, 0.92);
	--mt-surface-strong: #fdfefe;
	--mt-ink: #152030;
	--mt-muted: #5c6b80;
	--mt-accent: #2063d6;
	--mt-accent-2: #6ea8ff;
	--mt-line: rgba(21, 32, 48, 0.12);
	--mt-radius: 22px;
}

* {
	box-sizing: border-box;
}

body.mt-app-shell {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at top left, rgba(110, 168, 255, 0.36), transparent 28%),
		radial-gradient(circle at bottom right, rgba(32, 99, 214, 0.18), transparent 26%),
		linear-gradient(180deg, #eef3f8 0%, var(--mt-bg) 52%, var(--mt-bg-deep) 100%);
	background-repeat: no-repeat;
	background-size: 100% 100%;
	color: var(--mt-ink);
	font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.mt-app-main {
	padding: 1rem 1rem 6rem;
	max-width: 72rem;
	margin: 0 auto;
}

.mt-bottom-nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5rem;
	padding: 0.75rem;
	background: rgba(233, 239, 247, 0.8);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(21, 32, 48, 0.06);
}

.mt-bottom-nav a {
	padding: 0.85rem 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	color: var(--mt-ink);
	border-radius: 1.6rem;
	background: rgba(255, 255, 255, 0.5);
	line-height: 1.15;
}

.mt-bottom-nav a.is-active,
.mt-button {
	background: linear-gradient(135deg, #1f5ad1, #3f87ff);
	color: #fff;
}

.mt-app-page,
.mt-stack {
	display: grid;
	gap: 1rem;
}

.mt-hero,
.mt-card,
.mt-topic-card {
	background: var(--mt-surface);
	border: 1px solid var(--mt-line);
	border-radius: var(--mt-radius);
	box-shadow: 0 18px 50px rgba(18, 34, 58, 0.08);
}

.mt-hero,
.mt-card {
	padding: 1.25rem;
}

.mt-hero {
	background:
		linear-gradient(135deg, rgba(32, 99, 214, 0.12), rgba(255, 255, 255, 0.76)),
		var(--mt-surface-strong);
}

.mt-eyebrow {
	margin: 0 0 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	color: var(--mt-accent);
}

.mt-hero-actions {
	margin-top: 1rem;
	display: flex;
	gap: 0.75rem;
}

.mt-hero-more {
	margin-top: 0.85rem;
	display: grid;
	gap: 0.85rem;
}

.mt-hero-more summary {
	list-style: none;
	cursor: pointer;
	font-weight: 700;
	color: var(--mt-accent);
}

.mt-hero-more summary::-webkit-details-marker {
	display: none;
}

.mt-cards,
.mt-topic-list {
	display: grid;
	gap: 1rem;
}

.mt-topic-card {
	display: grid;
	gap: 0.25rem;
	padding: 1rem;
	color: inherit;
	text-decoration: none;
}

.mt-topic-card-main {
	display: grid;
	gap: 0.25rem;
	color: inherit;
	text-decoration: none;
}

.mt-topic-card-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
}

.mt-topic-title-link {
	color: inherit;
	text-decoration: none;
}

.mt-topic-title-link strong {
	display: block;
}

.mt-subject-group {
	border: 1px solid rgba(21, 32, 48, 0.08);
	border-radius: 18px;
	padding: 0.75rem 1rem;
	background: rgba(255, 255, 255, 0.45);
}

.mt-subject-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	cursor: pointer;
	font-weight: 700;
	list-style: none;
}

.mt-subject-summary::-webkit-details-marker {
	display: none;
}

.mt-subject-summary::before {
	content: "▸";
	flex: 0 0 auto;
	color: var(--mt-ink);
	transform: translateY(-1px);
}

.mt-subject-group[open] > .mt-subject-summary::before {
	content: "▾";
}

.mt-subject-summary strong {
	flex: 1;
}

.mt-subject-summary > .mt-inline-actions {
	margin-left: auto;
}

.mt-topic-card small,
.mt-note {
	color: var(--mt-muted);
}

.mt-success {
	color: #1f6a45;
	font-weight: 700;
}

.mt-error {
	color: #9f2f2f;
	font-weight: 700;
}

.mt-train-notice {
	font-weight: 700;
}

.mt-train-notice-success {
	color: #1f6a45;
}

.mt-train-notice-error {
	color: #9f2f2f;
}

.mt-train-notice-neutral {
	color: var(--mt-muted);
}

.mt-field-label {
	font-weight: 700;
	font-size: 0.95rem;
}

.mt-subheading {
	margin: 0.75rem 0 0.35rem;
	font-size: 1rem;
}

.mt-topic-layout {
	display: grid;
	gap: 1rem;
}

.mt-topic-column {
	display: grid;
	gap: 1rem;
	align-content: start;
}

.mt-topic-page .mt-card {
	overflow: hidden;
}

.mt-topic-section-divider {
	height: 1px;
	margin: 1rem 0 0.15rem;
	background: linear-gradient(90deg, rgba(21, 32, 48, 0.14), rgba(21, 32, 48, 0.04));
}

.mt-stat {
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
}

.mt-button,
.mt-button-secondary,
.mt-stack input,
.mt-stack textarea,
.mt-stack select {
	width: 100%;
	min-height: 44px;
	border-radius: 16px;
	border: 1px solid var(--mt-line);
	padding: 0.9rem 1rem;
	font: inherit;
}

.mt-stack select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 3rem;
	background-color: rgba(255, 255, 255, 0.92);
	background-image:
		linear-gradient(45deg, transparent 50%, var(--mt-ink) 50%),
		linear-gradient(135deg, var(--mt-ink) 50%, transparent 50%);
	background-position:
		calc(100% - 1.15rem) calc(50% - 0.2rem),
		calc(100% - 0.75rem) calc(50% - 0.2rem);
	background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
	background-repeat: no-repeat;
}

.mt-button {
	border: 0;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mt-button:disabled,
.mt-button-secondary:disabled {
	background: #d8dee8;
	color: #7b8798;
	border-color: #d8dee8;
	box-shadow: none;
	cursor: not-allowed;
	opacity: 1;
}

.mt-button-flash-success,
.mt-button-flash-error {
	--mt-flash-shadow: rgba(67, 184, 114, 0.32);
	animation: mt-submit-feedback 720ms ease-out 1;
}

.mt-button-flash-success {
	background: linear-gradient(135deg, #228553, #43b872);
	box-shadow: 0 0 0 0 rgba(67, 184, 114, 0.38);
}

.mt-button-flash-error {
	--mt-flash-shadow: rgba(215, 96, 96, 0.34);
	background: linear-gradient(135deg, #a43b3b, #d76060);
	box-shadow: 0 0 0 0 rgba(215, 96, 96, 0.34);
}

@keyframes mt-submit-feedback {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 0 var(--mt-flash-shadow);
	}

	35% {
		transform: scale(1.015);
		box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
	}

	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(67, 184, 114, 0);
	}
}

.mt-button-secondary {
	background: linear-gradient(180deg, rgba(245, 249, 255, 0.96), rgba(235, 241, 248, 0.96));
	color: var(--mt-ink);
	border-color: rgba(32, 99, 214, 0.12);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.85),
		0 8px 20px rgba(18, 34, 58, 0.05);
}

.mt-ghost-button {
	border: 0;
	background: transparent;
	color: var(--mt-muted);
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.mt-progress-list,
.mt-session-list,
.mt-points,
.mt-questions,
.mt-meaning-list {
	display: grid;
	gap: 0.75rem;
	padding-left: 1.25rem;
}

.mt-game-shell {
	display: grid;
	gap: 1rem;
}

.mt-game-header {
	display: grid;
	gap: 0.35rem;
}

.mt-game-header .mt-eyebrow {
	margin: 0;
}

.mt-game-header h2 {
	margin: 0;
	font-size: 1.8rem;
	line-height: 1.05;
}

.mt-game-stage {
	min-height: calc(100vh - 8rem);
	display: grid;
	align-content: start;
	gap: 0.75rem;
	padding-top: 1rem;
}

.mt-game-stage .mt-game-shell {
	min-height: calc(100vh - 18rem);
	align-content: start;
	gap: 0.75rem;
}

.mt-game-stage-compact {
	min-height: auto;
}

.mt-game-stage-compact .mt-game-shell {
	min-height: auto;
}

.mt-game-stage > h2,
.mt-game-stage .mt-game-shell > h2,
.mt-game-stage h4,
.mt-game-stage p {
	margin: 0;
}

.mt-answer-chip-group,
.mt-checklist {
	display: grid;
	gap: 0.75rem;
}

.mt-choice-grid {
	display: grid;
	gap: 0.75rem;
}

.mt-session-options,
.mt-session-controls,
.mt-session-end,
.mt-boss-flow {
	display: grid;
	gap: 0.75rem;
}

.mt-practice-quickstart {
	display: grid;
	gap: 0.6rem;
	margin-bottom: 1rem;
	padding: 0.95rem 1rem;
	border-radius: 18px;
	border: 1px solid rgba(32, 99, 214, 0.12);
	background: linear-gradient(135deg, rgba(245, 249, 255, 0.96), rgba(255, 255, 255, 0.82));
}

.mt-practice-quickstart .mt-note {
	margin: 0;
}

.mt-round-feedback {
	padding: 0.75rem 0.9rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid var(--mt-line);
}

.mt-round-feedback.is-success {
	color: #1f6a45;
	border-color: rgba(31, 106, 69, 0.18);
	background: rgba(236, 250, 242, 0.82);
}

.mt-round-feedback.is-error {
	color: #9f2f2f;
	border-color: rgba(159, 47, 47, 0.18);
	background: rgba(252, 239, 239, 0.82);
}

.mt-round-feedback.is-neutral {
	color: #785400;
	border-color: rgba(120, 84, 0, 0.18);
	background: rgba(255, 247, 225, 0.9);
}

.mt-session-end {
	padding-top: 0.75rem;
	border-top: 1px solid rgba(21, 32, 48, 0.08);
}

.mt-match-board {
	display: grid;
	grid-template-columns: 5.25rem minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

.mt-match-column {
	display: grid;
	gap: 0.75rem;
	align-content: start;
	min-width: 0;
}

.mt-match-list {
	display: grid;
	gap: 0.75rem;
	align-content: start;
}

.mt-answer-chip,
.mt-check-item {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	padding: 0.9rem 1rem;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid var(--mt-line);
	border-radius: 16px;
}

.mt-check-item {
	cursor: pointer;
}

.mt-check-item input[type="checkbox"] {
	appearance: auto;
	-webkit-appearance: checkbox;
	width: 1.2rem;
	height: 1.2rem;
	min-height: 0;
	flex: 0 0 auto;
	margin: 0;
}

.mt-check-item span {
	flex: 1;
}

.mt-choice-button {
	border: 1px solid rgba(32, 99, 214, 0.16);
	background: linear-gradient(180deg, rgba(245, 249, 255, 0.96), rgba(232, 240, 252, 0.96));
	color: #17408f;
	text-align: center;
	justify-content: center;
	font-weight: 700;
	min-height: 3.6rem;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.9),
		0 8px 20px rgba(32, 99, 214, 0.06);
}

.mt-choice-button:hover,
.mt-choice-button:focus-visible {
	border-color: rgba(32, 99, 214, 0.28);
	background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(223, 235, 252, 0.98));
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.94),
		0 10px 24px rgba(32, 99, 214, 0.1);
}

.mt-choice-button.is-selected {
	box-shadow: 0 10px 24px rgba(32, 99, 214, 0.12);
}

.mt-choice-button.is-correct {
	background: rgba(236, 250, 242, 0.92);
	border-color: rgba(31, 106, 69, 0.24);
	color: #1f6a45;
}

.mt-choice-button.is-wrong {
	background: rgba(252, 239, 239, 0.92);
	border-color: rgba(159, 47, 47, 0.22);
	color: #9f2f2f;
}

.mt-selected-points {
	padding: 0.9rem 1rem;
	border-radius: 16px;
	border: 1px dashed var(--mt-line);
	background: rgba(255, 255, 255, 0.6);
}

.mt-selected-points-list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding-left: 1.1rem;
}

.mt-game-shell input:not([type="checkbox"]):not([type="radio"]),
.mt-game-shell textarea,
.mt-game-shell select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.mt-match-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 48px;
	padding: 0.9rem 1rem;
	border-radius: 18px;
	border: 1px solid var(--mt-line);
	background: rgba(255, 255, 255, 0.78);
	color: var(--mt-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mt-match-card span {
	flex: 1;
	min-width: 0;
}

.mt-match-card.is-selected {
	outline: 2px solid rgba(32, 99, 214, 0.35);
	background: rgba(223, 235, 255, 0.9);
}

.mt-match-card.is-wrong {
	outline: 2px solid rgba(186, 56, 56, 0.28);
	background: rgba(255, 230, 230, 0.92);
}

.mt-match-card.is-matched {
	background: rgba(214, 246, 225, 0.95);
	border-color: rgba(43, 142, 88, 0.22);
}

.mt-match-letter {
	justify-content: center;
	font-weight: 700;
	padding: 0.9rem 0.35rem;
}

.mt-match-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	min-height: 2.2rem;
	padding: 0 0.5rem;
	border-radius: 999px;
	background: rgba(32, 99, 214, 0.12);
	color: var(--mt-accent);
}

.mt-reveal-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-bottom: 0.5rem;
}

.mt-reveal-tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 16px;
	border: 1px solid var(--mt-line);
	background: rgba(255, 255, 255, 0.75);
	color: var(--mt-muted);
	font-weight: 800;
}

.mt-reveal-tile.is-revealed {
	background: rgba(32, 99, 214, 0.14);
	color: var(--mt-accent);
	border-color: rgba(32, 99, 214, 0.2);
}

.mt-reveal-tile.is-partial {
	background: rgba(224, 155, 37, 0.14);
	color: #9b5e00;
	border-color: rgba(224, 155, 37, 0.24);
}

.mt-reveal-tile.is-wrong {
	background: rgba(177, 53, 53, 0.12);
	color: #9f2f2f;
	border-color: rgba(177, 53, 53, 0.22);
}

.mt-reveal-hint {
	padding: 0.75rem 0.9rem;
	border-radius: 14px;
	border: 1px dashed rgba(255, 199, 74, 0.55);
	background: rgba(255, 247, 220, 0.9);
	color: #8a5a06;
	font-weight: 700;
}

.mt-reveal-accept {
	display: grid;
	gap: 0.65rem;
	padding: 0.9rem 1rem;
	border-radius: 16px;
	border: 1px solid rgba(32, 99, 214, 0.12);
	background: rgba(255, 255, 255, 0.68);
}

.mt-missing-list,
.mt-chain-list {
	display: grid;
	gap: 0.8rem;
}

.mt-missing-row,
.mt-chain-row {
	padding: 0.95rem 1rem;
	border-radius: 18px;
	border: 1px solid rgba(21, 32, 48, 0.08);
	background: rgba(255, 255, 255, 0.72);
}

.mt-missing-main,
.mt-chain-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	align-items: start;
}

.mt-missing-letter,
.mt-chain-row-letter {
	padding-top: 0.65rem;
	white-space: nowrap;
}

.mt-missing-text,
.mt-chain-row-text {
	padding-top: 0.65rem;
}

.mt-missing-entry,
.mt-chain-row-entry {
	display: grid;
	gap: 0.65rem;
}

.mt-answer-with-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.65rem;
	align-items: start;
}

.mt-inline-button {
	width: auto;
	min-width: 7rem;
	padding-inline: 1rem;
}

.mt-chain-row.is-complete {
	background: rgba(223, 240, 255, 0.62);
	border-color: rgba(47, 110, 219, 0.12);
}

.mt-chain-row.is-current {
	border-color: rgba(47, 110, 219, 0.18);
	box-shadow: 0 12px 28px rgba(47, 110, 219, 0.08);
}

.mt-chain-row.is-error {
	background: rgba(254, 238, 238, 0.92);
	border-color: rgba(196, 63, 63, 0.18);
}

.mt-chain-status {
	display: grid;
	gap: 0.8rem;
	padding: 1rem 1.1rem;
	border: 1px solid rgba(47, 110, 219, 0.12);
	border-radius: 20px;
	background:
		linear-gradient(135deg, rgba(47, 110, 219, 0.08), rgba(255, 255, 255, 0.92)),
		rgba(255, 255, 255, 0.8);
}

.mt-chain-prompt {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 0.85rem;
}

.mt-chain-prompt .mt-note,
.mt-chain-prompt p {
	margin: 0;
}

.mt-chain-mnemonic {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.05;
	letter-spacing: 0.04em;
}

.mt-chain-status-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.mt-chain-status-head .mt-eyebrow {
	margin: 0;
}

.mt-chain-live {
	margin: 0;
	font-weight: 700;
	color: var(--mt-link);
}

.mt-chain-meter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.mt-chain-dot {
	width: 12px;
	height: 12px;
	border-radius: 999px;
	background: rgba(47, 110, 219, 0.14);
	border: 1px solid rgba(47, 110, 219, 0.22);
	transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mt-chain-dot.is-active {
	background: linear-gradient(135deg, #2f6edb, #5b9cff);
	border-color: transparent;
	box-shadow: 0 8px 18px rgba(47, 110, 219, 0.22);
	transform: scale(1.08);
}

.mt-chain-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.mt-chain-stat {
	display: grid;
	gap: 0.2rem;
	padding: 0.8rem 0.9rem;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(21, 32, 48, 0.08);
}

.mt-chain-stat small {
	color: var(--mt-muted);
	font-size: 0.78rem;
}

.mt-chain-stat strong {
	font-size: 1.05rem;
}

@media (max-width: 640px) {
	.mt-answer-with-actions {
		grid-template-columns: minmax(0, 1fr);
	}

	.mt-inline-button {
		width: 100%;
	}
}

.mt-speak-point,
.mt-speak-prompt,
.mt-speak-confidence {
	display: grid;
	gap: 0.75rem;
}

.mt-speak-actions[hidden] {
	display: none;
}

.mt-speak-actions [hidden] {
	display: none !important;
}

.mt-speak-transcript[hidden],
.mt-speak-confidence[hidden] {
	display: none !important;
}

.mt-speak-status {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.mt-speak-timer,
.mt-speak-score-preview,
.mt-speak-transcript {
	padding: 0.9rem 1rem;
	border-radius: 16px;
	border: 1px solid var(--mt-line);
	background: rgba(255, 255, 255, 0.72);
}

.mt-speak-timer {
	font-size: 1.6rem;
	font-weight: 800;
	text-align: center;
}

.mt-speak-score-preview {
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mt-speak-transcript {
	min-height: 7rem;
}

.mt-speak-prompt {
	padding: 1rem 1.1rem;
	border-radius: 18px;
	border: 1px solid var(--mt-line);
	background: rgba(255, 255, 255, 0.72);
}

.mt-speak-confidence .mt-checklist {
	display: grid;
	gap: 0.75rem;
}

.mt-speak-confidence .mt-check-item {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0.9rem;
}

.mt-speak-confidence .mt-check-item input[type="radio"] {
	appearance: auto;
	-webkit-appearance: radio;
	width: 1.2rem;
	height: 1.2rem;
	min-height: 0;
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
}

.mt-speak-confidence .mt-check-item span {
	flex: initial;
}

.mt-reorder-list {
	display: grid;
	gap: 0.75rem;
}

.mt-reorder-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	border-radius: 18px;
	border: 1px solid var(--mt-line);
	background: rgba(255, 255, 255, 0.78);
	cursor: grab;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.mt-reorder-item.is-correct-position {
	border-color: rgba(30, 131, 79, 0.28);
	background: rgba(227, 244, 234, 0.92);
}

.mt-reorder-item.is-dragging {
	opacity: 0.55;
	border-color: rgba(32, 99, 214, 0.26);
	box-shadow: 0 16px 32px rgba(32, 99, 214, 0.12);
}

.mt-reorder-item.is-touch-source {
	opacity: 0.16;
}

.mt-reorder-placeholder {
	border-radius: 18px;
	border: 2px dashed rgba(32, 99, 214, 0.28);
	background: rgba(210, 226, 252, 0.55);
}

.mt-reorder-ghost {
	position: fixed;
	z-index: 9999;
	pointer-events: none;
	margin: 0;
	opacity: 0.96;
	box-shadow: 0 22px 38px rgba(18, 34, 58, 0.22);
	transform: rotate(1deg);
}

.mt-reorder-text {
	flex: 1;
	min-width: 0;
}

.mt-reorder-status {
	flex: 0 0 auto;
	font-size: 0.82rem;
	font-weight: 700;
	color: #1e834f;
	white-space: nowrap;
}

.mt-reorder-handle {
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--mt-line);
	border-radius: 999px;
	background: #fff;
	color: var(--mt-accent);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	flex: 0 0 auto;
}

@media (max-width: 767px) {
	.mt-bottom-nav {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0.45rem;
		padding: 0.7rem;
	}

	.mt-bottom-nav a {
		min-width: 0;
		padding: 0.95rem 0.85rem;
		border-radius: 1.35rem;
		font-size: 0.88rem;
		align-items: center;
		justify-content: center;
		text-align: center;
		white-space: nowrap;
	}

	.mt-game-stage {
		min-height: calc(100vh - 6.5rem);
		padding-top: 0.75rem;
	}

	.mt-game-stage .mt-game-shell {
		min-height: calc(100vh - 12rem);
	}

	.mt-game-header h2 {
		font-size: 1.5rem;
	}

	.mt-match-board {
		gap: 0.75rem;
	}

	.mt-match-column h4 {
		font-size: 0.95rem;
		margin-bottom: 0.1rem;
	}

	.mt-match-card {
		min-height: 56px;
		padding: 0.8rem 0.85rem;
		font-size: 0.95rem;
	}

	.mt-reorder-item {
		align-items: flex-start;
		padding: 0.85rem 0.9rem;
	}

	.mt-check-item {
		align-items: flex-start;
	}

	.mt-speak-status {
		grid-template-columns: 1fr;
	}

	.mt-speak-timer {
		font-size: 1.85rem;
	}

	.mt-speak-transcript {
		min-height: 8.5rem;
	}

	.mt-speak-point .mt-inline-actions {
		display: grid;
		grid-template-columns: 1fr;
	}
}

@media (min-width: 768px) {
	.mt-match-board {
		grid-template-columns: 6.5rem minmax(0, 1fr);
		align-items: start;
	}
}

.mt-point-item {
	display: grid;
	gap: 0.4rem;
	padding: 0.55rem 0;
	border-top: 1px solid rgba(21, 32, 48, 0.08);
}

.mt-point-row {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
}

.mt-point-row > div:first-child {
	min-width: 0;
	flex: 1;
}

.mt-point-row span {
	word-break: break-word;
}

.mt-point-index {
	min-width: 1.4rem;
	color: var(--mt-muted);
}

.mt-point-details {
	padding-left: 2.15rem;
}

.mt-point-details summary {
	list-style: none;
	cursor: pointer;
}

.mt-point-details summary::-webkit-details-marker {
	display: none;
}

.mt-edit-link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.65rem 0.9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	border: 1px solid var(--mt-line);
	color: var(--mt-accent);
	font-weight: 700;
}

.mt-point-editor {
	padding-left: 0;
	margin-top: 0.75rem;
}

.mt-date-event-editor-list {
	padding-left: 0;
	list-style: none;
}

.mt-date-event-edit-row {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr);
	gap: 0.55rem;
	align-items: center;
}

.mt-date-event-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin: 0;
}

.mt-date-event-delete input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	min-height: 0;
	margin: 0;
}

.mt-point-editor textarea {
	min-height: 9rem;
}

.mt-inline-actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
}

.mt-session-complete-actions {
	flex-direction: column;
	align-items: stretch;
}

.mt-session-complete-actions form {
	width: 100%;
}

.mt-session-breakdown {
	margin: 1rem 0 1.25rem;
	border-top: 1px solid rgba(151, 171, 201, 0.28);
}

.mt-session-breakdown-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid rgba(151, 171, 201, 0.18);
}

.mt-session-breakdown-row strong:last-child {
	font-size: 1.05rem;
}

.mt-danger-button {
	width: 100%;
	min-height: 44px;
	border-radius: 16px;
	border: 1px solid rgba(177, 53, 53, 0.18);
	background: #fff5f5;
	color: #9f2f2f;
	padding: 0.8rem 1rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.mt-danger-button-inline {
	width: auto;
	min-width: 0;
	padding-inline: 1rem;
}

.mt-danger-button-compact {
	min-height: 36px;
	padding: 0.45rem 0.75rem;
	border-radius: 12px;
	font-size: 0.92rem;
}

.mt-topic-card-actions {
	display: flex;
	gap: 0.65rem;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-end;
}

.mt-subject-summary .mt-inline-actions {
	flex-wrap: nowrap;
	position: relative;
}

.mt-rename-block {
	display: inline-block;
	position: relative;
}

.mt-rename-block summary {
	list-style: none;
	cursor: pointer;
}

.mt-rename-block summary::-webkit-details-marker {
	display: none;
}

.mt-rename-form {
	margin-top: 0.55rem;
}

.mt-subject-summary .mt-rename-form {
	position: absolute;
	top: calc(100% + 0.55rem);
	right: 0;
	z-index: 10;
	min-width: min(24rem, calc(100vw - 3rem));
	padding: 0.9rem;
	border: 1px solid rgba(21, 32, 48, 0.08);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 18px 40px rgba(21, 32, 48, 0.12);
}

.mt-rename-form input[type="text"] {
	min-width: min(20rem, 100%);
	flex: 1 1 14rem;
}

.mt-wizard {
	width: min(32rem, calc(100vw - 1.5rem));
	border: 0;
	padding: 0;
	background: transparent;
}

.mt-wizard::backdrop {
	background: rgba(17, 28, 44, 0.45);
	backdrop-filter: blur(6px);
}

.mt-wizard-panel {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 252, 0.98));
	border: 1px solid rgba(21, 32, 48, 0.08);
	border-radius: 28px;
	padding: 1.5rem;
	box-shadow: 0 32px 60px rgba(12, 24, 42, 0.22);
	display: grid;
	gap: 1rem;
}

.mt-onboarding-card {
	border-style: dashed;
	border-color: rgba(32, 99, 214, 0.35);
}

.mt-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
}

.mt-stat-card {
	padding: 1rem;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--mt-line);
}

.mt-stat-card h3 {
	margin: 0 0 0.35rem;
	font-size: 0.92rem;
}

.mt-validation-list {
	display: grid;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-validation-list li {
	font-size: 0.95rem;
}

.mt-validation-list .is-valid {
	color: #1f7a44;
}

.mt-validation-list .is-invalid {
	color: #9f2f2f;
}

.mt-confirm-dialog {
	width: min(28rem, calc(100vw - 1.5rem));
	border: 0;
	border-radius: 24px;
	padding: 1.25rem;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.98));
	box-shadow: 0 30px 60px rgba(12, 24, 42, 0.24);
}

.mt-confirm-dialog::backdrop {
	background: rgba(17, 28, 44, 0.5);
	backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
	.mt-cards {
		grid-template-columns: repeat(3, 1fr);
	}

	.mt-cards.split {
		grid-template-columns: repeat(2, 1fr);
	}

	.mt-topic-layout {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}
