/* Wordle Unlimited — Modern Tactile Game Engine Styles */

.wg-app {
	--wg-surface: #ffffff;
	--wg-surface-2: #f1f5f9;
	--wg-surface-3: #e2e8f0;
	--wg-border: #e2e8f0;
	--wg-text: #0f172a;
	--wg-muted: #64748b;
	--wg-tile-bg: #ffffff;
	--wg-tile-border: #cbd5e1;
	--wg-tile-active: #475569;
	--wg-key-bg: #e2e8f0;
	--wg-key-hover: #cbd5e1;
	--wg-key-text: #0f172a;
	--wg-correct: #16a34a;
	--wg-correct-lip: #15803d;
	--wg-present: #d99b06;
	--wg-present-lip: #b47d04;
	--wg-absent: #64748b;
	--wg-absent-lip: #475569;
	--wg-accent: #16a34a;
	--wg-accent-soft: rgba(22, 163, 74, 0.12);
	--wg-shadow: 0 22px 50px -18px rgba(15, 23, 42, 0.14), 0 4px 14px -4px rgba(15, 23, 42, 0.06);
	--wg-cols: 5;
	--wg-tile-size: clamp(46px, 6.8vh, 58px);
	--wg-gap: 7px;

	position: relative;
	width: 100%;
	max-width: 620px;
	margin: 0 auto;
	color: var(--wg-text);
	font-family: inherit;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

html[data-theme="dark"] .wg-app {
	--wg-surface: #111827;
	--wg-surface-2: #1e293b;
	--wg-surface-3: #334155;
	--wg-border: #1f2937;
	--wg-text: #f8fafc;
	--wg-muted: #94a3b8;
	--wg-tile-bg: #0f172a;
	--wg-tile-border: #334155;
	--wg-tile-active: #94a3b8;
	--wg-key-bg: #334155;
	--wg-key-hover: #475569;
	--wg-key-text: #f8fafc;
	--wg-correct: #22c55e;
	--wg-correct-lip: #16a34a;
	--wg-present: #eab308;
	--wg-present-lip: #ca8a04;
	--wg-absent: #334155;
	--wg-absent-lip: #1e293b;
	--wg-accent: #22c55e;
	--wg-accent-soft: rgba(34, 197, 94, 0.16);
	--wg-shadow: 0 26px 60px -16px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wg-app[data-contrast="high"] {
	--wg-correct: #f97316;
	--wg-correct-lip: #ea580c;
	--wg-present: #0284c7;
	--wg-present-lip: #0369a1;
	--wg-accent: #f97316;
	--wg-accent-soft: rgba(249, 115, 22, 0.14);
}

.wg-shell {
	position: relative;
	background: var(--wg-surface);
	border: 1px solid var(--wg-border);
	border-radius: 24px;
	padding: 16px 18px 18px;
	box-shadow: var(--wg-shadow);
	overflow: hidden;
}

/* Toolbar */
.wg-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wg-border);
}

.wg-toolbar-group {
	display: inline-flex;
	align-items: center;
	background: var(--wg-surface-2);
	padding: 3px;
	border-radius: 12px;
	gap: 2px;
}

.wg-pill-btn,
.wg-len-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--wg-muted);
	font: 600 13px/1 inherit;
	padding: 7px 11px;
	border-radius: 9px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.wg-pill-btn:hover,
.wg-len-btn:hover {
	color: var(--wg-text);
}

.wg-pill-btn.is-active,
.wg-len-btn.is-active {
	background: var(--wg-surface);
	color: var(--wg-text);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] .wg-pill-btn.is-active,
html[data-theme="dark"] .wg-len-btn.is-active {
	background: #0f172a;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.wg-dot {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--wg-accent);
	box-shadow: 0 0 0 3px var(--wg-accent-soft);
}

.wg-toolbar-actions {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wg-icon-btn {
	appearance: none;
	border: 1px solid transparent;
	background: var(--wg-surface-2);
	color: var(--wg-text);
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 120ms ease, background-color 150ms ease, border-color 150ms ease;
}

.wg-icon-btn:hover {
	background: var(--wg-surface-3);
}

.wg-icon-btn:active {
	transform: scale(0.94);
}

.wg-icon-btn.is-muted {
	color: var(--wg-muted);
	opacity: 0.7;
}

/* Meta bar */
.wg-meta-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
	margin-bottom: 10px;
}

.wg-meta-left,
.wg-meta-right {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.wg-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--wg-surface-2);
	color: var(--wg-text);
}

.wg-badge-hard {
	background: rgba(239, 68, 68, 0.14);
	color: #dc2626;
}

html[data-theme="dark"] .wg-badge-hard {
	color: #f87171;
}

.wg-badge-streak {
	background: var(--wg-accent-soft);
	color: var(--wg-correct);
	font-variant-numeric: tabular-nums;
}

.wg-action-chip {
	appearance: none;
	border: 1px solid var(--wg-border);
	background: transparent;
	color: var(--wg-muted);
	font: 600 12px/1 inherit;
	padding: 6px 10px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 140ms ease;
}

.wg-action-chip:hover:not(:disabled) {
	color: var(--wg-text);
	border-color: var(--wg-tile-active);
	background: var(--wg-surface-2);
}

.wg-action-chip:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.wg-action-primary {
	background: var(--wg-accent);
	border-color: var(--wg-accent);
	color: #ffffff;
}

.wg-action-primary:hover:not(:disabled) {
	background: var(--wg-correct-lip);
	border-color: var(--wg-correct-lip);
	color: #ffffff;
}

/* Toasts */
.wg-toast-area {
	position: absolute;
	top: 64px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	pointer-events: none;
	width: max-content;
	max-width: calc(100% - 32px);
}

.wg-toast {
	background: #0f172a;
	color: #f8fafc;
	font-size: 13px;
	font-weight: 700;
	padding: 9px 16px;
	border-radius: 12px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
	animation: wg-toast-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
	text-align: center;
}

html[data-theme="dark"] .wg-toast {
	background: #f8fafc;
	color: #0f172a;
}

.wg-toast.is-leaving {
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 200ms ease, transform 200ms ease;
}

/* Board */
.wg-stage {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 6px 0 14px;
}

.wg-board {
	display: grid;
	grid-template-rows: repeat(6, var(--wg-tile-size));
	gap: var(--wg-gap);
	perspective: 900px;
}

.wg-app[data-length="4"] {
	--wg-cols: 4;
	--wg-tile-size: clamp(50px, 7.2vh, 62px);
}

.wg-app[data-length="5"] {
	--wg-cols: 5;
	--wg-tile-size: clamp(46px, 6.8vh, 58px);
}

.wg-app[data-length="6"] {
	--wg-cols: 6;
	--wg-tile-size: clamp(40px, 6vh, 52px);
}

.wg-row {
	display: grid;
	grid-template-columns: repeat(var(--wg-cols), var(--wg-tile-size));
	gap: var(--wg-gap);
}

.wg-row.is-invalid {
	animation: wg-shake 420ms ease-in-out;
}

.wg-tile {
	width: var(--wg-tile-size);
	height: var(--wg-tile-size);
	border: 2px solid var(--wg-tile-border);
	border-radius: 11px;
	background: var(--wg-tile-bg);
	color: var(--wg-text);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc(var(--wg-tile-size) * 0.5);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	transition: border-color 120ms ease, transform 120ms ease, background-color 180ms ease;
	backface-visibility: hidden;
	will-change: transform;
}

.wg-tile.has-letter {
	border-color: var(--wg-tile-active);
}

.wg-tile.is-pop {
	animation: wg-pop 140ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.wg-tile.is-hinted {
	border-style: dashed;
	border-color: var(--wg-correct);
	color: var(--wg-correct);
}

.wg-tile.is-flipping {
	animation: wg-flip 520ms ease-in-out forwards;
}

.wg-tile.is-correct {
	background: var(--wg-correct);
	border-color: var(--wg-correct);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.wg-tile.is-present {
	background: var(--wg-present);
	border-color: var(--wg-present);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
}

.wg-tile.is-absent {
	background: var(--wg-absent);
	border-color: var(--wg-absent);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.wg-tile.is-win-bounce {
	animation: wg-bounce 560ms ease forwards;
}

/* Inline post-round banner */
.wg-post-round {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 auto 12px;
	padding: 10px 14px;
	border-radius: 14px;
	background: var(--wg-surface-2);
	border: 1px solid var(--wg-border);
}

.wg-post-round[hidden] {
	display: none;
}

.wg-post-round-info {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wg-answer-label {
	font-size: 13px;
	color: var(--wg-muted);
	font-weight: 600;
}

.wg-answer-word {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 8px;
	background: var(--wg-surface);
	border: 1px solid var(--wg-border);
}

.wg-define-link {
	font-size: 12px;
	font-weight: 600;
	color: var(--wg-accent);
	text-decoration: none;
}

.wg-define-link:hover {
	text-decoration: underline;
}

.wg-post-round-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Keyboard */
.wg-keyboard {
	display: flex;
	flex-direction: column;
	gap: 7px;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
}

.wg-kb-row {
	display: flex;
	justify-content: center;
	gap: 5px;
}

.wg-kb-spacer {
	flex: 0.45;
}

.wg-key {
	appearance: none;
	border: 0;
	border-radius: 9px;
	background: var(--wg-key-bg);
	color: var(--wg-key-text);
	height: 48px;
	flex: 1;
	min-width: 0;
	padding: 0 4px;
	font: 700 14px/1 inherit;
	text-transform: uppercase;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
	transition: transform 80ms ease, background-color 180ms ease, color 180ms ease;
	touch-action: manipulation;
}

.wg-key:hover {
	background: var(--wg-key-hover);
}

.wg-key:active {
	transform: translateY(1px);
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}

.wg-key-wide {
	flex: 1.55;
	font-size: 11px;
	letter-spacing: 0.04em;
}

.wg-key.is-correct {
	background: var(--wg-correct);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 var(--wg-correct-lip);
}

.wg-key.is-present {
	background: var(--wg-present);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 var(--wg-present-lip);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.wg-key.is-absent {
	background: var(--wg-absent);
	color: #ffffff;
	box-shadow: inset 0 -2px 0 var(--wg-absent-lip);
	opacity: 0.85;
}

/* Confetti */
.wg-confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 20;
}

.wg-confetti-bit {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	opacity: 0;
	animation: wg-confetti-fall 1100ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

/* Buttons & Modals */
.wg-btn {
	appearance: none;
	border: 1px solid transparent;
	font: 700 14px/1 inherit;
	padding: 10px 16px;
	border-radius: 10px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: all 140ms ease;
}

.wg-btn-primary {
	background: var(--wg-accent);
	color: #ffffff;
}

.wg-btn-primary:hover {
	background: var(--wg-correct-lip);
}

.wg-btn-secondary {
	background: var(--wg-surface-2);
	color: var(--wg-text);
	border-color: var(--wg-border);
}

.wg-btn-secondary:hover {
	background: var(--wg-surface-3);
}

.wg-btn-danger {
	background: rgba(239, 68, 68, 0.12);
	color: #dc2626;
	border-color: rgba(239, 68, 68, 0.28);
}

.wg-btn-danger:hover {
	background: #dc2626;
	color: #ffffff;
}

.wg-btn-block {
	width: 100%;
}

.wg-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.wg-modal-backdrop[hidden] {
	display: none;
}

.wg-modal {
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--wg-surface);
	color: var(--wg-text);
	border: 1px solid var(--wg-border);
	border-radius: 20px;
	padding: 20px 22px 22px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
	animation: wg-modal-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.wg-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.wg-modal-head h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
}

.wg-modal-close {
	appearance: none;
	border: 0;
	background: var(--wg-surface-2);
	color: var(--wg-text);
	width: 32px;
	height: 32px;
	border-radius: 9px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.wg-modal-close:hover {
	background: var(--wg-surface-3);
}

.wg-lead {
	margin: 0 0 12px;
	color: var(--wg-muted);
	font-size: 14px;
	line-height: 1.5;
}

.wg-help-list {
	margin: 0 0 14px;
	padding-left: 18px;
	font-size: 14px;
	color: var(--wg-muted);
}

.wg-examples {
	border-top: 1px solid var(--wg-border);
	border-bottom: 1px solid var(--wg-border);
	padding: 12px 0;
	margin-bottom: 14px;
}

.wg-examples-label {
	margin: 0 0 10px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--wg-muted);
}

.wg-ex-row {
	display: flex;
	gap: 6px;
	margin-bottom: 6px;
}

.wg-ex-tile {
	width: 36px;
	height: 36px;
	border: 2px solid var(--wg-tile-border);
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 16px;
}

.wg-ex-tile.is-correct {
	background: var(--wg-correct);
	border-color: var(--wg-correct);
	color: #fff;
}

.wg-ex-tile.is-present {
	background: var(--wg-present);
	border-color: var(--wg-present);
	color: #fff;
}

.wg-ex-tile.is-absent {
	background: var(--wg-absent);
	border-color: var(--wg-absent);
	color: #fff;
}

.wg-ex-caption {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--wg-muted);
}

.wg-ex-caption:last-child {
	margin-bottom: 0;
}

.wg-help-modes {
	display: grid;
	gap: 8px;
	font-size: 13px;
	color: var(--wg-muted);
}

/* Stats */
.wg-stats-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	border-radius: 11px;
	background: var(--wg-surface-2);
	margin-bottom: 16px;
}

.wg-tab-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--wg-muted);
	font: 700 13px/1 inherit;
	padding: 8px;
	border-radius: 8px;
	cursor: pointer;
}

.wg-tab-btn.is-active {
	background: var(--wg-surface);
	color: var(--wg-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wg-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 18px;
}

.wg-kpi {
	background: var(--wg-surface-2);
	border-radius: 12px;
	padding: 12px 6px;
	text-align: center;
}

.wg-kpi strong {
	display: block;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.wg-kpi span {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: var(--wg-muted);
	font-weight: 600;
}

.wg-dist-title {
	margin: 0 0 10px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wg-muted);
}

.wg-dist {
	display: grid;
	gap: 6px;
	margin-bottom: 16px;
}

.wg-dist-row {
	display: grid;
	grid-template-columns: 18px 1fr;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.wg-dist-track {
	display: flex;
	align-items: center;
}

.wg-dist-bar {
	min-width: 24px;
	height: 22px;
	padding: 0 8px;
	border-radius: 6px;
	background: var(--wg-absent);
	color: #ffffff;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	transition: width 300ms ease;
}

.wg-dist-bar.is-highlight {
	background: var(--wg-correct);
}

.wg-daily-timer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--wg-surface-2);
	font-size: 13px;
	margin-bottom: 14px;
}

.wg-daily-timer strong {
	font-size: 16px;
	font-variant-numeric: tabular-nums;
}

.wg-modal-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

/* Settings */
.wg-setting-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wg-border);
}

.wg-setting-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.wg-setting-row strong {
	display: block;
	font-size: 14px;
}

.wg-setting-row small {
	display: block;
	font-size: 12px;
	color: var(--wg-muted);
	margin-top: 2px;
}

.wg-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.wg-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.wg-slider {
	position: absolute;
	inset: 0;
	background: var(--wg-surface-3);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 180ms ease;
}

.wg-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 180ms ease;
}

.wg-switch input:checked + .wg-slider {
	background: var(--wg-accent);
}

.wg-switch input:checked + .wg-slider::before {
	transform: translateX(20px);
}

/* Challenge form */
.wg-field-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
}

.wg-challenge-input-wrap {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.wg-challenge-input-wrap input,
.wg-challenge-output input {
	flex: 1;
	min-width: 0;
	background: var(--wg-surface-2);
	color: var(--wg-text);
	border: 1px solid var(--wg-border);
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wg-challenge-output {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--wg-border);
}

.wg-challenge-output[hidden] {
	display: none;
}

.wg-challenge-output input {
	font-size: 12px;
	letter-spacing: 0;
	text-transform: none;
}

.wg-challenge-err {
	margin: 0 0 10px;
	color: #dc2626;
	font-size: 13px;
	font-weight: 600;
}

/* Animations */
@keyframes wg-pop {
	0% { transform: scale(0.86); }
	60% { transform: scale(1.08); }
	100% { transform: scale(1); }
}

@keyframes wg-flip {
	0% { transform: rotateX(0deg); }
	48% { transform: rotateX(90deg); }
	52% { transform: rotateX(90deg); }
	100% { transform: rotateX(0deg); }
}

@keyframes wg-shake {
	0%, 100% { transform: translateX(0); }
	18% { transform: translateX(-7px); }
	36% { transform: translateX(7px); }
	54% { transform: translateX(-5px); }
	72% { transform: translateX(5px); }
	90% { transform: translateX(-2px); }
}

@keyframes wg-bounce {
	0%, 100% { transform: translateY(0); }
	35% { transform: translateY(-14px); }
	65% { transform: translateY(3px); }
}

@keyframes wg-toast-in {
	from { opacity: 0; transform: translateY(-8px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wg-modal-in {
	from { opacity: 0; transform: scale(0.95) translateY(8px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wg-confetti-fall {
	0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
	100% { opacity: 0; transform: translateY(220px) rotate(420deg) scale(0.7); }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
	.wg-shell {
		padding: 12px 10px 14px;
		border-radius: 18px;
	}
	.wg-app[data-length="6"] {
		--wg-tile-size: clamp(38px, 12.8vw, 48px);
		--wg-gap: 5px;
	}
	.wg-app[data-length="5"] {
		--wg-tile-size: clamp(44px, 14vw, 54px);
		--wg-gap: 6px;
	}
	.wg-key {
		height: 44px;
		font-size: 13px;
		border-radius: 7px;
	}
	.wg-kb-row {
		gap: 4px;
	}
	.wg-kpi-grid {
		gap: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wg-tile,
	.wg-row,
	.wg-confetti-bit,
	.wg-modal,
	.wg-toast {
		animation: none !important;
		transition: none !important;
	}
}
