/* ═══════════════════════════════════════════════════════════
	 LingoBro v8 — Dark Tropical Theme
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800&display=swap');
@import url('vendor/fontawesome/css/fontawesome.min.css');
@import url('vendor/fontawesome/css/light.min.css');
@import url('vendor/fontawesome/css/solid.min.css');
@import url('vendor/flag-icons/css/flag-icons.min.css');

:root {
	/* Colors */
	--c-bg: #0A1A14;
	--c-surface: #112219;
	--c-surface-2: #172C20;
	--c-surface-3: #1E3829;
	--c-border: rgba(255, 255, 255, .07);
	--c-border-2: rgba(255, 255, 255, .14);
	--c-border-3: rgba(255, 255, 255, .30);
	--c-text: #F0EAD6;
	--c-text-muted: #8FAF9A;
	--c-text-dim: #4A6858;
	--c-coral: #FF6F61;
	--c-gold: #FFD166;
	--c-jade: #4ADE80;
	--c-sky: #4ECDC4;
	--c-red: #FF4757;
	--c-surface-rgb: 17, 34, 25;
	--c-jade-rgb: 74, 222, 128;
	--c-bg-rgb: 10, 26, 20;

	/* Typography */
	--font-display: 'Fredoka', sans-serif;
	--font-body: 'Nunito', sans-serif;
	--fs-2xs: 0.55rem;
	--fs-xs: 0.65rem;
	--fs-sm: 0.75rem;
	--fs-md: 0.875rem;
	--fs-base: 1rem;
	--fs-lg: 1.15rem;
	--fs-xl: 1.35rem;
	--fs-2xl: 1.5rem;
	--fs-3xl: 1.75rem;
	--fs-4xl: 2rem;
	--fs-5xl: 2.5rem;
	--fs-hero: 3.8rem;

	/* Spacing */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-7: 32px;
	--space-8: 40px;

	/* Radius */
	--r-xs: 4px;
	--r-sm: 8px;
	--r-md: 16px;
	--r-lg: 20px;
	--r-xl: 28px;
	--r-full: 999px;

	/* Layout / chrome */
	--nav-h: 68px;
	--sidebar-w: 220px;
	--app-max: 480px;
	--main-max: 780px;
	--ex-max: 680px;
	--border-w: 1px;
	--border-w-strong: 1.5px;
	--icon-btn-sm: 26px;
	--icon-btn-md: 40px;
	--ex-person-w: 4.75rem;
	--scroll-w: 6px;
	--tip-z: 900;

	--app-bg: url('../data/images/app/bg_id_01.png');
}

::selection {
	color: var(--c-surface);
	background: var(--c-jade);
}

/* Slim soft scrollbar */
* {
	scrollbar-width: thin;
	scrollbar-color: rgba(143, 175, 154, 0.35) transparent;
}
*::-webkit-scrollbar {
	width: var(--scroll-w);
	height: var(--scroll-w);
}
*::-webkit-scrollbar-track {
	background: transparent;
}
*::-webkit-scrollbar-thumb {
	background: rgba(143, 175, 154, 0.28);
	border-radius: var(--r-full);
}
*::-webkit-scrollbar-thumb:hover {
	background: rgba(143, 175, 154, 0.48);
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	height: 100%;
	overflow-x: hidden;
}

body {
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	min-height: 100%;
}

#app-root {
	position: relative;
	z-index: 1;
	max-width: var(--app-max);
	min-height: 100vh;
	padding-bottom: var(--nav-h);
	margin: 0 auto;
}

#app-root::before {
	content: '';
	position: fixed;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: var(--app-max);
	height: 100vh;
	background: var(--app-bg) center 0px / contain no-repeat;
	z-index: -1;
}

#app-root::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(160deg, rgba(var(--c-bg-rgb), .72) 0%, rgba(var(--c-bg-rgb), .4) 60%, rgba(var(--c-bg-rgb), .85) 100%);
}

#app-root.exercise-mode {
	padding-bottom: 0;
}

#app-root.exercise-mode::before {
	content: none;
}

#app-content {
	position: relative;
	z-index: 2;
	padding: 0 var(--space-4);
}

#app-root.exercise-mode #app-content {
	padding: 0;
}

/* ── Screen animation ─────────────────────────────────────── */
.screen {
	animation: sIn .22s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes sIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ══════════════════════════════════════════════════════════
	 BOTTOM NAV (mobile) / SIDEBAR (desktop)
══════════════════════════════════════════════════════════ */
.app-nav.bottom-nav,
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: var(--nav-h);
	background: rgba(var(--c-surface-rgb), 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--c-border);
	display: flex;
	z-index: 100;
	max-width: var(--app-max);
	margin: 0 auto;
	transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .25s;
	border-radius: var(--r-md) var(--r-md) 0 0;
}

.nav-brand {
	display: none;
	align-items: center;
	gap: var(--space-2);
}

.nav-brand-icon {
	width: 28px;
	height: 28px;
	border-radius: var(--r-sm);
	object-fit: contain;
	flex-shrink: 0;
}

.nav-lang-switch {
	display: none;
}

.nav-items {
	display: flex;
	flex: 1;
	width: 100%;
}

.bottom-nav.hidden-nav {
	transform: translateY(110%);
	opacity: 0;
	pointer-events: none;
}

.nav-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	cursor: pointer;
	color: var(--c-text-dim);
	border: none;
	background: none;
	font-family: var(--font-body);
	padding: 8px 0;
	transition: color .18s, transform .12s, background .15s, border-color .15s;
	-webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
	color: var(--c-text-muted);
}

.nav-item:active {
	transform: scale(.88);
}

.nav-item:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

.nav-item.active {
	color: var(--c-jade);
}

.nav-item.active .nav-icon {
	transform: scale(1.18);
}

.nav-icon {
	font-size: var(--fs-lg);
	line-height: 1;
	transition: transform .18s;
}

.nav-icon i {
	font-size: var(--fs-lg);
	line-height: 1;
}

.nav-label {
	font-size: var(--fs-xs);
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
	 SCREEN HEADER
══════════════════════════════════════════════════════════ */
.screen-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 0 0;
}

.btn-back {
	width: var(--icon-btn-md);
	height: var(--icon-btn-md);
	border-radius: var(--r-full);
	background: var(--c-surface-2);
	border: var(--border-w) solid var(--c-border-2);
	color: var(--c-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: var(--fs-base);
	flex-shrink: 0;
	transition: background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-back i,
.dict-clear i,
.btn-ex-close i,
.cal-nav-btn i,
.dict-audio-btn i,
.vocab-audio-btn i,
.tts-btn i,
.tips-chevron i,
.lang-pill-arrow i,
.section-view-all i,
.dict-entry-arrow i,
.ex-expand-btn i,
.vocab-check i,
.lang-picker-check i,
.btn-know-it i,
.btn-again i {
	line-height: 1;
	color: inherit;
}

.btn-back:hover {
	background: var(--c-surface-3);
}

.btn-back:active {
	transform: scale(.88);
}

.btn-back:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
	 HOME — HERO
══════════════════════════════════════════════════════════ */
.home-hero {
	position: relative;
	overflow: hidden;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	margin: 0;
}

.home-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40px;
	z-index: -1;
}

.home-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.home-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px 0;
}

.lang-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-full);
	padding: 6px 12px 6px 12px;
	cursor: pointer;
	font-size: var(--fs-md);
	font-weight: 700;
	color: #fff;
	transition: background .15s, border-color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
	background: rgba(var(--c-surface-rgb), 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.lang-pill:hover {
	background: var(--c-surface-2);
	border-color: var(--c-border-2);
}

.lang-pill:active {
	transform: scale(.94);
}

.lang-pill:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
	border-radius: var(--r-full);
}

.lang-pill-flag {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	font-size: var(--fs-lg);
	line-height: 1;
}

.lang-pill-flag .fi {
	width: 1.25em;
	line-height: 1em;
	border-radius: var(--r-xs);
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--c-border-2);
}

.lang-pill-name {
	font-size: var(--fs-sm);
}

.lang-pill-arrow {
	font-size: var(--fs-xs);
	opacity: .7;
	margin-left: 2px;
	display: none;
}

.lang-pill-large {
	width: 100%;
	justify-content: center;
	background: var(--c-surface-2);
	border-color: var(--c-border-2);
	color: var(--c-text);
	font-size: var(--fs-base);
	padding: 14px 18px;
	border-radius: var(--r-md);
}

.lang-pill-large:hover {
	background: var(--c-surface-3);
}

.home-stats-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.home-stat-pill {
	display: flex;
	align-items: center;
	gap: 4px;
	border: 1px solid var(--c-border-2);
	border-radius: 20px;
	padding: 5px 12px;
	font-size: var(--fs-md);
	font-weight: 800;
	color: #fff;
	background: rgba(var(--c-surface-rgb), 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.home-stat-pill strong {
	color: var(--c-gold);
}

.home-greeting-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding: 12px 16px 16px;
	flex: 1;
}

.home-greeting-text {
	flex: 1;
	padding: 0 0 10px 10px;
}

.home-greeting-title {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 4px;
}

.home-greeting-sub {
	font-size: var(--fs-md);
	color: rgba(255, 255, 255, .75);
	margin: 0 0 12px;
}

.home-mascot {
	width: 170px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .5));
	flex-shrink: 0;
	margin: 0px;
	transform: translateY(36px);
}

/* ── Daily goal card ────────────────────────────────────── */
.daily-card {
	margin: 0 0 16px;
	background: rgba(var(--c-surface-rgb), 0.2);
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-lg);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	position: relative;
	z-index: 2;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.streak-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	min-width: 60px;
}

.streak-num {
	font-size: var(--fs-2xl);
	line-height: 1;
}

.streak-big {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	color: var(--c-coral);
	line-height: 1;
}

.streak-label {
	font-size: var(--fs-2xs);
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c-text-muted);
	margin-top: 6px;
}

.divider-v {
	width: 1px;
	height: 44px;
	background: var(--c-border-2);
}

.daily-goal-section {
	flex: 1;
}

.daily-goal-label {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	margin-bottom: 6px;
	font-weight: 600;
}

.xp-bar {
	height: 7px;
	background: var(--c-surface-3);
	border-radius: var(--r-xs);
	overflow: hidden;
	margin-bottom: 4px;
}

.xp-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--c-jade), var(--c-sky));
	border-radius: var(--r-xs);
	transition: width .5s cubic-bezier(.34, 1.56, .64, 1);
	min-width: 3px;
}

.xp-bar-text {
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--c-text-muted);
}

/* ── Section title ──────────────────────────────────────── */
.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0;
	margin: 20px 0 0px;
	position: relative;
	z-index: 2;
}

.section-title {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	color: var(--c-text);
	margin: 16px 0 12px;
}

.section-view-all {
	font-size: var(--fs-sm);
	font-weight: 800;
	color: var(--c-jade);
	background: none;
	border: none;
	cursor: pointer;
	transition: opacity .15s;
	-webkit-tap-highlight-color: transparent;
}

.section-view-all:hover {
	opacity: .7;
}

.section-view-all:active {
	opacity: .5;
}

.section-view-all:focus-visible {
	outline: 2px solid var(--c-jade);
	border-radius: var(--r-xs);
}

/* ══════════════════════════════════════════════════════════
	 CATEGORY CARDS
══════════════════════════════════════════════════════════ */
.category-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 0 0 24px;
	position: relative;
	z-index: 2;
}

.category-card-h {
	display: flex;
	align-items: start;
	gap: 14px;
	background: rgba(var(--c-surface-rgb), 0.6);
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-lg);
	padding: 14px 16px;
	cursor: pointer;
	transition: background .15s, transform .12s, border-color .15s, box-shadow .15s;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	overflow: hidden;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.category-card-h::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--r-lg);
	background: linear-gradient(135deg, rgba(255, 255, 255, .04) 0%, transparent 60%);
	pointer-events: none;
}

.category-card-h:hover {
	background: var(--c-surface-2);
	border-color: var(--c-jade) !important;
	filter: brightness(1.2);
}

.category-card-h:active {
	background: var(--c-surface-3) !important;
	transform: scale(.98);
}

.category-card-h:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.cat-h-icon-ring {
	width: 32px;
	height: 32px;
	border-radius: var(--r-full);
	border: none;
	display: flex;
	align-items: start;
	justify-content: center;
	flex-shrink: 0;
}

.cat-h-icon {
	font-size: var(--fs-2xl);
	line-height: 1;
}

.cat-h-body {
	flex: 1;
	min-width: 0;
}

.cat-h-name {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	color: var(--c-text);
	margin-bottom: 2px;
}

.cat-h-desc {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	margin-bottom: 8px;
}

.mastery-dots {
	display: flex;
	gap: 4px;
}

.mastery-dot {
	width: 7px;
	height: 7px;
	border-radius: var(--r-full);
	background: var(--c-surface-3);
	border: 1px solid transparent;
}

.mastery-dot.filled {
	background: var(--c-jade);
	border-color: var(--c-jade);
}

/* ══════════════════════════════════════════════════════════
	 LEARN
══════════════════════════════════════════════════════════ */
.learn-header {
	padding: 20px 0 14px;
}

.learn-title {
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	font-weight: 700;
	margin-bottom: 4px;
}

.learn-subtitle {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
}

.dict-entry-btn {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0 0 14px;
	border: 1.5px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 14px 16px;
	cursor: pointer;
	transition: background .15s, border-color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
	text-align: left;
	background: rgba(var(--c-surface-rgb), 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.dict-entry-btn:hover {
	background: var(--c-surface-2);
	border-color: var(--c-jade);
}

.dict-entry-btn:active {
	transform: scale(.98);
}

.dict-entry-btn:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
	border-radius: var(--r-md);
}

.dict-entry-icon {
	font-size: var(--fs-3xl);
	flex-shrink: 0;
}

.dict-entry-text {
	flex: 1;
}

.dict-entry-name {
	color: var(--c-text);
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	margin-bottom: 2px;
}

.dict-entry-sub {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

.dict-entry-arrow {
	font-size: var(--fs-xl);
	color: var(--c-text-dim);
}

/* ══════════════════════════════════════════════════════════
	 DICTIONARY
══════════════════════════════════════════════════════════ */
.dict-sticky-top {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 0 var(--space-4) 6px;
	border-bottom: 1px solid var(--c-border);
	margin: 0 -16px;
	background: rgba(var(--c-surface-rgb), 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.dict-search-wrap {
	position: relative;
	padding: 6px 0 0;
}

.dict-search {
	width: 100%;
	background: var(--c-surface-2);
	border: 1.5px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 10px 42px 10px 14px;
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	outline: none;
	transition: border-color .15s;
}

.dict-search::placeholder {
	color: var(--c-text-dim);
}

.dict-search:focus {
	border-color: var(--c-jade);
}

.dict-clear {
	position: absolute;
	right: 8px;
	top: 6px;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	background: none;
	border: none;
	color: var(--c-text-dim);
	cursor: pointer;
	font-size: var(--fs-md);
	transition: color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.dict-clear:hover {
	color: var(--c-text-muted);
}

.dict-clear:active {
	transform: scale(.88);
}

.dict-clear.hidden {
	display: none;
}

.dict-az-bar {
	display: flex;
	gap: 2px;
	padding: 12px 0 6px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.dict-az-bar::-webkit-scrollbar {
	display: none;
}

.dict-az-btn {
	background: none;
	border: 1px solid var(--c-border);
	border-radius: var(--r-sm);
	color: var(--c-text-muted);
	font-size: var(--fs-xs);
	font-weight: 800;
	cursor: pointer;
	padding: 3px 6px;
	flex-shrink: 0;
	transition: background .12s, color .12s, border-color .12s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.dict-az-btn:hover {
	background: var(--c-surface-2);
	color: var(--c-jade);
	border-color: var(--c-jade);
}

.dict-az-btn:active {
	background: var(--c-jade);
	color: var(--c-bg);
	border-color: var(--c-jade);
	transform: scale(.9);
}

.dict-az-btn:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 1px;
}

.dict-count {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

.dict-list {
	padding: 8px 0 100px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dict-letter-header {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	color: var(--c-jade);
	padding-top: 8px;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--c-border);
	scroll-margin-top: 140px;
}

.dict-empty {
	text-align: center;
	color: var(--c-text-muted);
	padding: 40px 0;
	font-size: var(--fs-md);
}

.dict-item {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 11px 13px;
}

.dict-item-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 3px;
}

.dict-word-group {
	flex: 1;
	min-width: 0;
}

.dict-bi-row {
	display: flex;
	align-items: center;
	gap: 7px;
}

.dict-bi {
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-weight: 700;
}

.dict-informal {
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	margin-top: 2px;
}

.dict-informal em {
	color: var(--c-text-muted);
	font-style: normal;
}

.dict-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}

.dict-cat-btn {
	border-radius: var(--r-sm);
	border: 1px solid;
	padding: 2px 8px;
	font-size: var(--fs-sm);
	cursor: pointer;
	transition: filter .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.dict-cat-btn:hover {
	filter: brightness(1.2);
}

.dict-cat-btn:active {
	transform: scale(.9);
}

.dict-audio-btn {
	background: var(--c-surface-3);
	border: var(--border-w) solid var(--c-border);
	border-radius: var(--r-full);
	width: var(--icon-btn-sm);
	height: var(--icon-btn-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	flex-shrink: 0;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.dict-audio-btn:hover {
	background: var(--c-surface-2);
	border-color: var(--c-sky);
	color: var(--c-sky);
}

.dict-audio-btn:active {
	transform: scale(.85);
}

.dict-audio-btn i {
	color: inherit;
	line-height: 1;
}

.dict-pos-en {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 5px;
}

.dict-pos {
	font-size: var(--fs-2xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--c-text-dim);
	background: var(--c-surface-3);
	border-radius: var(--r-xs);
	padding: 2px 6px;
	flex-shrink: 0;
}

.dict-en {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
}

.dict-example {
	border-top: 1px solid var(--c-border);
	padding-top: 5px;
	margin-top: 2px;
}

.dict-ex-row {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-bottom: 2px;
}

.dict-ex-bi {
	font-size: var(--fs-md);
	color: var(--c-text);
	line-height: 1.4;
	flex: 1;
}

.dict-ex-bi strong.ex-hl {
	color: var(--c-gold);
	font-weight: 800;
}

.dict-ex-en {
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	font-style: italic;
}

.examples-block {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.paradigm-block {
	margin: var(--space-3) 0 var(--space-2);
	padding: var(--space-3);
	background: rgba(var(--c-jade-rgb), .06);
	border: var(--border-w) solid rgba(var(--c-jade-rgb), .2);
	border-radius: var(--r-md);
}

.paradigm-title {
	font-size: var(--fs-xs);
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--c-text-muted);
	margin-bottom: var(--space-2);
}

.paradigm-grid {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.paradigm-row {
	display: grid;
	grid-template-columns: var(--ex-person-w) minmax(0, 1fr) auto;
	gap: var(--space-2);
	align-items: center;
	padding: var(--space-1) 0;
}

.paradigm-label {
	font-size: var(--fs-xs);
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--c-jade);
	text-align: center;
}

.paradigm-form {
	font-family: var(--font-display);
	font-size: var(--fs-md);
	font-weight: 600;
	color: var(--c-text);
	text-align: left;
	min-width: 0;
	overflow-wrap: anywhere;
}

.q-person-badge {
	display: inline-block;
	margin-bottom: var(--space-2);
	padding: var(--space-1) var(--space-3);
	font-size: var(--fs-sm);
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--c-jade);
	background: rgba(var(--c-jade-rgb), .14);
	border: var(--border-w) solid rgba(var(--c-jade-rgb), .3);
	border-radius: var(--r-sm);
}

.ex-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--space-2);
	align-items: start;
}

.ex-row.has-person {
	grid-template-columns: var(--ex-person-w) minmax(0, 1fr) auto;
}

.ex-person {
	width: var(--ex-person-w);
	margin-top: var(--space-1);
	font-size: var(--fs-xs);
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--c-jade);
	background: rgba(var(--c-jade-rgb), .12);
	border: var(--border-w) solid rgba(var(--c-jade-rgb), .28);
	border-radius: var(--r-sm);
	padding: var(--space-1) var(--space-2);
	text-align: center;
	line-height: 1.2;
	box-sizing: border-box;
}

.ex-texts {
	min-width: 0;
}

.ex-bi {
	font-size: var(--fs-md);
	color: var(--c-text);
	line-height: 1.4;
}

.ex-bi strong.ex-hl {
	color: var(--c-gold);
	font-weight: 800;
}

.ex-en {
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	font-style: italic;
	margin-top: 1px;
}

.ex-expand-btn {
	align-self: flex-start;
	margin-top: var(--space-1);
	margin-left: calc(var(--ex-person-w) + var(--space-2));
	border: none;
	background: transparent;
	color: var(--c-sky);
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 700;
	cursor: pointer;
	padding: var(--space-1) 0;
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	-webkit-tap-highlight-color: transparent;
}

.ex-expand-btn:hover {
	color: var(--c-jade);
}

.ex-more {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding-top: var(--space-1);
}

.ex-more.hidden {
	display: none;
}

.card-ex-more {
	margin-top: 6px;
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	font-style: normal;
}

/* ══════════════════════════════════════════════════════════
	 CATEGORY DETAIL
══════════════════════════════════════════════════════════ */
.cat-detail-hero {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-lg);
	padding: 18px;
	position: relative;
	overflow: hidden;
}

.cat-detail-hero::after {
	content: attr(data-icon);
	position: absolute;
	right: 12px;
	top: 40%;
	transform: translateY(-50%);
	font-size: var(--fs-hero);
	opacity: .08;
	line-height: 1;
}

.cat-detail-name {
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	font-weight: 700;
	margin-bottom: 4px;
}

.cat-detail-desc {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
	margin-bottom: 12px;
}

.cat-progress-bar {
	height: 5px;
	background: var(--c-surface-3);
	border-radius: 3px;
	margin-bottom: 7px;
	overflow: hidden;
}

.cat-progress-fill {
	height: 100%;
	border-radius: 3px;
	transition: width .5s;
}

.cat-progress-label {
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--c-text-muted);
}

/* Tips */
.tips-section {
	background: var(--c-surface);
	border: 1px solid rgba(255, 209, 102, .18);
	border-radius: var(--r-md);
	overflow: hidden;
	margin: 0 0 14px;
}

.tips-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 14px;
	cursor: pointer;
	font-family: var(--font-display);
	font-size: var(--fs-md);
	font-weight: 600;
	color: var(--c-gold);
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	transition: background .15s;
}

.tips-header:hover {
	background: rgba(255, 209, 102, .05);
}

.tips-header:active {
	background: rgba(255, 209, 102, .09);
}

.tips-chevron {
	font-size: var(--fs-sm);
	opacity: .8;
}

.tips-body {
	display: none;
	padding: 0 14px 12px;
	flex-direction: column;
	gap: 10px;
}

.tips-body.open {
	display: flex;
}

.tip-item {
	border-top: 1px solid var(--c-border);
	padding-top: 8px;
}

.tip-title {
	font-size: var(--fs-md);
	font-weight: 700;
	margin-bottom: 3px;
}

.tip-body {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	line-height: 1.55;
}

/* Action row */
.cat-action-row {
	display: flex;
	gap: 10px;
	padding: 0;
	margin-bottom: 30px;
}

.mix-xp-tag {
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 800;
	background: rgba(255, 255, 255, .2);
	border-radius: 10px;
	padding: 2px 8px;
	margin-left: 6px;
}

.exercise-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
	padding: 0;
}

.exercise-btn {
	background: var(--c-surface);
	border: 1.5px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 13px 11px;
	cursor: pointer;
	text-align: left;
	transition: border-color .15s, background .15s, transform .12s;
	-webkit-tap-highlight-color: transparent;
}

.exercise-btn:hover {
	border-color: var(--c-border-2);
	background: var(--c-surface-2);
	transform: translateY(-2px);
}

.exercise-btn:active {
	transform: scale(.96);
}

.exercise-btn:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.ex-icon {
	font-size: var(--fs-xl);
	margin-bottom: 5px;
}

.ex-name {
	font-family: var(--font-display);
	font-size: var(--fs-md);
	font-weight: 600;
	margin-bottom: 2px;
	color: var(--c-text);
}

.ex-desc {
	font-size: var(--fs-xs);
	color: var(--c-text-muted);
}

/* ══════════════════════════════════════════════════════════
	 BUTTONS — consistent system
══════════════════════════════════════════════════════════ */
.btn-primary {
	background: var(--c-jade);
	color: #0A1A14;
	border: none;
	border-radius: var(--r-md);
	padding: 16px 20px;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 16px rgba(74, 222, 128, .3);
	transition: filter .15s, box-shadow .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 22px rgba(74, 222, 128, .4);
}

.btn-primary:active {
	transform: scale(.97);
	box-shadow: 0 2px 8px rgba(74, 222, 128, .2);
}

.btn-primary:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.btn-secondary {
	background: var(--c-surface-2);
	color: var(--c-text);
	border: 1.5px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 16px 18px;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, border-color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
	background: var(--c-surface-3);
	border-color: var(--c-border-2);
}

.btn-secondary:active {
	transform: scale(.97);
}

.btn-secondary:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.btn-ghost {
	background: transparent;
	color: var(--c-text-muted);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 12px 18px;
	font-family: var(--font-body);
	font-size: var(--fs-md);
	cursor: pointer;
	width: 100%;
	transition: color .15s, border-color .15s, background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-ghost:hover {
	color: var(--c-text);
	border-color: var(--c-border-2);
	background: var(--c-surface-2);
}

.btn-ghost:active {
	transform: scale(.98);
}

.btn-ghost.btn-danger:hover {
	color: var(--c-red);
	border-color: var(--c-red);
}

.btn-danger:focus-visible {
	outline: 2px solid var(--c-red);
	outline-offset: 2px;
}

.btn-full {
	width: 100%;
	margin: 0;
}

.btn-save-small {
	background: var(--c-jade);
	color: #0A1A14;
	border: none;
	border-radius: var(--r-sm);
	padding: 10px 16px;
	font-family: var(--font-display);
	font-size: var(--fs-md);
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: filter .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-save-small:hover {
	filter: brightness(1.1);
}

.btn-save-small:active {
	transform: scale(.95);
}

/* ══════════════════════════════════════════════════════════
	 VOCAB BROWSER
══════════════════════════════════════════════════════════ */
.vocab-list {
	padding: 12px 0 calc(var(--nav-h) + 100px);
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.vocab-item {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 13px 14px;
}

.vocab-item-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 3px;
}

.vocab-word-col {
	flex: 1;
	min-width: 0;
}

.vocab-word-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vocab-word {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 700;
}

.vocab-informal {
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	margin-top: 2px;
}

.vocab-informal em {
	color: var(--c-text-muted);
	font-style: normal;
}

.vocab-badges {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}

.vocab-pos {
	font-size: var(--fs-2xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--c-text-dim);
	background: var(--c-surface-3);
	border-radius: var(--r-xs);
	padding: 2px 6px;
}

.vocab-check {
	color: var(--c-jade);
	font-weight: 800;
	font-size: var(--fs-md);
	display: inline-flex;
	align-items: center;
}

.vocab-check i {
	color: inherit;
}

.vocab-en {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
	margin-bottom: 7px;
}

.vocab-audio-btn {
	background: var(--c-surface-3);
	border: var(--border-w) solid var(--c-border);
	border-radius: var(--r-full);
	width: var(--icon-btn-sm);
	height: var(--icon-btn-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	flex-shrink: 0;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.vocab-audio-btn:hover {
	background: var(--c-surface-2);
	border-color: var(--c-sky);
	color: var(--c-sky);
}

.vocab-audio-btn:active {
	transform: scale(.88);
}

.vocab-audio-btn i {
	color: inherit;
	line-height: 1;
}

.vocab-audio-sm {
	width: calc(var(--icon-btn-sm) - var(--space-1));
	height: calc(var(--icon-btn-sm) - var(--space-1));
	font-size: var(--fs-xs);
}

.vocab-example {
	border-top: 1px solid var(--c-border);
	padding-top: 7px;
}

.vocab-ex-row {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-bottom: 2px;
}

.vocab-ex-bi {
	font-size: var(--fs-md);
	color: var(--c-text);
	line-height: 1.45;
	flex: 1;
}

.vocab-ex-bi strong.ex-hl {
	color: var(--c-gold);
	font-weight: 800;
}

.vocab-ex-en {
	font-size: var(--fs-sm);
	color: var(--c-text-dim);
	font-style: italic;
}

.vocab-practice-bar {
	position: fixed;
	bottom: var(--nav-h);
	left: 0;
	right: 0;
	max-width: var(--app-max);
	margin: 0 auto;
	padding: var(--space-3) var(--space-4) var(--space-4);
	background: linear-gradient(to top, var(--c-bg) 55%, transparent);
	pointer-events: none;
	z-index: 40;
}

.vocab-practice-inner {
	width: 100%;
}

.vocab-practice-bar .btn-primary {
	pointer-events: all;
	width: 100%;
	margin: 0;
}

/* ══════════════════════════════════════════════════════════
	 EXERCISE
══════════════════════════════════════════════════════════ */
.ex-screen {
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow: hidden;
}

.ex-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: rgba(var(--c-bg-rgb), .92);
	backdrop-filter: blur(12px);
	flex-shrink: 0;
}

.btn-ex-close {
	width: 32px;
	height: 32px;
	border-radius: var(--r-full);
	background: var(--c-surface-2);
	border: 1px solid var(--c-border);
	color: var(--c-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: var(--fs-md);
	flex-shrink: 0;
	transition: background .15s, color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-ex-close:hover {
	background: var(--c-surface-3);
	color: var(--c-text);
}

.btn-ex-close:active {
	transform: scale(.88);
}

.btn-ex-close:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.progress-bar-wrap {
	flex: 1;
	height: 8px;
	background: var(--c-surface-3);
	border-radius: var(--r-xs);
	overflow: hidden;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--c-jade), var(--c-sky));
	border-radius: var(--r-xs);
	transition: width .4s;
}

.hearts {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.heart {
	font-size: var(--fs-lg);
}

.heart.lost {
	filter: grayscale(1);
	opacity: .25;
	transform: scale(.82);
}

.ex-inner {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
}

.feedback-slot {
	min-height: 72px;
	margin: 0 16px 8px;
	flex-shrink: 0;
}

.btn-check {
	flex-shrink: 0;
}

.question-area {
	flex: 1;
	padding: 20px 16px 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.q-prompt {
	font-size: var(--fs-sm);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--c-text-muted);
	margin-bottom: 16px;
}

.q-word-card {
	background: var(--c-surface);
	border: 2px solid var(--c-border-2);
	border-radius: var(--r-xl);
	padding: 22px 28px;
	margin-bottom: 12px;
	width: 100%;
	position: relative;
}

.q-word {
	font-family: var(--font-display);
	font-size: var(--fs-4xl);
	font-weight: 700;
	color: var(--c-text);
	line-height: 1.2;
	word-break: break-word;
}

.q-pos {
	font-size: var(--fs-sm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin-top: 6px;
	opacity: .5;
}

.tts-btn {
	position: absolute;
	top: var(--space-3);
	right: var(--space-3);
	width: calc(var(--icon-btn-sm) + var(--space-1));
	height: calc(var(--icon-btn-sm) + var(--space-1));
	border-radius: var(--r-full);
	background: var(--c-surface-3);
	border: var(--border-w) solid var(--c-border);
	color: var(--c-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: var(--fs-md);
	transition: color .15s, background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.tts-btn:hover {
	color: var(--c-sky);
	background: var(--c-surface-2);
}

.tts-btn:active {
	transform: scale(.88);
}

.tts-btn i {
	color: inherit;
	line-height: 1;
}

/* MC options */
.mc-options {
	display: flex;
	flex-direction: column;
	gap: 9px;
	width: 100%;
	padding: 0 var(--space-4);
	margin-bottom: 12px;
}

.mc-option {
	background: var(--c-surface);
	border: 2px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 16px 18px;
	cursor: pointer;
	text-align: left;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: 700;
	color: var(--c-text);
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 60px;
	transition: border-color .12s, background .12s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.mc-option:hover:not([disabled]):not(.selected):not(.correct):not(.wrong) {
	background: var(--c-surface-2);
	border-color: var(--c-sky);
}

.mc-option:active:not([disabled]) {
	filter: brightness(.9);
}

.mc-option:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.mc-option[disabled] {
	cursor: default;
}

.mc-option.selected {
	border-color: var(--c-sky);
	background: rgba(78, 205, 196, .1);
}

.mc-option.correct {
	border-color: var(--c-jade) !important;
	background: rgba(74, 222, 128, .13) !important;
	animation: pulse .35s ease;
}

.mc-option.wrong {
	border-color: var(--c-red) !important;
	background: rgba(255, 71, 87, .1) !important;
	animation: shake .4s ease;
}

.mc-option.reveal-correct {
	border-color: var(--c-jade);
	background: rgba(74, 222, 128, .07);
}

.option-letter {
	width: 30px;
	height: 30px;
	border-radius: var(--r-full);
	background: var(--c-surface-3);
	border: 1.5px solid var(--c-border-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--fs-sm);
	font-weight: 800;
	flex-shrink: 0;
	transition: background .12s, border-color .12s;
}

.mc-option.selected .option-letter {
	background: var(--c-sky);
	border-color: var(--c-sky);
	color: var(--c-bg);
}

.mc-option.correct .option-letter {
	background: var(--c-jade);
	border-color: var(--c-jade);
	color: var(--c-bg);
}

.mc-option.wrong .option-letter {
	background: var(--c-red);
	border-color: var(--c-red);
	color: #fff;
}

.mc-option.reveal-correct .option-letter {
	background: var(--c-jade);
	border-color: var(--c-jade);
	color: var(--c-bg);
}

/* Fill blank */
.fib-sentence {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 600;
	line-height: 1.7;
	color: var(--c-text);
	margin-bottom: 5px;
	padding: 0 var(--space-4);
	text-align: center;
}

.fib-blank {
	display: inline-block;
	border-bottom: 3px solid var(--c-coral);
	min-width: 80px;
	padding: 0 5px;
	color: transparent;
	vertical-align: bottom;
	transition: border-color .2s, color .2s;
}

.fib-blank.filled {
	color: var(--c-coral);
	border-color: var(--c-jade);
}

.fib-blank.correct {
	color: var(--c-jade);
	border-color: var(--c-jade);
}

.fib-blank.wrong {
	color: var(--c-red);
	border-color: var(--c-red);
}

.fib-translation {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	font-style: italic;
	margin-bottom: 14px;
	text-align: center;
	padding: 0 var(--space-4);
}

/* Flashcard */
.flashcard-container {
	width: 100%;
	padding: 0 var(--space-4);
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.flashcard-wrap {
	width: 100%;
	perspective: 1000px;
	cursor: pointer;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 240px;
	-webkit-tap-highlight-color: transparent;
}

.flashcard {
	width: 100%;
	flex: 1;
	position: relative;
	transform-style: preserve-3d;
	transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.flashcard.flipped {
	transform: rotateY(180deg);
}

.card-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	background: var(--c-surface);
	border: 2px solid var(--c-border-2);
	border-radius: var(--r-xl);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 28px;
	text-align: center;
}

.card-face.back {
	transform: rotateY(180deg);
}

.card-tap-hint {
	position: absolute;
	bottom: 14px;
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--c-text-dim);
}

.card-front-word {
	font-family: var(--font-display);
	font-size: var(--fs-4xl);
	font-weight: 700;
	line-height: 1.2;
}

.card-back-word {
	font-family: var(--font-display);
	font-size: var(--fs-4xl);
	font-weight: 700;
	color: var(--c-jade);
	margin-bottom: 12px;
}

.card-back-example {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
	font-style: italic;
	line-height: 1.55;
}

.card-back-example strong.ex-hl {
	color: var(--c-gold);
	font-weight: 800;
	font-style: normal;
}

.flashcard-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 12px 0 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s;
	width: 100%;
	flex-shrink: 0;
}

.flashcard-actions.visible {
	opacity: 1;
	pointer-events: all;
}

.btn-know-it {
	background: rgba(74, 222, 128, .12);
	border: 2px solid var(--c-jade);
	color: var(--c-jade);
	border-radius: var(--r-md);
	padding: 15px;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-know-it:hover {
	background: rgba(74, 222, 128, .22);
}

.btn-know-it:active {
	transform: scale(.95);
}

.btn-again {
	background: rgba(255, 71, 87, .08);
	border: 2px solid var(--c-red);
	color: var(--c-red);
	border-radius: var(--r-md);
	padding: 15px;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-again:hover {
	background: rgba(255, 71, 87, .16);
}

.btn-again:active {
	transform: scale(.95);
}

/* Builder */
.builder-prompt-card {
	background: var(--c-surface);
	border: 2px solid var(--c-border-2);
	border-radius: var(--r-xl);
	padding: 18px 22px;
	margin-bottom: 12px;
	width: 100%;
}

.builder-tts-row {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
}

.builder-source {
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	flex: 1;
}

.builder-answer-row {
	min-height: 54px;
	background: var(--c-surface-2);
	border: 2px dashed var(--c-border-2);
	border-radius: var(--r-md);
	padding: 9px 11px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 0 16px 9px;
	width: calc(100% - 32px);
	transition: border-color .2s, background .2s;
}

.builder-answer-row.correct {
	border-style: solid;
	border-color: var(--c-jade);
	background: rgba(74, 222, 128, .07);
	animation: pulse .4s ease;
}

.builder-answer-row.wrong {
	border-style: solid;
	border-color: var(--c-red);
	background: rgba(255, 71, 87, .06);
	animation: shake .4s ease;
}

.builder-placeholder {
	font-size: var(--fs-md);
	color: var(--c-text-dim);
	font-style: italic;
	margin: auto;
}

.builder-correct-answer {
	margin: 0 16px 7px;
	padding: 9px 13px;
	background: rgba(74, 222, 128, .1);
	border: 1.5px solid rgba(74, 222, 128, .3);
	border-radius: var(--r-md);
	font-size: var(--fs-md);
	color: var(--c-jade);
	font-weight: 600;
	width: calc(100% - 32px);
}

.builder-bank {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 0 var(--space-4);
	margin-bottom: 10px;
	width: 100%;
	justify-content: center;
}

.builder-token {
	border-radius: 9px;
	padding: 8px 14px;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: 700;
	cursor: pointer;
	border: 2px solid;
	transition: transform .1s, opacity .15s, background .12s, border-color .12s;
	-webkit-tap-highlight-color: transparent;
	line-height: 1.2;
}

.builder-token:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.builder-token.bank {
	background: var(--c-surface-2);
	border-color: var(--c-border-2);
	color: var(--c-text);
}

.builder-token.bank:hover:not(.used) {
	background: var(--c-surface-3);
	border-color: var(--c-sky);
	transform: translateY(-2px);
}

.builder-token.bank:active {
	transform: scale(.93);
}

.builder-token.bank.used {
	opacity: .2;
	pointer-events: none;
}

.builder-token.placed {
	background: var(--c-surface-3);
	border-color: var(--c-sky);
	color: var(--c-text);
}

.builder-token.placed:hover:not(.correct):not(.wrong) {
	background: rgba(255, 71, 87, .1);
	border-color: var(--c-red);
}

.builder-token.placed:active {
	transform: scale(.93);
}

.builder-token.placed.correct {
	background: rgba(74, 222, 128, .2);
	border-color: var(--c-jade);
	color: var(--c-jade);
}

.builder-token.placed.wrong {
	background: rgba(255, 71, 87, .15);
	border-color: var(--c-red);
	color: var(--c-red);
}

/* Feedback */
.feedback-banner {
	margin: 0 16px 14px;
	padding: 13px 14px;
	border-radius: var(--r-md);
	display: flex;
	align-items: flex-start;
	gap: 9px;
	min-height: 72px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	animation: none;
	flex-shrink: 0;
}

.feedback-banner.visible {
	visibility: visible;
	opacity: 1;
	animation: banIn .22s ease;
}

@keyframes banIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.feedback-banner.correct-fb {
	background: rgba(74, 222, 128, .12);
	border: 1.5px solid rgba(74, 222, 128, .3);
}

.feedback-banner.wrong-fb {
	background: rgba(255, 71, 87, .1);
	border: 1.5px solid rgba(255, 71, 87, .3);
}

.fb-icon {
	font-size: var(--fs-lg);
	flex-shrink: 0;
	margin-top: 1px;
}

.fb-body {
	flex: 1;
	min-width: 0;
}

.fb-title-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	margin-bottom: 2px;
}

.fb-title {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
}

.fb-xp {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	color: var(--c-jade);
	flex-shrink: 0;
	margin-left: auto;
	text-align: right;
}

.correct-fb .fb-title {
	color: var(--c-jade);
}

.correct-fb .fb-icon {
	color: var(--c-jade);
}

.wrong-fb .fb-title {
	color: var(--c-red);
}

.wrong-fb .fb-icon {
	color: var(--c-red);
}

.fb-text {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

/* Check button */
.btn-check {
	margin: 0 16px 14px;
	width: calc(100% - 32px);
	padding: 16px;
	border-radius: var(--r-md);
	border: none;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	cursor: pointer;
	letter-spacing: .04em;
	flex-shrink: 0;
	transition: filter .12s, box-shadow .12s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.btn-check:disabled {
	background: var(--c-surface-3);
	color: var(--c-text-dim);
	cursor: default;
}

.btn-check.ready {
	background: var(--c-coral);
	color: #fff;
	box-shadow: 0 4px 16px rgba(255, 111, 97, .4);
}

.btn-check.ready:hover {
	filter: brightness(1.08);
}

.btn-check.ready:active {
	transform: scale(.97);
	box-shadow: none;
}

.btn-check.continue-correct {
	background: var(--c-jade);
	color: var(--c-bg);
	box-shadow: 0 4px 14px rgba(74, 222, 128, .35);
}

.btn-check.continue-correct:hover {
	filter: brightness(1.06);
}

.btn-check.continue-correct:active {
	transform: scale(.97);
}

.btn-check.continue-wrong {
	background: var(--c-red);
	color: #fff;
	box-shadow: 0 4px 14px rgba(255, 71, 87, .3);
}

.btn-check.continue-wrong:hover {
	filter: brightness(1.08);
}

.btn-check.continue-wrong:active {
	transform: scale(.97);
}

/* ══════════════════════════════════════════════════════════
	 RESULTS
══════════════════════════════════════════════════════════ */
.results-screen {
	padding: 28px 0 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.results-emoji {
	font-size: var(--fs-hero);
	margin-bottom: 10px;
	animation: resIn .45s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes resIn {
	from {
		transform: scale(.4) rotate(-15deg);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

.results-title {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	margin-bottom: 4px;
}

.results-subtitle {
	color: var(--c-text-muted);
	margin-bottom: 24px;
	font-size: var(--fs-md);
}

.stars-row {
	display: flex;
	gap: 7px;
	margin-bottom: 24px;
}

.star {
	font-size: var(--fs-4xl);
	filter: grayscale(1) opacity(.2);
}

.star.earned {
	filter: none;
	animation: starPop .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes starPop {
	from {
		transform: scale(0) rotate(-20deg);
	}

	to {
		transform: none;
	}
}

.results-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 9px;
	width: 100%;
	margin-bottom: 24px;
}

.results-stat {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 13px 8px;
}

.results-stat-num {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	line-height: 1;
	margin-bottom: 3px;
}

.results-stat-label {
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--c-text-muted);
}

.results-btn-group {
	display: flex;
	flex-direction: column;
	gap: 9px;
	width: 100%;
}

/* ══════════════════════════════════════════════════════════
	 STATS
══════════════════════════════════════════════════════════ */
.stats-screen {
	padding: 0 0 24px;
}

.stats-header {
	padding: 20px 0 14px;
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	font-weight: 700;
}

.stats-summary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 9px;
	padding: 0 0 18px;
}

.stat-card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 14px 8px;
	text-align: center;
}

.stat-num {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	line-height: 1;
	margin-bottom: 3px;
}

.stat-lbl {
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--c-text-muted);
	margin: 8px 0 0;
}

/* ── Duolingo Calendar ───────────────────────────────────── */
.cal-wrapper {
	padding: 0 0 8px;
}

.cal-du {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-lg);
	padding: 14px;
}

.cal-du-nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.cal-du-month-title {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
}

.cal-nav-btn {
	background: var(--c-surface-2);
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-full);
	width: 30px;
	height: 30px;
	color: var(--c-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--fs-base);
	transition: background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.cal-nav-btn:hover {
	background: var(--c-surface-3);
}

.cal-nav-btn:active {
	transform: scale(.88);
}

.cal-nav-btn:disabled {
	opacity: .3;
	cursor: default;
	pointer-events: none;
}

.cal-stats-row {
	display: flex;
	gap: 7px;
	margin-bottom: 12px;
}

.cal-stat-pill {
	background: var(--c-surface-2);
	border: 1px solid var(--c-border);
	border-radius: 20px;
	padding: 4px 11px;
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

.cal-stat-pill strong {
	color: var(--c-coral);
}

.cal-day-labels {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 3px;
}

.cal-day-label {
	text-align: center;
	font-size: var(--fs-2xs);
	font-weight: 800;
	color: var(--c-text-dim);
	text-transform: uppercase;
	padding: 2px 0;
}

.cal-grid {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cal-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
	position: relative;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Streak pill background */
.cal-cell.studied::before {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 74%;
	z-index: 0;
	background: linear-gradient(90deg, #FF8C00, #FF4500);
}

.cal-cell.streak-solo::before {
	left: 8%;
	right: 8%;
	border-radius: 100px;
}

.cal-cell.streak-start::before {
	left: 8%;
	right: 0;
	border-radius: 100px 0 0 100px;
}

.cal-cell.streak-mid::before {
	left: 0;
	right: 0;
	border-radius: 0;
}

.cal-cell.streak-end::before {
	left: 0;
	right: 8%;
	border-radius: 0 100px 100px 0;
}

/* Number circle */
.cal-day-num {
	position: relative;
	z-index: 1;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--fs-sm);
	font-weight: 600;
	border-radius: var(--r-full);
	color: var(--c-text-dim);
}

.cal-cell.studied .cal-day-num {
	background: #fff;
	color: #C84000;
	font-weight: 800;
	font-size: var(--fs-sm);
}

.cal-cell.cal-today:not(.studied) .cal-day-num {
	border: 2px solid var(--c-coral);
	color: var(--c-coral);
	font-weight: 800;
}

.cal-cell.cal-today.studied .cal-day-num {
	background: #fff;
	color: #C84000;
	font-weight: 800;
	box-shadow: 0 0 0 2.5px var(--c-gold);
}

.cal-cell.cal-future .cal-day-num {
	opacity: .35;
}

/* Progress list */
.progress-category-list {
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.progress-cat-item {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 13px 14px;
	display: flex;
	align-items: center;
	gap: 11px;
	cursor: pointer;
	transition: background .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.progress-cat-item:hover {
	background: var(--c-surface-2);
}

.progress-cat-item:active {
	transform: scale(.98);
}

.pci-icon {
	font-size: var(--fs-xl);
	flex-shrink: 0;
}

.pci-info {
	flex: 1;
	min-width: 0;
}

.pci-name {
	font-family: var(--font-display);
	font-size: var(--fs-md);
	font-weight: 600;
	margin-bottom: 2px;
}

.pci-sub {
	font-size: var(--fs-xs);
	color: var(--c-text-dim);
	margin-bottom: 4px;
}

.pci-bar {
	height: 4px;
	background: var(--c-surface-3);
	border-radius: 2px;
	overflow: hidden;
}

.pci-bar-fill {
	height: 100%;
	border-radius: 2px;
	transition: width .5s;
}

.pci-count {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	flex-shrink: 0;
	font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
	 PROFILE
══════════════════════════════════════════════════════════ */
.profile-header {
	border-bottom: 1px solid var(--c-border);
	padding: 24px 0 20px;
	margin: 0;
	width: 100%;
	box-sizing: border-box;
	background: rgba(var(--c-surface-rgb), 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.profile-hero {
	display: flex;
	align-items: center;
	gap: 16px;
}

.profile-avatar-big {
	width: 72px;
	height: 72px;
	border-radius: var(--r-full);
	object-fit: cover;
	border: 3px solid var(--c-jade);
	flex-shrink: 0;
}

.profile-user-info {
	flex: 1;
	min-width: 0;
}

.profile-username {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 700;
	margin-bottom: 4px;
}

.profile-lang {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-md);
	color: var(--c-text-muted);
}

.profile-lang .fi {
	font-size: var(--fs-base);
	width: 1.25em;
	line-height: 1em;
	border-radius: var(--r-xs);
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--c-border);
}

.profile-stats-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 9px;
	padding: 16px 0;
}

.profile-stat {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 14px 8px;
	text-align: center;
}

.profile-stat-num {
	font-family: var(--font-display);
	font-size: var(--fs-3xl);
	font-weight: 700;
	line-height: 1;
	margin-bottom: 3px;
}

.profile-stat-label {
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--c-text-muted);
}

.profile-section {
	padding: 0 0 16px;
}

.profile-section-title {
	font-size: var(--fs-sm);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--c-text-muted);
	margin: 10px 0 10px;
}

.profile-input-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

.profile-input {
	flex: 1;
	background: var(--c-surface-2);
	border: 1.5px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 12px 14px;
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	outline: none;
	transition: border-color .15s;
}

.profile-input:focus {
	border-color: var(--c-jade);
}

.avatar-grid {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.avatar-option {
	background: none;
	border: 3px solid var(--c-border);
	border-radius: var(--r-full);
	padding: 0;
	cursor: pointer;
	width: 64px;
	height: 64px;
	overflow: hidden;
	transition: border-color .15s, transform .12s;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
}

.avatar-option:hover {
	border-color: var(--c-text-muted);
}

.avatar-option:active {
	transform: scale(.92);
}

.avatar-option.selected {
	border-color: var(--c-jade);
	box-shadow: 0 0 0 2px rgba(74, 222, 128, .35);
}

.avatar-option img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ══════════════════════════════════════════════════════════
	 LOADING SCREEN
══════════════════════════════════════════════════════════ */
.loading-screen {
	position: fixed;
	inset: 0;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	opacity: 0;
	transition: opacity .3s ease;
	background: var(--c-bg);
}

.loading-screen.loading-in {
	opacity: 1;
}

.loading-screen.loading-out {
	opacity: 0;
}

.loading-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.loading-screen::after {
	content: '';
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(ellipse at center, rgba(5, 15, 10, 0.25) 0%, rgba(5, 15, 10, 0.55) 50%, rgba(5, 15, 10, 0.82) 100%),
		linear-gradient(to top, rgba(5, 15, 10, 0.9) 0%, transparent 45%);
	pointer-events: none;
}

.loading-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 32px 24px;
}

.loading-mascot {
	width: 140px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .6));
	animation: mascotBounce 1s ease-in-out infinite alternate;
}

@keyframes mascotBounce {
	from {
		transform: translateY(0);
	}

	to {
		transform: translateY(-10px);
	}
}

.loading-dots {
	display: flex;
	gap: 8px;
}

.loading-dots span {
	width: 10px;
	height: 10px;
	border-radius: var(--r-full);
	background: var(--c-jade);
	display: block;
	animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
	animation-delay: .2s;
}

.loading-dots span:nth-child(3) {
	animation-delay: .4s;
}

@keyframes dotPulse {

	0%,
	80%,
	100% {
		opacity: .25;
		transform: scale(.7);
	}

	40% {
		opacity: 1;
		transform: scale(1);
	}
}

.loading-tip {
	font-size: var(--fs-md);
	color: rgba(255, 255, 255, .75);
	text-align: center;
	max-width: 240px;
	line-height: 1.5;
	font-style: italic;
}

/* ══════════════════════════════════════════════════════════
	 LANGUAGE PICKER
══════════════════════════════════════════════════════════ */
.lang-picker-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 4px;
}

.lang-picker-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--c-surface-2);
	border: 1.5px solid var(--c-border);
	border-radius: var(--r-md);
	cursor: pointer;
	text-align: left;
	width: 100%;
	transition: background .15s, border-color .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.lang-picker-item:hover {
	background: var(--c-surface-3);
	border-color: var(--c-border-2);
}

.lang-picker-item:active {
	transform: scale(.98);
}

.lang-picker-item.active {
	border-color: var(--c-jade);
	background: rgba(var(--c-jade-rgb), .07);
}

.lang-picker-flag {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	font-size: var(--fs-2xl);
	line-height: 1;
}

.lang-picker-flag .fi {
	width: 1.35em;
	line-height: 1em;
	border-radius: var(--r-sm);
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--c-border-2);
}

.lang-picker-names {
	flex: 1;
}

.lang-picker-native {
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 700;
	color: var(--c-text);
}

.lang-picker-en {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

.lang-picker-check {
	width: var(--icon-btn-sm);
	height: var(--icon-btn-sm);
	border-radius: var(--r-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--c-surface-3);
	background: var(--c-jade);
	font-size: var(--fs-sm);
}

.lang-picker-check i {
	color: inherit;
	line-height: 1;
}

/* ══════════════════════════════════════════════════════════
	 MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .65);
	backdrop-filter: blur(8px);
	z-index: 500;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	animation: fadeIn .18s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.modal-sheet {
	background: var(--c-surface-2);
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-xl) var(--r-xl) 0 0;
	padding: 20px 20px 36px;
	width: 100%;
	max-width: var(--app-max);
	animation: sheetUp .28s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes sheetUp {
	from {
		transform: translateY(100%);
	}

	to {
		transform: none;
	}
}

.modal-handle {
	width: 36px;
	height: 4px;
	border-radius: 2px;
	background: var(--c-border-2);
	margin: 0 auto 18px;
}

.modal-icon {
	font-size: var(--fs-4xl);
	text-align: center;
	margin-bottom: 10px;
}

.modal-title {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 700;
	text-align: center;
	margin-bottom: 5px;
}

.modal-text {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
	text-align: center;
	margin-bottom: 20px;
	line-height: 1.5;
}

.modal-btn-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
}

.modal-btn {
	padding: 14px;
	border-radius: var(--r-md);
	border: none;
	font-family: var(--font-display);
	font-size: var(--fs-base);
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

.modal-btn:focus-visible {
	outline: 2px solid var(--c-jade);
	outline-offset: 2px;
}

.modal-btn:active {
	transform: scale(.95);
}

.modal-btn-cancel {
	background: var(--c-surface-3);
	color: var(--c-text);
}

.modal-btn-cancel:hover {
	filter: brightness(1.2);
}

.modal-btn-confirm {
	background: var(--c-red);
	color: #fff;
	box-shadow: 0 4px 12px rgba(255, 71, 87, .3);
}

.modal-btn-confirm:hover {
	filter: brightness(1.1);
}

/* ══════════════════════════════════════════════════════════
	 TOAST / XP FLOAT / CONFETTI
══════════════════════════════════════════════════════════ */
.toast {
	position: fixed;
	bottom: calc(var(--nav-h) + 12px);
	left: 12px;
	right: 12px;
	max-width: var(--app-max);
	margin: 0 auto;
	background: var(--c-surface-2);
	border: 1px solid var(--c-border-2);
	border-radius: var(--r-md);
	padding: 11px 14px;
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	z-index: 400;
	transform: translateY(18px);
	opacity: 0;
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .28s;
	pointer-events: none;
}

.toast.toast-show {
	transform: none;
	opacity: 1;
}

.xp-float {
	position: fixed;
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-weight: 800;
	color: var(--c-gold);
	pointer-events: none;
	z-index: 200;
	text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
	animation: xpUp 1.2s ease-out forwards;
}

@keyframes xpUp {
	0% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

	70% {
		opacity: 1;
		transform: translateY(-50px) scale(1.15);
	}

	100% {
		opacity: 0;
		transform: translateY(-76px) scale(.9);
	}
}

.confetti-piece {
	position: fixed;
	width: 8px;
	height: 12px;
	border-radius: 2px;
	pointer-events: none;
	z-index: 300;
	animation: confFall 1.4s ease-in forwards;
}

@keyframes confFall {
	0% {
		transform: translateY(0) rotate(0deg);
		opacity: 1;
	}

	100% {
		transform: translateY(60vh) rotate(720deg) scaleX(.4);
		opacity: 0;
	}
}

/* ══════════════════════════════════════════════════════════
	 KEYFRAMES
══════════════════════════════════════════════════════════ */
@keyframes pulse {
	0% {
		transform: scale(1);
	}

	40% {
		transform: scale(1.025);
	}

	100% {
		transform: scale(1);
	}
}

@keyframes shake {

	0%,
	100% {
		transform: translateX(0);
	}

	20% {
		transform: translateX(-7px);
	}

	40% {
		transform: translateX(7px);
	}

	60% {
		transform: translateX(-4px);
	}

	80% {
		transform: translateX(4px);
	}
}

::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(143, 175, 154, 0.28);
	border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(143, 175, 154, 0.45);
}

/* ══════════════════════════════════════════════════════════
	 TOOLTIPS
══════════════════════════════════════════════════════════ */
#app-tooltip {
	position: fixed;
	z-index: var(--tip-z);
	max-width: 220px;
	padding: var(--space-1) var(--space-2);
	border-radius: var(--r-sm);
	border: var(--border-w) solid var(--c-border-2);
	background: var(--c-surface-3);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	font-weight: 600;
	line-height: 1.3;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .12s ease, transform .12s ease;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
	white-space: nowrap;
}

#app-tooltip.visible {
	opacity: 1;
	transform: translateY(0);
}

#app-tooltip.hidden {
	display: none;
}

/* ══════════════════════════════════════════════════════════
	 RESPONSIVE / DESKTOP
══════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
	.q-word {
		font-size: var(--fs-4xl);
	}

	.card-front-word {
		font-size: var(--fs-5xl);
	}
}

@media (min-width: 900px) {
	body {
		background: var(--c-bg);
	}

	.app-nav.bottom-nav,
	.bottom-nav {
		top: 0;
		bottom: 0;
		left: 0;
		right: auto;
		width: var(--sidebar-w);
		height: 100vh;
		max-width: none;
		margin: 0;
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-4);
		padding: var(--space-5) var(--space-3);
		border-radius: 0;
		border-top: none;
		border-right: var(--border-w) solid var(--c-border);
		background: rgba(var(--c-surface-rgb), 0.92);
	}

	.bottom-nav.hidden-nav {
		transform: translateX(-110%);
		opacity: 0;
		pointer-events: none;
	}

	.nav-brand {
		display: flex;
		font-family: var(--font-display);
		font-size: var(--fs-xl);
		font-weight: 700;
		color: var(--c-jade);
		padding: var(--space-2) var(--space-3) var(--space-4);
		letter-spacing: .02em;
	}

	.nav-lang-switch {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		width: 100%;
		margin-top: auto;
		padding: var(--space-3);
		border-radius: var(--r-md);
		border: var(--border-w) solid var(--c-border-2);
		background: rgba(var(--c-surface-rgb), 0.6);
		color: var(--c-text);
		font-family: var(--font-body);
		font-size: var(--fs-sm);
		font-weight: 700;
		cursor: pointer;
		transition: background .15s, border-color .15s;
	}

	.nav-lang-switch:hover {
		background: var(--c-surface-2);
		border-color: rgba(var(--c-jade-rgb), .35);
	}

	.nav-lang-switch:focus-visible {
		outline: 2px solid var(--c-jade);
		outline-offset: 2px;
	}

	.nav-lang-flag {
		display: inline-flex;
		flex-shrink: 0;
	}

	.nav-lang-flag .fi {
		width: 1.35em;
		line-height: 1em;
		border-radius: var(--r-xs);
		overflow: hidden;
		box-shadow: 0 0 0 1px var(--c-border);
	}

	.nav-lang-name {
		flex: 1;
		text-align: left;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.nav-lang-chevron {
		opacity: .7;
		font-size: var(--fs-xs);
		flex-shrink: 0;
	}

	/* Soft side fades: mask the jungle bg so edges blend into --c-bg */
	#app-root::before {
		left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2);
		max-width: var(--main-max);
		width: min(100% - var(--sidebar-w), var(--main-max));
		background-size: 100% auto;
		background-position: center top;
		-webkit-mask-image: linear-gradient(
			to right,
			transparent 0%,
			rgba(0, 0, 0, 0.35) 4%,
			#000 14%,
			#000 86%,
			rgba(0, 0, 0, 0.35) 96%,
			transparent 100%
		);
		mask-image: linear-gradient(
			to right,
			transparent 0%,
			rgba(0, 0, 0, 0.35) 4%,
			#000 14%,
			#000 86%,
			rgba(0, 0, 0, 0.35) 96%,
			transparent 100%
		);
	}

	/* Side gutters: soft wash over the main stage edges (above bg, below UI) */
	#app-root {
		--side-fade: linear-gradient(to right, var(--c-bg), transparent);
	}

	#app-content::before,
	#app-content::after {
		content: '';
		position: fixed;
		top: 0;
		bottom: 0;
		width: 72px;
		pointer-events: none;
		z-index: 1;
	}

	#app-content::before {
		left: var(--sidebar-w);
		background: linear-gradient(to right, var(--c-bg) 0%, transparent 100%);
	}

	#app-content::after {
		right: 0;
		background: linear-gradient(to left, var(--c-bg) 0%, transparent 100%);
	}

	body:has(.loading-screen) #app-content::before,
	body:has(.loading-screen) #app-content::after {
		opacity: 0;
	}

	.nav-items {
		flex-direction: column;
		gap: var(--space-1);
		flex: 1;
		width: 100%;
	}

	.nav-item {
		flex: 0 0 auto;
		flex-direction: row;
		justify-content: flex-start;
		gap: var(--space-3);
		padding: var(--space-3) var(--space-3);
		border-radius: var(--r-md);
		border: var(--border-w) solid transparent;
		width: 100%;
	}

	.nav-item:active {
		transform: none;
	}

	.nav-item.active {
		background: rgba(var(--c-jade-rgb), .12);
		border-color: rgba(var(--c-jade-rgb), .35);
		color: var(--c-jade);
	}

	.nav-item.active .nav-icon {
		transform: none;
	}

	.nav-label {
		font-size: var(--fs-sm);
		letter-spacing: .08em;
	}

	#app-root {
		margin-left: var(--sidebar-w);
		max-width: none;
		width: calc(100% - var(--sidebar-w));
		border: none;
		padding-bottom: var(--space-7);
	}

	#app-root.exercise-mode {
		margin-left: 0;
		width: 100%;
		padding-bottom: 0;
	}

	#app-root.exercise-mode::before {
		content: none;
	}

	#app-content {
		max-width: var(--main-max);
		margin: 0 auto;
		padding: 0 var(--space-6);
	}

	#app-root.exercise-mode #app-content {
		max-width: none;
		padding: 0;
		margin: 0;
	}

	.category-list {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--space-3);
		padding-bottom: var(--space-7);
	}

	.ex-screen {
		max-width: var(--ex-max);
		margin: 0 auto;
		height: 100vh;
	}

	.ex-topbar {
		padding: var(--space-4) 0;
		background: transparent;
		backdrop-filter: none;
	}

	.ex-inner {
		padding-left: 0;
		padding-right: 0;
	}

	.modal-sheet {
		max-width: var(--main-max);
	}

	.vocab-practice-bar {
		left: var(--sidebar-w);
		right: 0;
		max-width: none;
		padding: var(--space-3) 0 var(--space-4);
		bottom: 0;
	}

	.vocab-practice-inner {
		max-width: var(--main-max);
		margin: 0 auto;
		padding: 0 var(--space-7);
		box-sizing: border-box;
	}

	.vocab-practice-bar .btn-primary {
		max-width: none;
		width: 100%;
		margin: 0;
		display: block;
	}
}