:root {
	--wk-primary: #e84d3d;
	--wk-secondary: #ffd95c;
	--wk-accent: #34d399;
	--wk-bg: #111827;
	--wk-panel: rgba(255, 255, 255, 0.12);
	--wk-text: #f8fafc;
	--wk-muted: #cbd5e1;
	--wk-success: #22c55e;
	--wk-warning: #f59e0b;
	--wk-danger: #ef4444;
	--wk-glow: #ffd95c;
	--wk-key-bg: rgba(255, 255, 255, 0.88);
	--wk-key-active: #ffd95c;
	--wk-key-home: #34d399;
	--wk-surface: rgba(15, 23, 42, 0.56);
	--wk-surface-soft: rgba(255, 255, 255, 0.1);
	--wk-surface-strong: rgba(2, 6, 23, 0.72);
	--wk-border: rgba(255, 255, 255, 0.16);
	--wk-border-strong: rgba(255, 255, 255, 0.26);
	--wk-shadow: 0 24px 70px rgba(2, 6, 23, 0.32);
	--wk-inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.16);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wonderkeys-app-shell {
	width: 100%;
	color: var(--wk-text);
}

.wonderkeys-app-shell h1,
.wonderkeys-app-shell h2,
.wonderkeys-app-shell h3,
.wonderkeys-app-shell h4,
.wonderkeys-app-shell p,
.wonderkeys-app-shell button,
.wonderkeys-app-shell label,
.wonderkeys-app-shell small,
.wonderkeys-app-shell strong {
	color: inherit;
	font-family: inherit;
}

.wonderkeys-app-shell.wk-large-text {
	font-size: 18px;
}

.wonderkeys-app-shell.wk-dyslexia-font {
	font-family: "Comic Sans MS", "Trebuchet MS", Arial, sans-serif;
}

.wonderkeys-app-shell.wk-high-contrast {
	--wk-text: #ffffff;
	--wk-muted: #f8fafc;
	--wk-bg: #020617;
	--wk-panel: rgba(0, 0, 0, 0.72);
	--wk-surface: rgba(0, 0, 0, 0.82);
	--wk-surface-soft: rgba(255, 255, 255, 0.14);
	--wk-secondary: #fde047;
	--wk-accent: #22c55e;
	--wk-danger: #f87171;
}

.wonderkeys-app-shell.wk-calm-mode {
	--wk-secondary: #bae6fd;
	--wk-accent: #86efac;
	--wk-glow: #bae6fd;
}

.wonderkeys-app-shell * {
	box-sizing: border-box;
}

.wk-app {
	position: relative;
	overflow: hidden;
	min-height: 720px;
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.54)),
		var(--wk-bg-image),
		radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--wk-secondary), transparent 72%), transparent 28%),
		radial-gradient(circle at 78% 14%, color-mix(in srgb, var(--wk-accent), transparent 74%), transparent 24%),
		linear-gradient(135deg, #141b34 0%, #24324f 48%, #101827 100%);
	background-size: cover, cover, auto, auto, auto;
	background-position: center, center, center, center, center;
	box-shadow: var(--wk-shadow);
	isolation: isolate;
}

.wk-app::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.04)),
		radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.2), transparent 38%);
	mix-blend-mode: screen;
}

.wk-app::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle at 50% 45%, transparent 0 48%, rgba(2, 6, 23, 0.36) 100%);
}

.wk-high-contrast .wk-app {
	background:
		var(--wk-bg-image),
		linear-gradient(135deg, #000 0%, #111827 100%);
}

.wk-calm-mode .wk-app {
	box-shadow: none;
}

.wk-background {
	position: absolute;
	inset: 0;
	background-image:
		var(--wk-foreground-image),
		linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
	background-size: cover, 52px 52px, 52px 52px;
	background-position: bottom center, center, center;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 88%);
}

.wk-shell {
	position: relative;
	z-index: 2;
	max-width: 1180px;
	margin: 0 auto;
	padding: 24px;
}

.wk-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 48px;
	margin-bottom: 22px;
}

.wk-brand,
.wk-status {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wk-border);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(15, 23, 42, 0.46));
	backdrop-filter: blur(18px);
	border-radius: 8px;
	padding: 10px 12px;
	color: var(--wk-text);
	box-shadow: var(--wk-inner-light), 0 12px 34px rgba(2, 6, 23, 0.22);
}

.wk-brand {
	gap: 10px;
	font-weight: 800;
}

.wk-brand-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 7px;
	background: var(--wk-secondary);
	color: #111827;
	box-shadow: 0 0 24px color-mix(in srgb, var(--wk-secondary), transparent 42%);
}

.wk-status {
	color: var(--wk-muted);
	font-size: 14px;
}

.wk-parent-button {
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	padding: 10px 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(15, 23, 42, 0.48));
	color: var(--wk-text);
	font-weight: 800;
	cursor: pointer;
	box-shadow: var(--wk-inner-light), 0 12px 34px rgba(2, 6, 23, 0.18);
}

.wk-hero-panel {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
	gap: 24px;
	align-items: stretch;
}

.wk-hero-copy,
.wk-stage-preview {
	min-height: 540px;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
		var(--wk-surface);
	backdrop-filter: blur(20px);
	box-shadow: var(--wk-inner-light), 0 22px 60px rgba(2, 6, 23, 0.24);
}

.wk-hero-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 36px;
}

.wk-kicker {
	margin: 0 0 10px;
	color: var(--wk-secondary);
	font-weight: 800;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0;
}

.wk-hero-copy h1 {
	margin: 0;
	font-size: 44px;
	line-height: 1.05;
	letter-spacing: 0;
	color: var(--wk-text);
}

.wk-large-text .wk-hero-copy h1 {
	font-size: 50px;
}

.wk-hero-copy p {
	max-width: 46ch;
	color: var(--wk-muted);
	font-size: 17px;
	line-height: 1.6;
}

.wk-profile-grid {
	display: grid;
	gap: 12px;
	margin-top: 14px;
}

.wk-profile-card {
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 12px;
	align-items: center;
	width: 100%;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	padding: 12px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
		rgba(2, 6, 23, 0.22);
	color: var(--wk-text);
	text-align: left;
	cursor: pointer;
	box-shadow: var(--wk-inner-light);
	transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.wk-profile-card:hover,
.wk-profile-card:focus-visible {
	transform: translateY(-1px);
	border-color: var(--wk-secondary);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
		rgba(2, 6, 23, 0.18);
	box-shadow: var(--wk-inner-light), 0 16px 38px rgba(2, 6, 23, 0.22);
	outline: none;
}

.wk-avatar {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--wk-secondary), var(--wk-accent));
	color: #111827;
	font-size: 24px;
	font-weight: 900;
	box-shadow: 0 14px 30px color-mix(in srgb, var(--wk-accent), transparent 72%);
}

.wk-profile-card strong,
.wk-profile-card small {
	display: block;
}

.wk-profile-card small {
	color: var(--wk-muted);
	margin-top: 3px;
}

.wk-stage-preview {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 22px;
	padding: 28px;
	overflow: hidden;
}

.wk-scene-orbit {
	position: absolute;
	top: 62px;
	left: 50%;
	width: 220px;
	height: 220px;
	transform: translateX(-50%);
	border-radius: 50%;
	background:
		radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 217, 92, 0.25) 34%, transparent 70%);
	box-shadow: 0 0 80px rgba(255, 217, 92, 0.35);
	animation: wk-float 5s ease-in-out infinite;
}

.wk-prompt-card {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	gap: 14px;
	margin: 0 auto;
	padding: 18px 24px;
	border: 1px solid var(--wk-border-strong);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
		rgba(2, 6, 23, 0.28);
	box-shadow: var(--wk-inner-light), 0 20px 45px rgba(2, 6, 23, 0.28);
}

.wk-prompt-card span {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #111827;
	font-size: 32px;
	font-weight: 900;
}

.wk-theme-strip {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
}

.wk-theme-chip {
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 9px 12px;
	background: rgba(15, 23, 42, 0.55);
	color: var(--wk-text);
	cursor: pointer;
}

.wk-dashboard,
.wk-mode-screen,
.wk-typing-stage,
.wk-results {
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
		var(--wk-surface);
	backdrop-filter: blur(20px);
	padding: 24px;
	box-shadow: var(--wk-inner-light), 0 24px 60px rgba(2, 6, 23, 0.26);
}

.wk-section-heading {
	max-width: 760px;
	margin-bottom: 18px;
}

.wk-section-heading h1,
.wk-section-heading h2,
.wk-results h1 {
	margin: 0 0 8px;
	letter-spacing: 0;
	color: var(--wk-text);
}

.wk-section-heading p,
.wk-results p {
	color: var(--wk-muted);
	line-height: 1.55;
}

.wk-create-form {
	display: grid;
	gap: 12px;
	margin-top: 14px;
	padding: 14px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
}

.wk-create-form label {
	display: grid;
	gap: 6px;
	color: var(--wk-muted);
	font-weight: 700;
}

.wk-create-form input,
.wk-create-form select {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.94);
	color: #111827;
	font: inherit;
}

.wk-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.wk-form-actions button,
.wk-link-button {
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	background: linear-gradient(180deg, color-mix(in srgb, var(--wk-secondary), #fff 18%), var(--wk-secondary));
	color: #111827;
	font-weight: 900;
	padding: 10px 14px;
	cursor: pointer;
	box-shadow: 0 12px 26px color-mix(in srgb, var(--wk-secondary), transparent 74%);
	transition: transform 140ms ease, filter 140ms ease;
}

.wk-form-actions button:hover,
.wk-link-button:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}

.wk-form-actions button + button,
.wk-link-button {
	background: rgba(255, 255, 255, 0.1);
	color: var(--wk-text);
}

.wk-audio-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 10px 0 18px;
}

.wk-audio-controls button,
.wk-audio-controls label {
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	color: var(--wk-text);
	padding: 8px 10px;
	box-shadow: var(--wk-inner-light);
}

.wk-audio-controls button {
	cursor: pointer;
	font-weight: 800;
}

.wk-audio-controls label {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.wk-parent-gate {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(15, 23, 42, 0.72);
}

.wk-parent-gate-panel {
	width: min(420px, 100%);
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 8px;
	background: var(--wk-panel);
	color: var(--wk-text);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.wk-parent-gate-panel label {
	display: grid;
	gap: 6px;
	margin: 16px 0;
}

.wk-parent-gate-panel input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(15, 23, 42, 0.16);
	border-radius: 8px;
	padding: 12px 14px;
	font: inherit;
}

.wk-parent-gate-panel button {
	border: 0;
	border-radius: 8px;
	padding: 11px 18px;
	background: var(--wk-primary);
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

.wk-error {
	color: var(--wk-danger);
	font-weight: 700;
}

.wk-theme-picker {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px;
	margin: 14px 0 22px;
}

.wk-theme-card {
	position: relative;
	overflow: hidden;
	display: grid;
	gap: 8px;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	padding: 12px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
		rgba(2, 6, 23, 0.18);
	color: var(--wk-text);
	text-align: left;
	cursor: pointer;
	box-shadow: var(--wk-inner-light);
	transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.wk-theme-card.is-active,
.wk-theme-card:focus-visible,
.wk-theme-card:hover {
	border-color: var(--wk-secondary);
	transform: translateY(-2px);
	box-shadow: var(--wk-inner-light), 0 18px 42px rgba(2, 6, 23, 0.28);
	outline: none;
}

.wk-theme-card.is-active::after {
	content: "Active";
	position: absolute;
	top: 18px;
	right: 18px;
	border-radius: 999px;
	padding: 5px 8px;
	background: var(--wk-secondary);
	color: #111827;
	font-size: 11px;
	font-weight: 900;
}

.wk-theme-card small {
	color: var(--wk-muted);
	line-height: 1.35;
}

.wk-theme-preview {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 16 / 8;
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.46)),
		var(--preview),
		linear-gradient(135deg, var(--swatch), rgba(255, 255, 255, 0.18));
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 18px color-mix(in srgb, var(--swatch), transparent 48%);
}

.wk-theme-preview img {
	position: absolute;
	left: 8px;
	bottom: 8px;
	width: 52%;
	max-height: 52px;
	object-fit: contain;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.wk-theme-shine {
	position: absolute;
	inset: -60% 35% 20% -30%;
	transform: rotate(22deg);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
	opacity: 0;
	transition: opacity 160ms ease, transform 320ms ease;
}

.wk-theme-card:hover .wk-theme-shine,
.wk-theme-card:focus-visible .wk-theme-shine {
	opacity: 1;
	transform: rotate(22deg) translateX(80%);
}

.wk-map {
	display: grid;
	gap: 18px;
}

.wk-zone {
	display: grid;
	gap: 12px;
	position: relative;
	padding: 16px;
	border: 1px solid rgba(255, 255, 255, 0.11);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.045);
}

.wk-zone-header h2 {
	margin: 0;
}

.wk-level-path {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
}

.wk-level-node,
.wk-mode-card {
	position: relative;
	overflow: hidden;
	min-height: 94px;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	padding: 14px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
		rgba(2, 6, 23, 0.2);
	color: var(--wk-text);
	text-align: left;
	cursor: pointer;
	box-shadow: var(--wk-inner-light);
	transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.wk-level-node::before,
.wk-mode-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--wk-secondary), transparent 76%), transparent 38%);
	opacity: 0;
	transition: opacity 160ms ease;
}

.wk-level-node:hover,
.wk-level-node:focus-visible,
.wk-mode-card:hover,
.wk-mode-card:focus-visible {
	transform: translateY(-2px);
	border-color: var(--wk-secondary);
	box-shadow: var(--wk-inner-light), 0 18px 42px rgba(2, 6, 23, 0.26);
	outline: none;
}

.wk-level-node:hover::before,
.wk-level-node:focus-visible::before,
.wk-mode-card:hover::before,
.wk-mode-card:focus-visible::before {
	opacity: 1;
}

.wk-level-node[disabled] {
	cursor: not-allowed;
	opacity: 0.48;
}

.wk-level-node.is-complete {
	border-color: var(--wk-accent);
}

.wk-level-index {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 28px;
	margin-bottom: 12px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--wk-secondary), transparent 18%);
	color: #111827;
	font-weight: 900;
	font-size: 12px;
}

.wk-level-title,
.wk-level-node small,
.wk-mode-card strong,
.wk-mode-card small {
	display: block;
}

.wk-level-title {
	font-weight: 900;
}

.wk-level-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.wk-level-meta span {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	padding: 5px 8px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--wk-text);
	font-size: 12px;
	font-weight: 800;
}

.wk-level-node small,
.wk-mode-card small {
	margin-top: 8px;
	color: var(--wk-muted);
	line-height: 1.35;
}

.wk-mode-grid,
.wk-result-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.wk-mode-card.is-recommended {
	border-color: var(--wk-secondary);
	box-shadow: var(--wk-inner-light), 0 0 24px color-mix(in srgb, var(--wk-secondary), transparent 76%);
}

.wk-hud {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.wk-hud span {
	display: grid;
	gap: 4px;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
		rgba(2, 6, 23, 0.22);
	padding: 10px 12px;
	color: var(--wk-text);
	font-weight: 800;
	min-width: 0;
	box-shadow: var(--wk-inner-light);
}

.wk-hud small {
	color: var(--wk-muted);
	font-size: 11px;
	font-weight: 900;
	text-transform: uppercase;
}

.wk-hud span {
	overflow-wrap: anywhere;
}

.wk-game-scene {
	display: grid;
	place-items: center;
	position: relative;
	overflow: hidden;
	min-height: 390px;
	margin-bottom: 16px;
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	background:
		radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.2), transparent 30%),
		radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--wk-glow), transparent 80%), transparent 35%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
		rgba(2, 6, 23, 0.2);
	text-align: center;
	box-shadow: var(--wk-inner-light), inset 0 -80px 110px rgba(2, 6, 23, 0.22);
}

.wk-game-scene::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 42px 42px;
	mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.7), transparent 74%);
}

.wk-game-scene > * {
	position: relative;
	z-index: 1;
}

.wk-calm-mode .wk-game-scene {
	background: rgba(255, 255, 255, 0.05);
}

.wk-game-token {
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	margin: 8px 0 10px;
	background: var(--wk-secondary);
	color: #111827;
	box-shadow: 0 0 42px color-mix(in srgb, var(--wk-secondary), transparent 48%), inset 0 2px 0 rgba(255, 255, 255, 0.42);
	font-size: 38px;
	font-weight: 900;
}

.wk-animation-low .wk-combo-trail,
.wk-animation-low .wk-spark-ring,
.wk-animation-low .wk-bubble,
.wk-animation-low .wk-rhythm-lane span,
.wk-calm-mode .wk-combo-trail,
.wk-calm-mode .wk-obstacle,
.wk-calm-mode .wk-boss-orb {
	animation: none;
	box-shadow: none;
}

.wk-animation-low .wk-bubble-field,
.wk-calm-mode .wk-bubble-field {
	grid-template-columns: repeat(3, minmax(46px, 1fr));
}

.wk-game-visual {
	position: relative;
	display: grid;
	place-items: center;
	width: min(100%, 720px);
	min-height: 126px;
	margin: 8px 0 12px;
}

.wk-character-figure {
	margin: 0;
	transform: translate(var(--character-x), var(--character-y)) scale(var(--character-scale));
	transform-origin: bottom center;
	animation: wk-character-breathe 3.2s ease-in-out infinite;
}

.wk-keyspark {
	isolation: isolate;
}

.wk-spark-ring {
	position: absolute;
	width: 128px;
	height: 128px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.28);
	box-shadow: 0 0 42px rgba(255, 217, 92, 0.35), inset 0 0 30px rgba(255, 255, 255, 0.12);
	animation: wk-spin-slow 10s linear infinite;
}

.wk-combo-trail {
	display: flex;
	gap: 5px;
	position: absolute;
	bottom: 0;
}

.wk-combo-trail span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wk-secondary);
	box-shadow: 0 0 12px var(--wk-secondary);
}

.wk-bubble-field {
	grid-template-columns: repeat(5, minmax(46px, 1fr));
	align-items: end;
	gap: 14px;
	padding: 10px 32px;
}

.wk-bubble {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 28%, #fff, #7dd3fc 42%, #0891b2);
	color: #083344;
	font-size: 24px;
	font-weight: 900;
	box-shadow: 0 16px 28px rgba(8, 145, 178, 0.26);
	animation: wk-bubble-rise 2400ms ease-in-out infinite;
}

.wk-bubble-1,
.wk-bubble-3 {
	animation-delay: 240ms;
	transform: translateY(14px);
}

.wk-bubble-2,
.wk-bubble-4 {
	animation-delay: 420ms;
	transform: translateY(-8px);
}

.wk-trail-tiles {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

.wk-trail-tiles span {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: rgba(245, 158, 11, 0.18);
	border: 1px solid rgba(245, 158, 11, 0.45);
	color: #fde68a;
	font-weight: 900;
}

.wk-trail-tiles span.is-done {
	background: #f59e0b;
	color: #111827;
}

.wk-trail-chest {
	width: 72px;
	height: 44px;
	margin-top: 14px;
	border-radius: 8px;
	background: linear-gradient(#fbbf24 0 42%, #92400e 42% 100%);
	box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.18);
}

.wk-trail-chest.is-open {
	transform: translateY(-4px);
	box-shadow: 0 0 28px rgba(251, 191, 36, 0.55);
}

.wk-rhythm-lanes {
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	align-items: stretch;
}

.wk-rhythm-lane {
	position: relative;
	min-height: 104px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.wk-rhythm-lane span {
	position: absolute;
	left: 50%;
	top: calc(10% + var(--lane-step) * 12%);
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--wk-secondary);
	color: #111827;
	font-weight: 900;
	transform: translateX(-50%);
	animation: wk-note-slide 1800ms linear infinite;
}

.wk-hit-zone {
	position: absolute;
	right: 22%;
	width: 4px;
	height: 112px;
	border-radius: 999px;
	background: var(--wk-accent);
	box-shadow: 0 0 22px var(--wk-accent);
}

.wk-run-track,
.wk-sprint-track {
	position: relative;
	width: min(100%, 640px);
	height: 72px;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.16));
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.wk-runner,
.wk-sprint-track i {
	position: absolute;
	top: 50%;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--wk-secondary);
	box-shadow: 0 0 22px rgba(255, 217, 92, 0.42);
	transform: translate(-50%, -50%);
	transition: left 180ms ease;
}

.wk-obstacle {
	position: absolute;
	bottom: 12px;
	width: 18px;
	height: 26px;
	border-radius: 6px;
	background: rgba(239, 68, 68, 0.66);
}

.wk-word-builder {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.wk-word-builder span {
	display: grid;
	place-items: center;
	width: 52px;
	height: 58px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--wk-text);
	font-size: 24px;
	font-weight: 900;
}

.wk-word-builder span.is-filled {
	background: var(--wk-accent);
	color: #052e16;
	transform: translateY(-3px);
}

.wk-sentence-quest {
	gap: 18px;
}

.wk-story-sky {
	width: min(100%, 620px);
	height: 24px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
}

.wk-story-sky span,
.wk-speed-meter span,
.wk-boss-health span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--wk-secondary), var(--wk-accent));
	transition: width 180ms ease;
}

.wk-story-pieces {
	display: flex;
	gap: 14px;
}

.wk-story-pieces i {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
}

.wk-story-pieces i.is-lit {
	background: var(--wk-secondary);
	box-shadow: 0 0 18px rgba(255, 217, 92, 0.36);
}

.wk-garden-bed {
	position: relative;
	display: flex;
	gap: 8px;
	align-items: end;
	justify-content: center;
	width: min(100%, 640px);
	min-height: 112px;
	padding: 18px;
	border-radius: 8px;
	background: linear-gradient(rgba(22, 101, 52, 0.24), rgba(20, 83, 45, 0.48));
}

.wk-bloom,
.wk-weed {
	display: block;
	width: 24px;
	border-radius: 999px 999px 4px 4px;
}

.wk-bloom {
	height: 58px;
	background: linear-gradient(var(--wk-secondary) 0 34%, var(--wk-accent) 34% 100%);
}

.wk-weed {
	height: 34px;
	background: #166534;
	opacity: 0.72;
}

.wk-speed-sprint {
	gap: 16px;
}

.wk-speed-meter,
.wk-boss-health {
	width: min(100%, 560px);
	height: 20px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
}

.wk-boss-orb {
	display: grid;
	place-items: center;
	width: 118px;
	height: 118px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff, var(--wk-danger) 42%, #7f1d1d);
	color: #fff;
	font-weight: 900;
	box-shadow: 0 0 36px rgba(239, 68, 68, 0.42);
}

.wk-boss-health span {
	background: linear-gradient(90deg, var(--wk-danger), var(--wk-warning));
}

.wk-character-figure img {
	display: block;
	max-width: min(180px, 42vw);
	max-height: 180px;
	object-fit: contain;
	filter: drop-shadow(0 18px 22px rgba(2, 6, 23, 0.32));
}

.wk-typing-stage[data-game-mode="bubble-burst"] .wk-game-token {
	background: radial-gradient(circle at 35% 28%, #fff, #7dd3fc 42%, #0891b2);
	color: #083344;
}

.wk-typing-stage[data-game-mode="treasure-trail"] .wk-game-token {
	border-radius: 8px;
	background: linear-gradient(135deg, #f59e0b, #92400e);
	color: #fff7ed;
}

.wk-typing-stage[data-game-mode="accuracy-garden"] .wk-game-token {
	background: radial-gradient(circle, #bbf7d0, #22c55e);
	color: #052e16;
}

.wk-target-text {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 860px;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	background: rgba(2, 6, 23, 0.18);
	box-shadow: var(--wk-inner-light);
}

.wk-target-text span {
	min-width: 34px;
	min-height: 42px;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
	color: var(--wk-text);
	font-weight: 900;
	box-shadow: inset 0 -2px 0 rgba(2, 6, 23, 0.18);
}

.wk-target-text span.is-current {
	background: var(--wk-secondary);
	color: #111827;
	transform: translateY(-2px);
	box-shadow: 0 0 28px color-mix(in srgb, var(--wk-secondary), transparent 52%), inset 0 -2px 0 rgba(2, 6, 23, 0.18);
}

.wk-target-text span.is-done {
	background: rgba(52, 211, 153, 0.24);
	color: #bbf7d0;
}

.wk-feedback {
	color: var(--wk-muted);
	font-weight: 800;
}

.wk-finger-guide {
	display: grid;
	gap: 8px;
	margin-bottom: 18px;
}

.wk-hands {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.wk-hands span {
	border-radius: 8px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.1);
}

.wk-hands span.is-active {
	background: var(--wk-accent);
	color: #062012;
	font-weight: 900;
}

.wk-results {
	text-align: center;
}

.wk-results-hero {
	display: grid;
	place-items: center;
	gap: 8px;
	margin: 0 auto 20px;
	padding: 26px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background:
		radial-gradient(circle at 50% 0, color-mix(in srgb, var(--wk-secondary), transparent 76%), transparent 55%),
		rgba(255, 255, 255, 0.05);
}

.wk-star-score {
	display: inline-grid;
	place-items: center;
	min-width: 150px;
	border-radius: 999px;
	padding: 10px 18px;
	background: linear-gradient(180deg, color-mix(in srgb, var(--wk-secondary), #fff 16%), var(--wk-secondary));
	color: #111827;
	font-weight: 900;
	box-shadow: 0 16px 36px color-mix(in srgb, var(--wk-secondary), transparent 74%);
}

.wk-result-grid {
	margin: 20px 0;
}

.wk-result-grid div {
	border: 1px solid var(--wk-border);
	border-radius: 8px;
	padding: 18px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
		rgba(2, 6, 23, 0.18);
	box-shadow: var(--wk-inner-light);
}

.wk-result-grid strong,
.wk-result-grid span {
	display: block;
}

.wk-result-grid strong {
	font-size: 34px;
}

.wk-result-grid span {
	color: var(--wk-muted);
}

.wk-badge-shelf {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	margin: 12px 0 22px;
}

.wk-badge-shelf.is-compact {
	grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
	justify-content: center;
}

.wk-badge-card {
	display: grid;
	gap: 6px;
	place-items: center;
	min-height: 104px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.09);
	color: var(--wk-text);
	text-align: center;
}

.wk-badge-card span {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wk-secondary);
	color: #111827;
	font-weight: 900;
}

.wk-badge-card[data-rarity="rare"] span {
	background: var(--wk-accent);
}

.wk-badge-card[data-rarity="epic"] span,
.wk-badge-card[data-rarity="legendary"] span {
	background: linear-gradient(135deg, var(--wk-secondary), var(--wk-accent));
	box-shadow: 0 0 22px rgba(255, 217, 92, 0.36);
}

.wk-badge-card small,
.wk-empty {
	color: var(--wk-muted);
}

.wk-new-badges {
	margin: 18px auto;
	max-width: 640px;
}

.wk-loader {
	padding: 32px;
	color: var(--wk-muted);
}

@media (max-width: 900px) {
	.wk-shell {
		padding: 16px;
	}

	.wk-hero-panel {
		grid-template-columns: 1fr;
	}

	.wk-hero-copy,
	.wk-stage-preview {
		min-height: auto;
	}

	.wk-hero-copy {
		padding: 24px;
	}

	.wk-hero-copy h1 {
		font-size: 34px;
	}

	.wk-topbar,
	.wk-hud {
		grid-template-columns: 1fr;
	}

	.wk-topbar {
		display: grid;
		align-items: stretch;
	}

	.wk-brand,
	.wk-status,
	.wk-parent-button {
		justify-content: center;
	}

	.wk-game-scene {
		min-height: 330px;
	}
}

@media (max-width: 640px) {
	.wk-theme-picker,
	.wk-level-path,
	.wk-mode-grid,
	.wk-result-grid {
		grid-template-columns: 1fr;
	}

	.wk-target-text {
		padding: 12px;
		gap: 4px;
	}

	.wk-target-text span {
		min-width: 28px;
		min-height: 36px;
		font-size: 14px;
	}
}
