[v-cloak] {
	display: none !important;
}

:root {
	--vb-indigo-950: #1e1b4b;
	--vb-indigo-900: #312e81;
	--vb-indigo-700: #4338ca;
	--vb-indigo-600: #4f46e5;
	--vb-indigo-100: #e0e7ff;
	--vb-emerald-700: #047857;
	--vb-emerald-600: #059669;
	--vb-emerald-100: #d1fae5;
	--vb-amber-400: #fbbf24;
	--vb-rose-600: #e11d48;
	--vb-slate-950: #020617;
	--vb-slate-900: #0f172a;
	--vb-slate-700: #334155;
	--vb-slate-500: #64748b;
	--vb-slate-200: #e2e8f0;
	--vb-slate-100: #f1f5f9;
	--vb-white: #ffffff;
	--vb-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-width: 320px;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
	outline: 3px solid var(--vb-amber-400);
	outline-offset: 3px;
}

.vb-app {
	min-height: 100vh;
	background:
		radial-gradient(circle at 15% 5%, rgba(99, 102, 241, 0.24), transparent 34rem),
		linear-gradient(155deg, #0f172a 0%, #1e1b4b 62%, #172554 100%);
}

.vb-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: 64px;
	padding: 0.65rem clamp(1rem, 2.5vw, 2rem);
	color: white;
	background: rgba(15, 23, 42, 0.82);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(18px);
}

.vb-topbar__back,
.vb-formula-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 44px;
	color: rgba(255, 255, 255, 0.84);
	font-weight: 700;
	text-decoration: none;
}

.vb-topbar__back {
	justify-self: start;
}

.vb-topbar__back:hover {
	color: white;
}

.vb-topbar__title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 1rem;
	font-weight: 800;
	text-align: center;
}

.vb-topbar__gem {
	display: grid;
	width: 31px;
	height: 31px;
	place-items: center;
	color: #a7f3d0;
	background: rgba(16, 185, 129, 0.17);
	border: 1px solid rgba(167, 243, 208, 0.4);
	border-radius: 50%;
	box-shadow: inset 0 0 14px rgba(167, 243, 208, 0.22);
}

.vb-formula-trigger {
	padding: 0 1rem;
	color: white;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 12px;
	cursor: pointer;
}

.vb-formula-trigger:hover {
	background: rgba(255, 255, 255, 0.17);
}

.vb-layout {
	display: grid;
	grid-template-columns: minmax(350px, 0.78fr) minmax(540px, 1.22fr);
	gap: clamp(1rem, 2vw, 1.5rem);
	width: min(1480px, 100%);
	min-height: calc(100vh - 64px);
	margin: 0 auto;
	padding: clamp(1rem, 2vw, 1.5rem);
}

.vb-tower-panel,
.vb-workspace {
	min-width: 0;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 24px;
	box-shadow: var(--vb-shadow);
}

.vb-tower-panel {
	position: sticky;
	top: 80px;
	align-self: start;
	height: calc(100vh - 96px);
	min-height: 650px;
	overflow: hidden;
	color: white;
	background: #101a3a;
}

.vb-tower-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% center;
}

.vb-tower-vignette {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to bottom, rgba(5, 10, 29, 0.62), transparent 26%, transparent 67%, rgba(5, 10, 29, 0.86)),
		linear-gradient(to right, transparent 48%, rgba(5, 10, 29, 0.42));
	pointer-events: none;
}

.vb-tower-heading {
	position: relative;
	z-index: 2;
	padding: clamp(1.25rem, 3vw, 2rem);
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.vb-eyebrow {
	margin: 0 0 0.3rem;
	color: var(--vb-emerald-700);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.vb-tower-heading .vb-eyebrow {
	color: #a7f3d0;
}

.vb-tower-heading h1 {
	margin: 0;
	font-size: clamp(1.55rem, 3vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.025em;
}

.vb-tower-heading p:last-child {
	margin: 0.3rem 0 0;
	color: rgba(255, 255, 255, 0.74);
	font-size: 0.88rem;
}

.vb-floor-stack {
	position: absolute;
	z-index: 3;
	top: clamp(128px, 19%, 170px);
	right: 1rem;
	bottom: 154px;
	display: grid;
	grid-template-rows: repeat(7, minmax(45px, 1fr));
	align-items: center;
	width: min(52%, 225px);
	gap: 0.25rem;
}

.vb-floor {
	position: relative;
	display: grid;
	grid-template-columns: 12px 30px 1fr 12px;
	align-items: center;
	gap: 0.45rem;
	min-height: 45px;
	padding: 0.35rem 0.6rem;
	color: rgba(255, 255, 255, 0.75);
	text-align: left;
	background: rgba(6, 16, 40, 0.52);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
	cursor: pointer;
	transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.vb-floor:hover,
.vb-floor.is-selected {
	color: white;
	background: rgba(30, 41, 89, 0.82);
	border-color: rgba(167, 243, 208, 0.72);
	transform: translateX(-4px);
}

.vb-floor__lamp {
	width: 10px;
	height: 10px;
	background: rgba(148, 163, 184, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 50%;
}

.vb-floor--lit .vb-floor__lamp {
	background: #34d399;
	box-shadow: 0 0 13px 4px rgba(52, 211, 153, 0.58);
}

.vb-floor--steady .vb-floor__lamp {
	background: #fcd34d;
	box-shadow: 0 0 15px 5px rgba(251, 191, 36, 0.68);
}

.vb-floor__number {
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	color: white;
	font-size: 0.8rem;
	font-weight: 800;
	background: rgba(255, 255, 255, 0.13);
	border-radius: 9px;
}

.vb-floor__name {
	overflow: hidden;
	font-size: 0.84rem;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vb-floor__arrow {
	font-size: 0.65rem;
	opacity: 0.52;
}

.vb-alapana {
	position: absolute;
	z-index: 3;
	right: 1rem;
	bottom: 94px;
	left: 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 48px;
	padding: 0.55rem 0.8rem;
	color: rgba(255, 255, 255, 0.9);
	text-align: left;
	background: rgba(6, 16, 40, 0.67);
	border: 1px solid rgba(251, 191, 36, 0.38);
	border-radius: 13px;
	backdrop-filter: blur(12px);
	cursor: pointer;
}

.vb-alapana > i {
	display: grid;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	place-items: center;
	color: var(--vb-amber-400);
	background: rgba(251, 191, 36, 0.12);
	border-radius: 50%;
}

.vb-alapana span {
	display: block;
	line-height: 1.15;
}

.vb-alapana strong,
.vb-alapana small {
	display: block;
}

.vb-alapana small {
	margin-top: 0.18rem;
	color: rgba(255, 255, 255, 0.58);
	font-size: 0.69rem;
}

.vb-alapana-note {
	position: absolute;
	z-index: 5;
	right: 1rem;
	bottom: 151px;
	left: 1rem;
	margin: 0;
	padding: 0.7rem 0.8rem;
	color: #fef3c7;
	font-size: 0.75rem;
	background: rgba(15, 23, 42, 0.94);
	border: 1px solid rgba(251, 191, 36, 0.38);
	border-radius: 12px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.vb-tower-progress {
	position: absolute;
	z-index: 3;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	padding: 0.75rem 0.85rem;
	background: rgba(6, 16, 40, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: 14px;
	backdrop-filter: blur(12px);
}

.vb-tower-progress > div:first-child {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: rgba(255, 255, 255, 0.69);
	font-size: 0.75rem;
}

.vb-tower-progress strong {
	color: #a7f3d0;
}

.vb-progress-track,
.vb-session-progress {
	height: 7px;
	overflow: hidden;
	background: rgba(148, 163, 184, 0.24);
	border-radius: 999px;
}

.vb-progress-track {
	margin-top: 0.55rem;
}

.vb-progress-track span,
.vb-session-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #10b981, #34d399);
	border-radius: inherit;
	transition: width 300ms ease;
}

.vb-workspace {
	min-height: calc(100vh - 96px);
	padding: clamp(1.1rem, 3vw, 2.25rem);
	background: rgba(248, 250, 252, 0.98);
}

.vb-home {
	width: min(780px, 100%);
	margin: 0 auto;
}

.vb-welcome {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
	align-items: center;
	padding: 1.2rem;
	background: white;
	border: 1px solid var(--vb-indigo-100);
	border-left: 4px solid var(--vb-indigo-600);
	border-radius: 18px;
	box-shadow: 0 12px 30px rgba(79, 70, 229, 0.08);
}

.vb-welcome__teacher {
	display: grid;
	width: 58px;
	height: 58px;
	place-items: center;
	color: var(--vb-indigo-600);
	font-size: 1.4rem;
	background: var(--vb-indigo-100);
	border-radius: 16px;
}

.vb-welcome h2,
.vb-section-heading h2,
.vb-summary h2,
.vb-dialog-head h2 {
	margin: 0;
	color: var(--vb-slate-900);
	font-weight: 800;
	letter-spacing: -0.025em;
}

.vb-welcome h2 {
	font-size: clamp(1.25rem, 3vw, 1.7rem);
}

.vb-welcome p:last-child {
	margin: 0.35rem 0 0;
	color: var(--vb-slate-500);
	font-size: 0.9rem;
	line-height: 1.65;
}

.vb-floor-focus {
	margin-top: 1rem;
	padding: 1rem 1.1rem;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 16px;
}

.vb-floor-focus__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.4rem;
	color: var(--vb-emerald-700);
}

.vb-floor-focus__title span {
	padding: 0.2rem 0.5rem;
	color: white;
	font-size: 0.72rem;
	font-weight: 800;
	background: var(--vb-emerald-600);
	border-radius: 999px;
}

.vb-floor-focus p {
	margin: 0.2rem 0;
	color: var(--vb-slate-700);
	font-size: 0.86rem;
}

.vb-inline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.8rem;
}

.vb-section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	margin: 1.65rem 0 0.9rem;
}

.vb-section-heading h2 {
	font-size: 1.35rem;
}

.vb-section-heading > p {
	margin: 0;
	color: var(--vb-slate-500);
	font-size: 0.75rem;
}

.vb-stage-list {
	display: grid;
	gap: 0.75rem;
}

.vb-stage-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 0.9rem;
	align-items: center;
	padding: 1rem;
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 18px;
	box-shadow: 0 5px 18px rgba(15, 23, 42, 0.045);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vb-stage-card:not(.vb-stage-card--locked):hover {
	border-color: #c7d2fe;
	box-shadow: 0 14px 28px rgba(79, 70, 229, 0.1);
	transform: translateY(-2px);
}

.vb-stage-card__icon {
	display: grid;
	width: 52px;
	height: 52px;
	place-items: center;
	font-size: 1.25rem;
	border-radius: 15px;
}

.vb-stage-card--emerald .vb-stage-card__icon {
	color: var(--vb-emerald-700);
	background: var(--vb-emerald-100);
}

.vb-stage-card--indigo .vb-stage-card__icon {
	color: var(--vb-indigo-600);
	background: var(--vb-indigo-100);
}

.vb-stage-card--locked .vb-stage-card__icon {
	color: var(--vb-slate-500);
	background: var(--vb-slate-100);
}

.vb-stage-card__copy {
	min-width: 0;
}

.vb-stage-card__kicker {
	display: inline-flex;
	align-items: center;
	min-height: 1.9rem;
	width: fit-content;
	margin-bottom: 0.2rem;
	padding: 0 0.65rem;
	color: var(--vb-indigo-600);
	font-size: 0.92rem;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0.01em;
	background: var(--vb-indigo-100);
	border-radius: 0.65rem;
}

.vb-stage-card__copy h3 {
	margin: 0.1rem 0 0.2rem;
	color: var(--vb-slate-900);
	font-size: 1rem;
	font-weight: 800;
}

.vb-stage-card__copy p {
	margin: 0;
	color: var(--vb-slate-500);
	font-size: 0.78rem;
	line-height: 1.55;
}

.vb-stage-card__action,
.vb-primary-button,
.vb-secondary-button,
.vb-text-button,
.vb-icon-button,
.vb-mini-formula {
	min-height: 44px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.vb-stage-card__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.65rem 0.9rem;
	color: white;
	white-space: nowrap;
	background: var(--vb-indigo-600);
	border: 1px solid var(--vb-indigo-600);
	border-radius: 11px;
}

.vb-stage-card--emerald .vb-stage-card__action {
	background: var(--vb-emerald-600);
	border-color: var(--vb-emerald-600);
}

.vb-stage-card__actions {
	display: grid;
	gap: 0.4rem;
}

.vb-stage-card__action--soft {
	color: var(--vb-indigo-700);
	background: white;
	border-color: #c7d2fe;
}

.vb-stage-card--emerald .vb-stage-card__action--soft {
	color: var(--vb-emerald-700);
	background: white;
	border-color: #a7f3d0;
}

.vb-stage-card--locked {
	color: var(--vb-slate-500);
	background: #f8fafc;
	box-shadow: none;
}

.vb-locked-badge {
	padding: 0.45rem 0.65rem;
	color: var(--vb-slate-500);
	font-size: 0.7rem;
	font-weight: 800;
	white-space: nowrap;
	background: var(--vb-slate-100);
	border-radius: 999px;
}

.vb-home-footer {
	display: grid;
	gap: 0.75rem;
	margin-top: 1rem;
}

.vb-formula-card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.75rem;
	align-items: center;
	width: 100%;
	min-height: 64px;
	padding: 0.8rem 1rem;
	color: var(--vb-slate-700);
	text-align: left;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 15px;
	cursor: pointer;
}

.vb-formula-card > span:first-child {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	color: #92400e;
	background: #fef3c7;
	border-radius: 11px;
}

.vb-formula-card strong,
.vb-formula-card small {
	display: block;
}

.vb-formula-card small {
	margin-top: 0.1rem;
	color: var(--vb-slate-500);
}

.vb-lesson-link {
	justify-self: center;
	color: var(--vb-indigo-600);
	font-size: 0.82rem;
	font-weight: 800;
	text-decoration: none;
}

.vb-lesson-link:hover {
	text-decoration: underline;
}

.vb-reset-button {
	justify-self: center;
	min-height: 36px;
	padding: 0.35rem 0.55rem;
	color: #94a3b8;
	font-size: 0.74rem;
}

.vb-reset-button:hover {
	color: var(--vb-rose-600);
}

.vb-play,
.vb-summary {
	width: min(760px, 100%);
	margin: 0 auto;
}

.vb-play-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.75rem;
	align-items: center;
}

.vb-play-head__copy {
	display: flex;
	flex-direction: column;
}

.vb-play-head__copy span {
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	font-weight: 800;
}

.vb-play-head__copy strong {
	color: var(--vb-slate-900);
	font-size: 0.9rem;
}

.vb-icon-button {
	display: grid;
	width: 44px;
	padding: 0;
	place-items: center;
	color: var(--vb-slate-500);
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 12px;
}

.vb-mini-formula {
	padding: 0 0.75rem;
	color: var(--vb-indigo-700);
	background: var(--vb-indigo-100);
	border: 1px solid #c7d2fe;
	border-radius: 11px;
}

.vb-play-head__copy small {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.12rem;
	color: var(--vb-emerald-600);
	font-size: 0.7rem;
	font-weight: 700;
}

.vb-session-progress {
	position: relative;
	height: 8px;
	margin: 0.85rem 0 1.1rem;
	background: var(--vb-slate-200);
}

.vb-session-progress span {
	position: absolute;
	top: 0;
	left: 0;
}

.vb-session-progress__half {
	background: rgba(52, 211, 153, 0.4);
}

.vb-question-card {
	padding: clamp(1rem, 3.5vw, 2rem);
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 20px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.vb-question-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 0.5rem;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	font-weight: 800;
}

.vb-question-meta span:first-child {
	padding: 0.25rem 0.55rem;
	color: var(--vb-indigo-700);
	background: var(--vb-indigo-100);
	border-radius: 999px;
}

.vb-linga-heading {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.55rem;
	margin: 0.9rem auto 0.5rem;
	text-align: center;
}

.vb-linga-title {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 46px;
	padding: 0.45rem 1rem;
	font-size: 1.18rem;
	font-weight: 800;
	line-height: 1.2;
	border: 2px solid;
	border-radius: 12px;
}

.vb-linga-title__dot {
	width: 0.65rem;
	height: 0.65rem;
	flex: 0 0 auto;
	background: currentColor;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.vb-linga-title--masculine {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #93c5fd;
}

.vb-linga-title--neuter {
	color: #c2410c;
	background: #fff7ed;
	border-color: #fdba74;
}

.vb-linga-title--feminine {
	color: #db2777;
	background: #fff1f7;
	border-color: #fb7185;
}

.vb-linga-title--neutral {
	color: var(--vb-slate-700);
	background: var(--vb-slate-100);
	border-color: #cbd5e1;
}

.vb-question-instruction {
	margin: 0.75rem 0 0;
	color: var(--vb-slate-700);
	font-size: 0.95rem;
	font-weight: 700;
	text-align: center;
}

.vb-stimulus {
	margin: 0.35rem 0;
	color: var(--vb-slate-900);
	font-size: clamp(2rem, 7vw, 3.7rem);
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	overflow-wrap: anywhere;
}

.vb-stimulus--pattern {
	color: var(--vb-indigo-700);
	font-size: clamp(2.6rem, 9vw, 5rem);
}

.vb-stimulus--pattern.vb-stimulus--neuter {
	color: #c2410c;
}

.vb-stimulus--ayatana {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
}

.vb-stimulus__case {
	display: inline-grid;
	width: 48px;
	height: 48px;
	flex: 0 0 auto;
	place-items: center;
	color: white;
	font-size: 1.5rem;
	line-height: 1;
	background: linear-gradient(145deg, var(--vb-indigo-600), var(--vb-indigo-900));
	border: 4px solid #e0e7ff;
	border-radius: 14px;
	box-shadow: 0 6px 16px rgba(67, 56, 202, 0.22);
}

.vb-question-context {
	margin: 0.35rem 0 0;
	color: var(--vb-slate-500);
	font-size: 0.84rem;
	text-align: center;
}

.vb-ayatana-fill {
	margin-top: 1.1rem;
}

.vb-ayatana-slots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.vb-ayatana-slot {
	display: grid;
	grid-template-columns: auto minmax(2.5rem, auto);
	gap: 0.35rem;
	align-items: center;
	min-width: 76px;
	min-height: 48px;
	padding: 0.45rem 0.6rem;
	color: #94a3b8;
	font: inherit;
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 11px;
}

.vb-ayatana-slot small {
	display: grid;
	width: 20px;
	height: 20px;
	place-items: center;
	color: var(--vb-indigo-700);
	font-size: 0.66rem;
	font-weight: 800;
	background: #e0e7ff;
	border-radius: 6px;
}

.vb-ayatana-slot strong {
	color: var(--vb-indigo-900);
	font-size: 1rem;
	font-weight: 800;
}

.vb-ayatana-slot.is-filled {
	color: var(--vb-indigo-700);
	background: #eef2ff;
	border-style: solid;
	border-color: #a5b4fc;
	cursor: pointer;
}

.vb-ayatana-slot.is-filled:hover:not(:disabled) {
	background: #e0e7ff;
	border-color: var(--vb-indigo-600);
}

.vb-ayatana-hint {
	margin: 0.7rem 0 0;
	color: var(--vb-slate-500);
	font-size: 0.74rem;
	font-weight: 700;
	text-align: center;
}

.vb-ayatana-bank {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.55rem;
	margin-top: 0.85rem;
	padding: 0.85rem;
	background: #f8fafc;
	border: 1px solid var(--vb-slate-200);
	border-radius: 14px;
}

.vb-ayatana-token {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 42px;
	padding: 0.5rem 0.75rem;
	color: var(--vb-slate-800);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 800;
	background: white;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
	cursor: pointer;
	transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.vb-ayatana-token:hover:not(:disabled) {
	color: var(--vb-indigo-800);
	background: #eef2ff;
	border-color: #818cf8;
	transform: translateY(-1px);
}

.vb-ayatana-token.is-selected {
	opacity: 0.38;
	background: #e2e8f0;
	box-shadow: none;
}

.vb-ayatana-token.is-answer {
	opacity: 1;
	color: #065f46;
	background: #ecfdf5;
	border-color: #10b981;
}

.vb-ayatana-token.is-wrong {
	opacity: 1;
	color: #9f1239;
	background: #fff1f2;
	border-color: #fb7185;
}

.vb-multi-hint {
	width: fit-content;
	margin: 0.8rem auto 0;
	padding: 0.4rem 0.65rem;
	color: #92400e;
	font-size: 0.73rem;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 10px;
}

.vb-choice-area {
	margin-top: 1.15rem;
}

.vb-vacana-headings {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.vb-vacana-headings span {
	padding: 0.45rem 0.75rem;
	color: var(--vb-indigo-800, #3730a3);
	font-size: 0.8rem;
	font-weight: 800;
	text-align: center;
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	border-radius: 10px;
}

.vb-vacana-headings span:nth-child(2) {
	color: #6d28d9;
	background: #f5f3ff;
	border-color: #c4b5fd;
}

.vb-choice-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
	margin-top: 0.55rem;
}

.vb-choice-grid--ending {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vb-choice {
	position: relative;
	display: grid;
	grid-template-columns: 66px minmax(0, 1fr);
	gap: 0.7rem;
	align-items: center;
	min-height: 76px;
	padding: 0.65rem 2.65rem 0.65rem 0.8rem;
	color: var(--vb-slate-700);
	text-align: left;
	background: white;
	border: 1.5px solid var(--vb-slate-200);
	border-radius: 13px;
	cursor: pointer;
	transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.vb-choice--bahu {
	background: #faf5ff;
	border-color: #ddd6fe;
}

.vb-choice--bahu .vb-choice__case {
	color: #6d28d9;
	background: #f5f3ff;
	border-color: #c4b5fd;
}

.vb-choice--bahu.is-answer .vb-choice__case {
	color: #047857;
	background: #ecfdf5;
	border-color: #6ee7b7;
}

.vb-choice--bahu.is-wrong .vb-choice__case {
	color: #be123c;
	background: #fff1f2;
	border-color: #fda4af;
}

.vb-choice:hover:not(:disabled) {
	border-color: #a5b4fc;
	transform: translateY(-1px);
}

.vb-choice.is-selected {
	color: var(--vb-indigo-900);
	background: #eef2ff;
	border-color: var(--vb-indigo-600);
}

.vb-choice.is-answer {
	color: #065f46;
	background: #ecfdf5;
	border-color: #10b981;
}

.vb-choice.is-wrong {
	color: #9f1239;
	background: #fff1f2;
	border-color: #fb7185;
}

.vb-choice.is-answer .vb-choice__case {
	color: #047857;
	background: #ecfdf5;
	border-color: #6ee7b7;
}

.vb-choice.is-wrong .vb-choice__case {
	color: #be123c;
	background: #fff1f2;
	border-color: #fda4af;
}

.vb-choice__check {
	position: absolute;
	top: 0.7rem;
	right: 0.75rem;
	display: grid;
	width: 22px;
	height: 22px;
	place-items: center;
	color: transparent;
	font-size: 0.67rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 7px;
}

.vb-choice.is-selected .vb-choice__check,
.vb-choice.is-answer .vb-choice__check {
	color: white;
	background: var(--vb-indigo-600);
	border-color: var(--vb-indigo-600);
}

.vb-choice.is-answer .vb-choice__check {
	background: var(--vb-emerald-600);
	border-color: var(--vb-emerald-600);
}

.vb-choice__label {
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1.35;
}

.vb-choice__case {
	display: grid;
	place-items: center;
	align-content: center;
	min-height: 60px;
	color: var(--vb-indigo-700);
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	border-radius: 11px;
	line-height: 1;
}

.vb-choice__case strong {
	font-size: 2.25rem;
	font-weight: 900;
	letter-spacing: -0.04em;
}

.vb-choice__copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 0.22rem;
}

.vb-choice__meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.vb-choice__meta small {
	color: var(--vb-slate-500);
	font-size: 0.7rem;
}

.vb-choice__vacana {
	display: none;
	color: var(--vb-indigo-700);
	font-size: 0.68rem;
	font-style: normal;
	font-weight: 800;
}

.vb-feedback {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	margin-top: 1rem;
	padding: 0.85rem;
	overflow: hidden;
	border: 1px solid;
	border-radius: 14px;
	animation: vbFeedbackIn 320ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.vb-feedback--correct {
	color: #065f46;
	background: #ecfdf5;
	border-color: #6ee7b7;
}

.vb-feedback--wrong {
	color: #9f1239;
	background: #fff1f2;
	border-color: #fda4af;
}

.vb-feedback__icon {
	position: relative;
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	color: white;
	background: var(--vb-emerald-600);
	border-radius: 50%;
}

.vb-feedback--wrong .vb-feedback__icon {
	background: var(--vb-rose-600);
}

.vb-feedback strong {
	font-size: 0.9rem;
}

.vb-feedback p {
	margin: 0.18rem 0 0;
	font-size: 0.78rem;
	line-height: 1.55;
}

.vb-question-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

.vb-primary-button,
.vb-secondary-button,
.vb-text-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.05rem;
	border-radius: 11px;
}

.vb-primary-button {
	color: white;
	background: var(--vb-indigo-600);
	border: 1px solid var(--vb-indigo-600);
	box-shadow: 0 7px 16px rgba(79, 70, 229, 0.2);
}

.vb-primary-button:hover:not(:disabled) {
	background: var(--vb-indigo-700);
}

.vb-primary-button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

.vb-secondary-button {
	color: var(--vb-indigo-700);
	background: white;
	border: 1px solid #c7d2fe;
}

.vb-text-button {
	color: var(--vb-slate-500);
	background: transparent;
	border: 1px solid transparent;
}

.vb-summary {
	padding: clamp(1.5rem, 5vw, 3rem);
	text-align: center;
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 22px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
}

.vb-summary__gem {
	display: grid;
	width: 78px;
	height: 78px;
	margin: 0 auto 0.85rem;
	place-items: center;
	color: #a7f3d0;
	font-size: 2rem;
	background: var(--vb-emerald-700);
	border: 6px solid var(--vb-emerald-100);
	border-radius: 50%;
	box-shadow: 0 0 28px rgba(16, 185, 129, 0.32);
}

.vb-summary > p:not(.vb-eyebrow) {
	margin: 0.45rem auto 0;
	color: var(--vb-slate-500);
}

.vb-summary-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.vb-summary-stats div {
	padding: 0.85rem 0.4rem;
	background: var(--vb-slate-100);
	border-radius: 13px;
}

.vb-summary-stats strong,
.vb-summary-stats span {
	display: block;
}

.vb-summary-stats strong {
	color: var(--vb-indigo-700);
	font-size: 1.35rem;
}

.vb-summary-stats span {
	margin-top: 0.15rem;
	color: var(--vb-slate-500);
	font-size: 0.68rem;
}

.vb-summary-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 1.35rem;
}

.vb-formula-dialog {
	width: min(1040px, calc(100% - 1.5rem));
	max-width: none;
	max-height: calc(100vh - 1.5rem);
	padding: 0;
	overflow: hidden;
	background: transparent;
	border: 0;
	border-radius: 22px;
	box-shadow: 0 28px 90px rgba(2, 6, 23, 0.45);
}

.vb-formula-dialog::backdrop {
	background: rgba(2, 6, 23, 0.74);
	backdrop-filter: blur(5px);
}

.vb-dialog-panel {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 1.5rem);
	background: white;
}

.vb-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.15rem;
	border-bottom: 1px solid var(--vb-slate-200);
}

.vb-dialog-head h2 {
	font-size: 1.25rem;
}

.vb-dialog-tabs {
	display: flex;
	gap: 0.3rem;
	padding: 0.6rem 1rem 0;
	background: #f8fafc;
}

.vb-dialog-tabs button {
	min-height: 42px;
	padding: 0.55rem 0.85rem;
	color: var(--vb-slate-500);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	cursor: pointer;
}

.vb-dialog-tabs button.active {
	color: var(--vb-indigo-700);
	border-bottom-color: var(--vb-indigo-600);
}

.vb-dialog-body {
	min-height: 0;
	padding: 1rem;
	overflow: auto;
}

.vb-formula-guide {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem 1rem;
	margin-bottom: 0.75rem;
}

.vb-symbol-notes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.vb-symbol-notes span {
	padding: 0.4rem 0.6rem;
	color: var(--vb-slate-700);
	font-size: 0.73rem;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 9px;
}

.vb-linga-key {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.vb-linga-key__item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.32rem 0.55rem;
	font-size: 0.74rem;
	font-weight: 800;
	border: 1px solid;
	border-radius: 999px;
}

.vb-linga-key__item i {
	width: 0.55rem;
	height: 0.55rem;
	background: currentColor;
	border-radius: 50%;
}

.vb-linga-key__item--masculine {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #93c5fd;
}

.vb-linga-key__item--neuter {
	color: #c2410c;
	background: #fff7ed;
	border-color: #fdba74;
}

.vb-linga-key__item--feminine {
	color: #db2777;
	background: #fdf4f8;
	border-color: #f9a8d4;
}

.vb-linga-key__item--kati {
	color: #dc2626;
	background: #fef2f2;
	border-color: #fca5a5;
}

.vb-table-wrap {
	overflow: auto;
	border: 1px solid var(--vb-slate-200);
	border-radius: 14px;
}

.vb-semantic-formula table {
	width: 100%;
	min-width: 820px;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 0.8rem;
}

.vb-semantic-formula th,
.vb-semantic-formula td {
	padding: 0.65rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--vb-slate-200);
}

.vb-semantic-formula thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	color: white;
	background: var(--vb-indigo-900);
}

.vb-semantic-formula thead th:first-child {
	width: 24%;
}

.vb-semantic-formula thead th:nth-child(2) {
	width: 51%;
}

.vb-semantic-formula thead th:last-child {
	width: 25%;
	background: #312e81;
	border-left: 3px solid #a5b4fc;
}

.vb-semantic-formula tbody th {
	color: var(--vb-indigo-900);
	background: #eef2ff;
}

.vb-semantic-formula tbody th > .vb-formula-case-number {
	display: inline-grid;
	width: 24px;
	height: 24px;
	margin-right: 0.4rem;
	place-items: center;
	color: white;
	font-size: 0.7rem;
	background: var(--vb-indigo-600);
	border-radius: 7px;
}

.vb-semantic-formula tbody th strong {
	font-weight: 800;
}

.vb-formula-ayatanibat {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.18rem 0.42rem;
	margin-top: 0.5rem;
	font-size: clamp(1.08rem, 1.18vw, 1.28rem);
	font-weight: 800;
	line-height: 1.45;
}

.vb-formula-ayatanibat__part--starter {
	color: var(--vb-indigo-700);
}

.vb-formula-ayatanibat__part--full {
	color: var(--vb-slate-700);
}

.vb-formula-cell {
	vertical-align: middle !important;
}

.vb-semantic-formula tbody td.vb-formula-cell--plural {
	background: #f7f5ff;
	border-left: 3px solid #a5b4fc;
	box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.06);
}

.vb-pattern-list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.5rem;
	min-height: 58px;
}

.vb-pattern-entry {
	display: inline-flex;
	align-items: stretch;
	gap: 0.28rem;
}

.vb-pattern-lane {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.5rem;
}

.vb-pattern-lane--feminine {
	margin-inline-start: auto;
}

.vb-pattern-list.has-kati .vb-pattern-lane--kati {
	margin-inline-start: auto;
}

.vb-pattern-list.has-kati .vb-pattern-lane--feminine {
	margin-inline-start: 0.32rem;
}

.vb-pattern-list.has-mnemonic {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 8.25rem 8.3rem 4.3rem;
	align-items: start;
	column-gap: 0.4rem;
	row-gap: 0.5rem;
}

.vb-pattern-list.has-mnemonic .vb-pattern-lane {
	margin-inline-start: 0;
	flex-wrap: nowrap;
}

.vb-pattern-list.has-mnemonic .vb-pattern-lane--prefix {
	flex-wrap: wrap;
}

.vb-pattern-lane--prefix {
	grid-column: 1;
}

.vb-pattern-lane--mnemonic {
	grid-column: 2;
}

.vb-pattern-lane--kati {
	grid-column: 3;
}

.vb-pattern-lane--feminine {
	grid-column: 4;
}

.vb-pattern-marker {
	display: inline-grid;
	place-items: center;
	min-width: 2.1rem;
	padding: 0.5rem 0.45rem;
	color: var(--vb-slate-800);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	font-size: clamp(1.12rem, 1.45vw, 1.5rem);
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.vb-pattern-chip {
	display: inline-grid;
	grid-template-rows: minmax(1.35em, auto) auto;
	place-items: center;
	gap: 0.35rem;
	min-width: 3.1rem;
	padding: 0.5rem 0.7rem 0.42rem;
	color: var(--vb-slate-900);
	font-weight: 800;
	background: var(--vb-slate-100);
	border: 1px solid transparent;
	border-radius: 9px;
	white-space: nowrap;
}

.vb-pattern-chip__text {
	font-size: clamp(1.12rem, 1.45vw, 1.5rem);
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
}

.vb-pattern-chip--masculine:not(.vb-pattern-chip--multi) {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #bfdbfe;
}

.vb-pattern-chip--neuter:not(.vb-pattern-chip--multi) {
	color: #c2410c;
	background: #fff7ed;
	border-color: #fed7aa;
}

.vb-pattern-chip--feminine:not(.vb-pattern-chip--multi) {
	color: #db2777;
	background: #fdf4f8;
	border-color: #f9a8d4;
}

.vb-pattern-chip--kati {
	color: #dc2626;
	background: #fef2f2;
	border-color: #fca5a5;
}

.vb-pattern-chip--multi {
	color: var(--vb-slate-800);
	background: #f8fafc;
	border-color: #cbd5e1;
}

.vb-pattern-chip__linga {
	display: inline-flex;
	width: calc(100% + 1.4rem);
	justify-content: center;
	padding-top: 0.3rem;
	border-top: 1px solid currentColor;
	opacity: 0.76;
}

.vb-pattern-chip__colors {
	display: inline-flex;
	gap: 0.16rem;
}

.vb-pattern-chip__colors i {
	width: 0.42rem;
	height: 0.42rem;
	border: 1px solid rgba(255, 255, 255, 0.88);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.vb-pattern-chip__color--masculine {
	background: #2563eb;
}

.vb-pattern-chip__color--neuter {
	background: #f97316;
}

.vb-pattern-chip__color--feminine {
	background: #f472b6;
}

.vb-pattern-chip__color--kati {
	background: #ef4444;
}

.vb-pattern-chip--shared-46 {
	color: #047857;
	background: #ecfdf5;
	border-color: #6ee7b7;
}

.vb-pattern-chip--shared-35 {
	color: #7c3aed;
	background: #f5f3ff;
	border-color: #c4b5fd;
}

.vb-formula-image {
	margin: 0;
	text-align: center;
}

.vb-formula-image img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 180px);
	margin: 0 auto;
	object-fit: contain;
}

.vb-formula-image figcaption {
	margin-top: 0.5rem;
	color: var(--vb-slate-500);
	font-size: 0.75rem;
}

.vb-system-state {
	display: grid;
	min-height: calc(100vh - 64px);
	padding: 2rem;
	place-items: center;
	align-content: center;
	gap: 1rem;
	color: white;
	text-align: center;
}

.vb-system-state p,
.vb-system-state h1 {
	margin: 0;
}

.vb-system-state--error > i {
	color: #fb7185;
	font-size: 3rem;
}

.vb-loader {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(255, 255, 255, 0.2);
	border-top-color: #6ee7b7;
	border-radius: 50%;
	animation: vbSpin 0.8s linear infinite;
}

@keyframes vbSpin {
	to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
	.vb-layout {
		grid-template-columns: minmax(320px, 0.72fr) minmax(460px, 1.28fr);
	}

	.vb-floor-stack {
		width: 56%;
	}

	.vb-stage-card {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.vb-stage-card__action,
	.vb-stage-card__actions,
	.vb-locked-badge {
		grid-column: 2;
		justify-self: start;
	}

	.vb-stage-card__actions {
		display: flex;
		flex-wrap: wrap;
	}
}

@media (max-width: 820px) {
	.vb-topbar {
		min-height: 58px;
	}

	.vb-topbar__title {
		font-size: 0.88rem;
	}

	.vb-layout {
		display: block;
		min-height: 0;
		padding: 0;
	}

	.vb-tower-panel,
	.vb-workspace {
		border-right: 0;
		border-left: 0;
		border-radius: 0;
	}

	.vb-tower-panel {
		position: relative;
		top: auto;
		height: min(68vh, 570px);
		min-height: 490px;
	}

	.vb-tower-heading {
		padding: 1.15rem;
	}

	.vb-floor-stack {
		top: 104px;
		right: 0.75rem;
		bottom: 146px;
		width: min(50%, 220px);
	}

	.vb-floor {
		min-height: 42px;
	}

	.vb-workspace {
		min-height: 60vh;
		padding: 1rem;
	}

	.vb-app--playing .vb-tower-panel {
		height: 292px;
		min-height: 292px;
	}

	.vb-app--playing .vb-tower-heading {
		padding: 0.8rem 1rem;
	}

	.vb-app--playing .vb-tower-heading .vb-eyebrow,
	.vb-app--playing .vb-tower-heading p:last-child,
	.vb-app--playing .vb-alapana,
	.vb-app--playing .vb-alapana-note,
	.vb-app--playing .vb-tower-progress {
		display: none;
	}

	.vb-app--playing .vb-tower-heading h1 {
		font-size: 1.15rem;
	}

	.vb-app--playing .vb-floor-stack {
		top: 48px;
		right: 0.65rem;
		bottom: 10px;
		grid-template-rows: repeat(7, minmax(30px, 1fr));
		width: min(58%, 225px);
		gap: 0.18rem;
	}

	.vb-app--playing .vb-floor {
		min-height: 30px;
		padding-top: 0.15rem;
		padding-bottom: 0.15rem;
	}

	.vb-app--playing .vb-floor__number {
		width: 24px;
		height: 24px;
	}

	.vb-welcome {
		margin-top: 0.15rem;
	}
}

@media (max-width: 560px) {
	.vb-topbar {
		grid-template-columns: auto 1fr auto;
		padding: 0.45rem 0.7rem;
	}

	.vb-topbar__back span {
		display: none;
	}

	.vb-topbar__gem {
		display: none;
	}

	/* ปุ่มเสียง + ปุ่มสูตรกินที่ทางขวา — ชื่อหอต้องย่อได้ ไม่ทับปุ่ม */
	.vb-topbar__title {
		display: block;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.vb-formula-trigger {
		width: 44px;
		padding: 0;
		justify-content: center;
	}

	.vb-tower-panel {
		height: 520px;
	}

	.vb-tower-art {
		object-position: 45% center;
	}

	.vb-tower-heading h1 {
		font-size: 1.45rem;
	}

	.vb-tower-heading p:last-child {
		max-width: 62%;
		font-size: 0.76rem;
	}

	.vb-floor-stack {
		top: 104px;
		bottom: 146px;
		width: 53%;
	}

	.vb-alapana {
		right: auto;
		bottom: 94px;
		left: 0.75rem;
		gap: 0.45rem;
		min-height: 42px;
		max-width: 43%;
		padding: 0.45rem 0.6rem;
	}

	.vb-alapana > i {
		width: 28px;
		height: 28px;
	}

	.vb-alapana strong {
		font-size: 0.82rem;
	}

	.vb-alapana small {
		display: none;
	}

	.vb-alapana-note {
		right: auto;
		bottom: 145px;
		left: 0.75rem;
		max-width: 43%;
		padding: 0.55rem 0.6rem;
		font-size: 0.7rem;
	}

	.vb-floor {
		grid-template-columns: 10px 27px 1fr;
		gap: 0.35rem;
		padding: 0.25rem 0.45rem;
	}

	.vb-floor__arrow {
		display: none;
	}

	.vb-floor__number {
		width: 25px;
		height: 25px;
	}

	.vb-floor__name {
		font-size: 0.75rem;
	}

	.vb-welcome {
		grid-template-columns: 1fr;
	}

	.vb-welcome__teacher {
		width: 46px;
		height: 46px;
	}

	.vb-section-heading {
		align-items: start;
	}

	.vb-section-heading > p {
		max-width: 120px;
		text-align: right;
	}

	.vb-stage-card {
		grid-template-columns: 44px minmax(0, 1fr);
		gap: 0.7rem;
		padding: 0.85rem;
	}

	.vb-stage-card__icon {
		width: 44px;
		height: 44px;
	}

	.vb-stage-card__action,
	.vb-stage-card__actions,
	.vb-locked-badge {
		grid-column: 1 / -1;
		width: 100%;
	}

	.vb-stage-card__actions .vb-stage-card__action {
		flex: 1 1 120px;
		width: auto;
	}

	.vb-choice-grid,
	.vb-choice-grid--ending {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.45rem;
	}

	.vb-vacana-headings {
		display: grid;
		gap: 0.45rem;
	}

	.vb-choice__vacana {
		display: none;
	}

	.vb-choice {
		grid-template-columns: 52px minmax(0, 1fr);
		gap: 0.45rem;
		min-height: 64px;
		padding: 0.5rem 2rem 0.5rem 0.5rem;
	}

	.vb-choice__case {
		min-height: 52px;
	}

	.vb-choice__case strong {
		font-size: 1.8rem;
	}

	.vb-choice__label {
		font-size: 0.8rem;
	}

	.vb-linga-heading {
		gap: 0.4rem;
		margin-top: 0.75rem;
	}

	.vb-linga-title {
		min-height: 42px;
		padding: 0.4rem 0.7rem;
		font-size: 1rem;
	}

	.vb-stimulus {
		font-size: 2.35rem;
	}

	.vb-stimulus--pattern {
		font-size: 3.4rem;
	}

	.vb-summary-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.vb-summary-actions > * {
		width: 100%;
	}

	.vb-formula-dialog {
		width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}

	.vb-dialog-panel {
		max-height: 100vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ── ด่าน ๓ ศัพท์จริง: แม่คำ/คำแปล/แบบแจก ── */
.vb-wordinfo {
	margin: 0.7rem auto 0;
	max-width: 26rem;
	padding: 0.6rem 0.85rem 0.7rem;
	background: #f5f3ff;
	border: 1px solid #c4b5fd;
	border-radius: 14px;
	text-align: center;
}

.vb-wordinfo__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.45rem;
}

.vb-wordinfo__row b { font-size: 1.15rem; color: #5b21b6; }
.vb-wordinfo__row span {
	color: #6d28d9;
	font-size: 1.30rem;
	font-weight: 800;
	line-height: 1.4;
}

.vb-wordinfo__tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	margin-top: 0.45rem;
}

.vb-wordinfo__tags em {
	padding: 0.12rem 0.6rem;
	font-style: normal;
	font-size: 0.72rem;
	font-weight: 700;
	color: #6d28d9;
	background: #ede9fe;
	border: 1px solid transparent;
	border-radius: 999px;
}

.vb-wordinfo__tags .vb-wordinfo__linga--masculine {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #93c5fd;
}

.vb-wordinfo__tags .vb-wordinfo__linga--neuter {
	color: #c2410c;
	background: #fff7ed;
	border-color: #fdba74;
}

.vb-wordinfo__tags .vb-wordinfo__linga--feminine {
	color: #be185d;
	background: #fff1f7;
	border-color: #fb7185;
}

.vb-wordinfo__tags .vb-wordinfo__linga--neutral {
	color: var(--vb-slate-700);
	background: var(--vb-slate-100);
	border-color: #cbd5e1;
}

.vb-multi-hint--any {
	color: #065f46;
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.vb-stage-card--amber .vb-stage-card__icon { background: #fef3c7; color: #b45309; }

/* ตอบถูกแต่ยังไม่ครบ — บอกว่าเป็นวิภัตติอะไรได้อีก (ไม่ใช่คำตำหนิ) */
.vb-feedback__also {
	margin: 0.15rem 0 0.4rem;
	padding: 0.4rem 0.6rem;
	background: rgba(255, 255, 255, 0.55);
	border: 1px dashed currentColor;
	border-radius: 10px;
	font-size: 0.86rem;
	font-weight: 700;
}

.vb-feedback__also i { margin-right: 0.35rem; }
.vb-feedback__also b { font-weight: 800; }

/* ── ระหว่างเล่น: แถบข้างเปลี่ยนเป็นสูตรย่อ (หอแก้วเหลือเป็นพื้นหลัง) ── */
.vb-cheat {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0 1rem 0.8rem;
	overflow-y: auto;
}

.vb-cheat__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.2rem;
}

.vb-cheat__toolbar-label {
	color: rgba(224, 231, 255, 0.78);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.vb-cheat__toggle {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.4rem 0.65rem;
	color: #e0e7ff;
	font-size: 0.72rem;
	font-weight: 800;
	background: rgba(30, 41, 59, 0.62);
	border: 1px solid rgba(165, 180, 252, 0.42);
	border-radius: 10px;
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.vb-cheat__toggle:hover {
	background: rgba(79, 70, 229, 0.42);
	border-color: rgba(196, 181, 253, 0.78);
	transform: translateY(-1px);
}

.vb-cheat__toggle:focus-visible,
.vb-cheat__more:focus-visible {
	outline: 3px solid rgba(224, 231, 255, 0.86);
	outline-offset: 2px;
}

.vb-cheat__row {
	display: grid;
	grid-template-columns: 0.6rem 1.7rem 1fr;
	align-items: center;
	gap: 0.45rem;
	padding: 0.42rem 0.6rem;
	background: rgba(15, 23, 42, 0.42);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 12px;
	backdrop-filter: blur(3px);
	transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.vb-cheat__row.is-active {
	background: rgba(16, 185, 129, 0.2);
	border-color: rgba(52, 211, 153, 0.8);
	transform: translateX(2px);
	box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35), 0 8px 18px -12px rgba(16, 185, 129, 0.9);
}

.vb-cheat__case {
	font-size: 1.15rem;
	font-weight: 800;
	color: #e0e7ff;
	text-align: center;
	line-height: 1.4;
}

.vb-cheat__row.is-active .vb-cheat__case { color: #6ee7b7; }

.vb-cheat__body {
	min-width: 0;
	transition: filter 180ms ease, opacity 180ms ease;
}

.vb-cheat__body.is-collapsed {
	opacity: 0.34;
	filter: blur(4px);
	user-select: none;
}

.vb-cheat__gloss {
	display: block;
	font-size: 0.72rem;
	color: #cbd5f5;
	line-height: 1.5;
}

.vb-cheat__patterns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.22rem;
	margin-top: 0.12rem;
}

.vb-cheat__patterns em {
	font-style: normal;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.55;
}

.vb-cheat__patterns i {
	color: rgba(148, 163, 184, 0.5);
	font-style: normal;
	margin: 0 0.15rem;
}

/* รหัสสีเดียวกับสูตรของหลวงพี่ */
.vb-cheat__pat--pu { color: #93c5fd; }
.vb-cheat__pat--na { color: #fdba74; }
.vb-cheat__pat--itth { color: #f9a8d4; }
.vb-cheat__pat--kati { color: #fca5a5; }
.vb-cheat__pat--all,
.vb-cheat__pat--bahu { color: #c4b5fd; }

.vb-cheat__more {
	margin-top: 0.35rem;
	padding: 0.5rem;
	background: rgba(99, 102, 241, 0.25);
	border: 1px solid rgba(165, 180, 252, 0.45);
	border-radius: 12px;
	color: #e0e7ff;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}

.vb-cheat__more:hover { background: rgba(99, 102, 241, 0.4); }

@media (prefers-reduced-motion: reduce) {
	.vb-cheat__toggle,
	.vb-cheat__body { transition: none; }
	.vb-cheat__toggle:hover { transform: none; }
}

/* เล่นอยู่ = ให้พื้นที่การ์ดคำถามมากขึ้น แถบข้างแคบลง */
.vb-app--playing .vb-layout {
	grid-template-columns: minmax(268px, 0.5fr) minmax(560px, 1.5fr);
}

.vb-app--playing .vb-tower-art { opacity: 0.5; }

/* ══ เอฟเฟกต์ "จุดประทีป" ══════════════════════════════════════
   ตอบถูก = ราก app ได้คลาส .vb-app--flare ชั่วครู่ (JS ปลดให้เอง)
   ตอบผิด = .vb-app--miss — ทุกอนิเมชันแขวนไว้ใต้สองคลาสนี้ */

.vb-topbar__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 0.5rem;
}

.vb-sound-toggle {
	display: inline-grid;
	width: 44px;
	height: 44px;
	place-items: center;
	color: rgba(255, 255, 255, 0.86);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 12px;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease;
}

.vb-sound-toggle:hover {
	color: white;
	background: rgba(255, 255, 255, 0.18);
}

.vb-sound-toggle[aria-pressed="false"] {
	color: rgba(255, 255, 255, 0.42);
}

/* ── แสงวาบที่หอแก้ว ── */
.vb-lamp-flare {
	position: absolute;
	z-index: 4;
	inset: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.vb-app--flare .vb-lamp-flare {
	opacity: 1;
}

.vb-lamp-flare__glow {
	position: absolute;
	top: 46%;
	left: 50%;
	width: 132%;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(255, 243, 200, 0.9) 0%, rgba(251, 191, 36, 0.42) 26%, rgba(251, 191, 36, 0) 62%);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.35);
}

.vb-app--flare .vb-lamp-flare__glow {
	animation: vbLampGlow 1.15s ease-out;
}

@keyframes vbLampGlow {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
	16% { opacity: 1; transform: translate(-50%, -50%) scale(0.72); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
}

.vb-lamp-flare__ring {
	position: absolute;
	top: 46%;
	left: 50%;
	width: 130px;
	height: 130px;
	margin: -65px 0 0 -65px;
	border: 2px solid rgba(255, 240, 190, 0.9);
	border-radius: 50%;
	opacity: 0;
}

.vb-app--flare .vb-lamp-flare__ring {
	animation: vbLampRing 950ms cubic-bezier(0.16, 0.8, 0.3, 1);
}

@keyframes vbLampRing {
	0% { opacity: 0.95; transform: scale(0.22); }
	100% { opacity: 0; transform: scale(2.7); }
}

.vb-lamp-flare__spark {
	position: absolute;
	bottom: 24%;
	width: 7px;
	height: 7px;
	background: #fde68a;
	border-radius: 50%;
	box-shadow: 0 0 10px 3px rgba(253, 224, 71, 0.7);
	opacity: 0;
}

.vb-app--flare .vb-lamp-flare__spark {
	animation: vbSparkRise 1.2s ease-out forwards;
}

@keyframes vbSparkRise {
	0% { opacity: 0; transform: translateY(0) scale(0.4); }
	14% { opacity: 1; }
	100% { opacity: 0; transform: translateY(-210px) scale(0.2); }
}

.vb-lamp-flare__spark:nth-of-type(1) { left: 12%; animation-delay: 0ms; }
.vb-lamp-flare__spark:nth-of-type(2) { left: 24%; animation-delay: 130ms; }
.vb-lamp-flare__spark:nth-of-type(3) { left: 34%; animation-delay: 60ms; }
.vb-lamp-flare__spark:nth-of-type(4) { left: 44%; animation-delay: 200ms; }
.vb-lamp-flare__spark:nth-of-type(5) { left: 52%; animation-delay: 30ms; }
.vb-lamp-flare__spark:nth-of-type(6) { left: 62%; animation-delay: 170ms; }
.vb-lamp-flare__spark:nth-of-type(7) { left: 72%; animation-delay: 90ms; }
.vb-lamp-flare__spark:nth-of-type(8) { left: 82%; animation-delay: 240ms; }
.vb-lamp-flare__spark:nth-of-type(9) { left: 90%; animation-delay: 110ms; }

.vb-app--flare .vb-tower-art {
	animation: vbTowerBrighten 1.05s ease-out;
}

@keyframes vbTowerBrighten {
	0%, 100% { filter: none; }
	20% { filter: brightness(1.55) saturate(1.25); }
}

/* ── ประทีปประจำชั้นในสูตรย่อ (เห็นได้ระหว่างเล่น) ── */
.vb-cheat__lamp {
	width: 9px;
	height: 9px;
	background: rgba(148, 163, 184, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 50%;
}

.vb-cheat__lamp--lit {
	background: #34d399;
	border-color: rgba(167, 243, 208, 0.8);
	box-shadow: 0 0 9px 3px rgba(52, 211, 153, 0.5);
}

.vb-cheat__lamp--steady {
	background: #fcd34d;
	border-color: rgba(253, 230, 138, 0.9);
	box-shadow: 0 0 11px 4px rgba(251, 191, 36, 0.6);
}

.vb-app--flare .vb-cheat__row.is-active .vb-cheat__lamp {
	animation: vbCheatLampPop 950ms ease-out;
}

@keyframes vbCheatLampPop {
	0% { transform: scale(1); }
	22% { background: #fef3c7; box-shadow: 0 0 20px 9px rgba(253, 224, 71, 0.85); transform: scale(2.2); }
	100% { transform: scale(1); }
}

.vb-app--flare .vb-cheat__row.is-active {
	animation: vbCheatFlare 950ms ease-out;
}

@keyframes vbCheatFlare {
	0% {
		background: rgba(253, 224, 71, 0.5);
		border-color: #fde68a;
		box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.3), 0 12px 26px -10px rgba(251, 191, 36, 0.9);
	}
	100% {
		background: rgba(16, 185, 129, 0.2);
		border-color: rgba(52, 211, 153, 0.8);
		box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35), 0 8px 18px -12px rgba(16, 185, 129, 0.9);
	}
}

/* ── การ์ดคำถาม ── */
.vb-app--flare .vb-question-card {
	animation: vbCardWin 950ms ease-out;
}

@keyframes vbCardWin {
	0% { border-color: #6ee7b7; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6), 0 16px 40px rgba(15, 23, 42, 0.08); }
	60% { border-color: #6ee7b7; box-shadow: 0 0 0 14px rgba(52, 211, 153, 0), 0 16px 40px rgba(15, 23, 42, 0.08); }
	100% { border-color: var(--vb-slate-200); box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08); }
}

.vb-app--miss .vb-question-card {
	animation: vbCardShake 430ms ease-in-out;
}

@keyframes vbCardShake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-8px); }
	40% { transform: translateX(7px); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(3px); }
}

.vb-app--flare .vb-stimulus {
	animation: vbStimulusPop 720ms cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

@keyframes vbStimulusPop {
	0% { transform: scale(1); }
	35% { text-shadow: 0 0 28px rgba(251, 191, 36, 0.6); transform: scale(1.08); }
	100% { transform: scale(1); }
}

.vb-app--flare .vb-session-progress span {
	animation: vbBarPulse 850ms ease-out;
}

@keyframes vbBarPulse {
	0%, 100% { filter: none; }
	28% { filter: brightness(1.6) drop-shadow(0 0 8px rgba(52, 211, 153, 0.9)); }
}

/* ── กล่องเฉลย ── */
@keyframes vbFeedbackIn {
	from { opacity: 0; transform: translateY(9px); }
	to { opacity: 1; transform: translateY(0); }
}

.vb-feedback--correct .vb-feedback__icon {
	animation: vbIconPop 640ms cubic-bezier(0.2, 0.9, 0.25, 1.3);
}

@keyframes vbIconPop {
	0% { transform: scale(0.2) rotate(-40deg); }
	55% { transform: scale(1.28) rotate(6deg); }
	100% { transform: scale(1) rotate(0); }
}

.vb-feedback--correct .vb-feedback__icon::after {
	content: "";
	position: absolute;
	inset: -6px;
	border: 2px solid rgba(16, 185, 129, 0.55);
	border-radius: 50%;
	animation: vbIconRipple 950ms ease-out;
}

@keyframes vbIconRipple {
	0% { opacity: 0.9; transform: scale(0.6); }
	100% { opacity: 0; transform: scale(2.1); }
}

.vb-feedback__sparks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.vb-feedback__sparks i {
	position: absolute;
	bottom: -6px;
	width: 5px;
	height: 5px;
	background: #fbbf24;
	border-radius: 50%;
	box-shadow: 0 0 7px 2px rgba(251, 191, 36, 0.55);
	opacity: 0;
	animation: vbFeedbackSpark 1.1s ease-out forwards;
}

@keyframes vbFeedbackSpark {
	0% { opacity: 0; transform: translateY(0) scale(0.4); }
	18% { opacity: 1; }
	100% { opacity: 0; transform: translateY(-84px) scale(0.2); }
}

.vb-feedback__sparks i:nth-child(1) { left: 10%; animation-delay: 40ms; }
.vb-feedback__sparks i:nth-child(2) { left: 22%; animation-delay: 180ms; }
.vb-feedback__sparks i:nth-child(3) { left: 34%; animation-delay: 90ms; }
.vb-feedback__sparks i:nth-child(4) { left: 46%; animation-delay: 250ms; }
.vb-feedback__sparks i:nth-child(5) { left: 58%; animation-delay: 20ms; }
.vb-feedback__sparks i:nth-child(6) { left: 70%; animation-delay: 200ms; }
.vb-feedback__sparks i:nth-child(7) { left: 82%; animation-delay: 120ms; }
.vb-feedback__sparks i:nth-child(8) { left: 92%; animation-delay: 280ms; }

/* ── จบรอบ: แก้วเรืองแสง ── */
.vb-summary__gem {
	animation: vbGemGlow 2.4s ease-in-out infinite;
}

@keyframes vbGemGlow {
	0%, 100% { box-shadow: 0 0 28px rgba(16, 185, 129, 0.32); transform: scale(1); }
	50% { box-shadow: 0 0 46px 6px rgba(52, 211, 153, 0.55); transform: scale(1.05); }
}

/* ══ นับถอยหลังไปข้อใหม่ ═══════════════════════════════════════ */
.vb-question-actions {
	align-items: center;
	gap: 0.5rem;
}

.vb-hold-button {
	color: var(--vb-slate-500);
	font-size: 0.78rem;
}

.vb-hold-button:hover {
	color: var(--vb-slate-900);
}

.vb-next-button {
	position: relative;
	overflow: hidden;
}

/* แถบไหลลดลงในปุ่ม = เวลาที่เหลือ (สีอ่อนกว่าพื้นปุ่มเพื่อให้อ่านตัวหนังสือออก) */
.vb-next-button__fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: rgba(255, 255, 255, 0.28);
	border-right: 2px solid rgba(255, 255, 255, 0.85);
	transition: width 110ms linear;
}

.vb-next-button__label {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.vb-next-button__count {
	display: inline-grid;
	width: 1.55rem;
	height: 1.55rem;
	place-items: center;
	font-size: 0.82rem;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
	background: rgba(255, 255, 255, 0.24);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
}

/* ══ หน้าตั้งค่าการเล่น ══════════════════════════════════════════ */
.vb-settings-dialog {
	width: min(520px, calc(100% - 1.5rem));
}

.vb-settings-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.85rem 1rem 1.15rem;
}

.vb-setting {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	padding: 0.75rem 0.85rem;
	background: #f8fafc;
	border: 1px solid var(--vb-slate-200);
	border-radius: 14px;
}

.vb-setting.is-dimmed {
	opacity: 0.5;
}

.vb-setting__copy strong {
	display: block;
	color: var(--vb-slate-900);
	font-size: 0.92rem;
	font-weight: 800;
}

.vb-setting__copy small {
	display: block;
	margin-top: 0.15rem;
	color: var(--vb-slate-500);
	font-size: 0.74rem;
	line-height: 1.45;
}

.vb-stepper {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.25rem;
	padding: 0.2rem;
	background: white;
	border: 1px solid #c7d2fe;
	border-radius: 999px;
}

.vb-stepper button {
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	gap: 1px;
	color: var(--vb-indigo-700);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.vb-stepper button:hover:not(:disabled) {
	background: var(--vb-indigo-100);
}

.vb-stepper button:disabled {
	color: #cbd5e1;
	cursor: not-allowed;
}

.vb-stepper__ka--sm { font-size: 0.78rem; }
.vb-stepper__ka--lg { font-size: 1.1rem; }

.vb-stepper output {
	min-width: 3.6rem;
	color: var(--vb-slate-700);
	font-size: 0.8rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.vb-switch {
	position: relative;
	flex: 0 0 auto;
	width: 62px;
	height: 34px;
	padding: 0;
	background: #cbd5e1;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 160ms ease;
}

.vb-switch.is-on {
	background: var(--vb-emerald-600);
}

.vb-switch span {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 26px;
	height: 26px;
	background: white;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
	transition: transform 160ms ease;
}

.vb-switch.is-on span {
	transform: translateX(28px);
}

/* ══ เลือกชุดคำศัพท์ (ด่าน ๓) ══════════════════════════════════ */
/* แถบชุดคำศัพท์ระหว่างเล่นด่าน ๓ — กดเปลี่ยนชุดได้ตลอด */
.vb-corpus-chip {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 0.5rem;
	margin: -0.5rem 0 1.1rem;
	padding: 0.45rem 0.7rem;
	color: var(--vb-slate-700);
	font-size: 0.78rem;
	text-align: left;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 999px;
	cursor: pointer;
}

.vb-corpus-chip:hover {
	background: #fef3c7;
}

.vb-corpus-chip > i:first-child { color: #b45309; }
.vb-corpus-chip > i:last-child { color: #b45309; font-size: 0.7rem; opacity: 0.6; }

.vb-corpus-chip span {
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vb-corpus-chip em {
	flex: 0 0 auto;
	padding: 0.1rem 0.45rem;
	color: #92400e;
	font-size: 0.7rem;
	font-style: normal;
	font-weight: 800;
	background: #fde68a;
	border-radius: 999px;
}

.vb-corpus-dialog {
	width: min(640px, calc(100% - 1.5rem));
}

.vb-corpus-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 1.15rem;
	background: #f8fafc;
	border-bottom: 1px solid var(--vb-slate-200);
}

.vb-corpus-summary > div {
	min-width: 0;
}

.vb-corpus-summary .vb-text-button {
	flex: 0 0 auto;
	white-space: nowrap;
}

.vb-corpus-summary strong {
	display: block;
	color: var(--vb-indigo-700);
	font-size: 0.92rem;
}

.vb-corpus-summary small {
	color: var(--vb-slate-500);
	font-size: 0.74rem;
	font-weight: 700;
}

.vb-corpus-body {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}

.vb-corpus-group h3 {
	margin: 0 0 0.45rem;
	color: var(--vb-slate-900);
	font-size: 0.88rem;
	font-weight: 800;
}

.vb-corpus-group h3 small {
	margin-left: 0.4rem;
	color: var(--vb-emerald-600);
	font-size: 0.72rem;
}

.vb-corpus-hint {
	margin: 0.4rem 0 0;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
}

.vb-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.vb-chip {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.8rem;
	color: var(--vb-slate-700);
	font-size: 0.8rem;
	font-weight: 800;
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 999px;
	cursor: pointer;
}

.vb-chip em {
	color: var(--vb-slate-500);
	font-size: 0.68rem;
	font-style: normal;
	font-weight: 700;
}

.vb-chip__dot {
	width: 0.6rem;
	height: 0.6rem;
	background: currentColor;
	border-radius: 50%;
	opacity: 0.55;
}

.vb-chip--masculine.is-on { color: #1d4ed8; background: #eff6ff; border-color: #93c5fd; }
.vb-chip--neuter.is-on { color: #c2410c; background: #fff7ed; border-color: #fdba74; }
.vb-chip--feminine.is-on { color: #db2777; background: #fff1f7; border-color: #fb7185; }

.vb-chip.is-on {
	border-width: 2px;
}

.vb-chip.is-on .vb-chip__dot { opacity: 1; }

.vb-chip--book.is-on {
	color: var(--vb-indigo-700);
	background: var(--vb-indigo-100);
	border-color: var(--vb-indigo-600);
}

.vb-chip--book.is-on em { color: var(--vb-indigo-700); }

.vb-story-search {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0 0.75rem;
	background: white;
	border: 1px solid var(--vb-slate-200);
	border-radius: 11px;
}

.vb-story-search i { color: var(--vb-slate-500); }

.vb-story-search input {
	width: 100%;
	min-height: 42px;
	color: var(--vb-slate-900);
	font: inherit;
	font-size: 0.85rem;
	background: transparent;
	border: 0;
	outline: none;
}

.vb-story-scroll {
	max-height: 42vh;
	margin-top: 0.5rem;
	padding-right: 0.2rem;
	overflow-y: auto;
}

.vb-story-book__head {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.35rem 0.1rem;
	color: var(--vb-slate-500);
	font-size: 0.74rem;
	font-weight: 800;
	background: white;
}

.vb-story-book__head .vb-text-button {
	padding: 0.25rem 0.4rem;
	color: var(--vb-indigo-600);
	font-size: 0.72rem;
}

.vb-story {
	display: grid;
	width: 100%;
	grid-template-columns: 1.35rem 1fr auto;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0.55rem;
	color: var(--vb-slate-700);
	text-align: left;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
}

.vb-story:hover { background: #f8fafc; }

.vb-story.is-on {
	color: #065f46;
	background: #ecfdf5;
	border-color: #6ee7b7;
}

.vb-story__check {
	display: grid;
	width: 1.35rem;
	height: 1.35rem;
	place-items: center;
	color: transparent;
	font-size: 0.66rem;
	background: white;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}

.vb-story.is-on .vb-story__check {
	color: white;
	background: var(--vb-emerald-600);
	border-color: var(--vb-emerald-600);
}

.vb-story__title {
	min-width: 0;
	overflow: hidden;
	font-size: 0.85rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vb-story__meta {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.7rem;
}

.vb-story__meta em {
	color: var(--vb-slate-500);
	font-style: normal;
}

.vb-story__meta b {
	color: var(--vb-indigo-700);
	font-weight: 800;
}

/* ระบุช่วงหน้าในเรื่อง — อยู่ติดหัวป๊อปอัป (นอกพื้นที่เลื่อน) เห็นทันทีที่เลือกเรื่อง */
.vb-page-group {
	padding: 0.7rem 1.15rem 0.85rem;
	background: #eef2ff;
	border-bottom: 1px solid #c7d2fe;
}

.vb-page-group h3 {
	margin: 0 0 0.35rem;
	color: var(--vb-indigo-700);
	font-size: 0.82rem;
	font-weight: 800;
}

.vb-page-group h3 small {
	margin-left: 0.4rem;
	color: var(--vb-emerald-600);
	font-size: 0.72rem;
}

.vb-page-group .vb-corpus-hint {
	color: #4c51bf;
	opacity: 0.75;
}

.vb-page-range {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.vb-page-range__value {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--vb-indigo-700);
	font-size: 0.88rem;
	font-weight: 800;
}

.vb-page-range__value .vb-text-button {
	padding: 0.2rem 0.4rem;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
}

.vb-page-slider {
	display: grid;
	grid-template-columns: 2.1rem 1fr 2.6rem;
	align-items: center;
	gap: 0.5rem;
}

.vb-page-slider em {
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	font-style: normal;
	font-weight: 700;
}

.vb-page-slider b {
	color: var(--vb-slate-900);
	font-size: 0.8rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.vb-page-slider input[type="range"] {
	width: 100%;
	height: 1.6rem;
	margin: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.vb-page-slider input[type="range"]::-webkit-slider-runnable-track {
	height: 6px;
	background: #dbe3f5;
	border-radius: 999px;
}

.vb-page-slider input[type="range"]::-moz-range-track {
	height: 6px;
	background: #dbe3f5;
	border-radius: 999px;
}

.vb-page-slider input[type="range"]::-webkit-slider-thumb {
	width: 22px;
	height: 22px;
	margin-top: -8px;
	background: var(--vb-indigo-600);
	border: 3px solid white;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(49, 46, 129, 0.35);
	-webkit-appearance: none;
	appearance: none;
}

.vb-page-slider input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--vb-indigo-600);
	border: 3px solid white;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(49, 46, 129, 0.35);
}

.vb-corpus-empty {
	margin: 1rem 0;
	color: var(--vb-slate-500);
	font-size: 0.8rem;
	text-align: center;
}

.vb-corpus-foot {
	display: flex;
	justify-content: flex-end;
	padding: 0.8rem 1.15rem;
	background: #f8fafc;
	border-top: 1px solid var(--vb-slate-200);
}

.vb-corpus-foot .vb-primary-button:disabled {
	background: #cbd5e1;
	border-color: #cbd5e1;
	box-shadow: none;
	cursor: not-allowed;
}

/* ที่มาของคำ + คำแปลจริงในเรื่อง */
.vb-wordinfo__source {
	display: block;
	margin-top: 0.4rem;
	color: var(--vb-slate-500);
	font-size: 0.74rem;
	line-height: 1.5;
}

.vb-wordinfo__source i { margin-right: 0.3rem; color: #b45309; }

.vb-wordinfo__kati {
	color: #92400e !important;
	background: #fef3c7 !important;
	border-color: #fcd34d !important;
}

.vb-feedback__gloss {
	margin-top: 0.35rem !important;
	padding: 0.4rem 0.55rem;
	background: rgba(255, 255, 255, 0.72);
	border: 1px dashed currentColor;
	border-radius: 9px;
}

.vb-feedback__gloss i { margin-right: 0.35rem; opacity: 0.6; }
.vb-feedback__gloss b { font-size: 0.9rem; font-weight: 800; }

@media (max-width: 560px) {
	.vb-setting {
		flex-direction: column;
		align-items: stretch;
		gap: 0.6rem;
	}

	.vb-setting .vb-stepper,
	.vb-setting .vb-switch {
		align-self: flex-start;
	}

	.vb-story-scroll { max-height: 50vh; }
	.vb-story { grid-template-columns: 1.35rem 1fr; }
	.vb-story__meta { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
	.vb-next-button__fill,
	.vb-switch,
	.vb-switch span { transition: none; }

	.vb-lamp-flare,
	.vb-feedback__sparks,
	.vb-feedback--correct .vb-feedback__icon::after { display: none; }

	.vb-app--flare .vb-tower-art,
	.vb-app--flare .vb-cheat__row.is-active,
	.vb-app--flare .vb-cheat__row.is-active .vb-cheat__lamp,
	.vb-app--flare .vb-question-card,
	.vb-app--miss .vb-question-card,
	.vb-app--flare .vb-stimulus,
	.vb-app--flare .vb-session-progress span,
	.vb-feedback,
	.vb-feedback--correct .vb-feedback__icon,
	.vb-summary__gem { animation: none; }
}

/* ── ห้องอ่านศัพท์และแฟลชการ์ด ─────────────────────────────── */
.vb-floor {
	grid-template-columns: 12px 30px minmax(0, 1fr) auto 12px;
}

.vb-floor__count {
	display: inline-grid;
	min-width: 1.55rem;
	height: 1.4rem;
	padding: 0 0.35rem;
	place-items: center;
	color: #a7f3d0;
	font-size: 0.68rem;
	font-style: normal;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
	background: rgba(5, 150, 105, 0.2);
	border-radius: 999px;
}

.vb-score-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 44px;
	padding: 0.65rem 0.9rem;
	color: #78350f;
	font: inherit;
	font-weight: 900;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 11px;
	cursor: pointer;
}

.vb-score-button:hover {
	background: #fde68a;
}

.vb-score-button:disabled,
.vb-primary-button:disabled,
.vb-secondary-button:disabled {
	opacity: 0.48;
	cursor: not-allowed;
}

.vb-vault-teaser {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
	margin-top: 1rem;
	padding: 1rem;
	color: var(--vb-slate-900);
	background: #f8fafc;
	border: 1px solid #c7d2fe;
	border-radius: 15px;
}

.vb-vault-teaser__mark {
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	color: var(--vb-emerald-700);
	font-size: 1.2rem;
	background: var(--vb-emerald-100);
	border-radius: 13px;
}

.vb-vault-teaser h2,
.vb-vault-teaser p {
	margin: 0;
}

.vb-vault-teaser h2 {
	font-size: 1.1rem;
	font-weight: 900;
}

.vb-vault-teaser p {
	margin-top: 0.15rem;
	color: var(--vb-slate-500);
	font-size: 0.8rem;
	line-height: 1.55;
}

.vb-vault-teaser__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
}

.vb-sync-note {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.3rem;
	color: var(--vb-slate-500);
	font-size: 0.7rem;
	font-weight: 800;
}

.vb-sync-note.is-saved {
	color: var(--vb-emerald-700);
}

.vb-sync-note.is-error {
	color: var(--vb-rose-600);
}

.vb-feedback__collected {
	padding: 0.45rem 0.6rem;
	color: #065f46;
	background: rgba(255, 255, 255, 0.74);
	border-radius: 9px;
}

.vb-feedback__collected i {
	margin-right: 0.3rem;
}

.vb-layout--reading {
	display: block;
	width: min(1520px, 100%);
}

.vb-workspace--reading {
	position: relative;
	min-height: calc(100vh - 96px);
	overflow: hidden;
	padding: clamp(1rem, 2.5vw, 2rem);
	background:
		linear-gradient(rgba(5, 10, 29, 0.72), rgba(5, 10, 29, 0.86)),
		url("/assets/game/vibhatti/tower-glass-evening.webp") center 44% / cover fixed;
	border: 0;
	border-radius: 16px;
}

.vb-workspace--reading::before {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(2, 6, 23, 0.44), transparent 22%, transparent 78%, rgba(2, 6, 23, 0.44)),
		linear-gradient(180deg, transparent 70%, rgba(69, 38, 20, 0.34));
	content: "";
	pointer-events: none;
}

.vb-reading-room {
	position: relative;
	z-index: 1;
	width: min(1280px, 100%);
	margin: 0 auto;
	background: #f8fafc;
	border-radius: 16px;
	box-shadow: 0 8px 0 rgba(92, 55, 26, 0.28);
}

.vb-reading-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 104px;
	padding: 1rem 1.25rem;
	color: white;
	background: var(--vb-indigo-900);
	border-radius: 16px 16px 0 0;
}

.vb-reading-head p,
.vb-reading-head h1,
.vb-reading-head span {
	margin: 0;
}

.vb-reading-head p {
	color: #c7d2fe;
	font-size: 0.72rem;
	font-weight: 800;
}

.vb-reading-head h1 {
	margin-top: 0.1rem;
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1.15;
	text-wrap: balance;
}

.vb-reading-head > div:first-child > span {
	display: block;
	margin-top: 0.2rem;
	color: #e0e7ff;
	font-size: 0.82rem;
}

.vb-reading-head__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.65rem;
}

.vb-sync-note--dark {
	margin: 0;
	color: #cbd5e1;
}

.vb-sync-note--dark.is-saved {
	color: #6ee7b7;
}

.vb-secondary-button--dark {
	color: white;
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.28);
}

.vb-secondary-button--dark:hover {
	background: rgba(255, 255, 255, 0.16);
}

.vb-floor-rail {
	display: grid;
	grid-template-columns: repeat(7, minmax(105px, 1fr));
	overflow-x: auto;
	color: white;
	background: #3730a3;
	scrollbar-width: thin;
}

.vb-floor-rail button {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	gap: 0 0.45rem;
	min-width: 105px;
	min-height: 78px;
	padding: 0.7rem 0.75rem;
	color: #e0e7ff;
	text-align: left;
	background: transparent;
	border: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.14);
	cursor: pointer;
}

.vb-floor-rail button::after {
	position: absolute;
	right: 0.75rem;
	bottom: 0;
	left: 0.75rem;
	height: 3px;
	background: transparent;
	border-radius: 999px 999px 0 0;
	content: "";
}

.vb-floor-rail button.is-active {
	color: white;
	background: var(--vb-indigo-600);
}

.vb-floor-rail button.is-active::after {
	background: #fbbf24;
}

.vb-floor-rail button > span {
	display: grid;
	grid-row: 1 / span 2;
	width: 30px;
	height: 30px;
	place-items: center;
	align-self: center;
	color: white;
	font-size: 0.82rem;
	font-weight: 900;
	background: rgba(255, 255, 255, 0.13);
	border-radius: 9px;
}

.vb-floor-rail button strong {
	align-self: end;
	font-size: 0.76rem;
	font-weight: 900;
}

.vb-floor-rail button small {
	align-self: start;
	color: inherit;
	font-size: 0.66rem;
}

.vb-floor-rail button em {
	position: absolute;
	right: 0.65rem;
	bottom: 0.35rem;
	color: #a7f3d0;
	font-size: 0.62rem;
	font-style: normal;
	font-weight: 900;
}

.vb-ledger {
	padding: 1rem;
	background: #f8fafc;
	border-radius: 0 0 16px 16px;
}

.vb-ledger__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.8rem;
}

.vb-ledger__toolbar h2,
.vb-ledger__toolbar p {
	margin: 0;
}

.vb-ledger__toolbar h2 {
	color: var(--vb-slate-900);
	font-size: 1.25rem;
	font-weight: 900;
}

.vb-ledger__toolbar p {
	margin-top: 0.15rem;
	color: var(--vb-slate-500);
	font-size: 0.75rem;
}

.vb-ledger__tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.55rem;
}

.vb-vault-search {
	position: relative;
	display: block;
	width: min(320px, 42vw);
}

.vb-vault-search i {
	position: absolute;
	top: 50%;
	left: 0.8rem;
	color: var(--vb-slate-500);
	transform: translateY(-50%);
	pointer-events: none;
}

.vb-vault-search input {
	width: 100%;
	min-height: 44px;
	padding: 0.65rem 0.8rem 0.65rem 2.45rem;
	color: var(--vb-slate-900);
	font: inherit;
	font-size: 0.85rem;
	background: white;
	border: 1px solid #cbd5e1;
	border-radius: 11px;
}

.vb-vault-search input::placeholder {
	color: #475569;
	opacity: 1;
}

.vb-vault-search input:focus-visible {
	outline: 3px solid #a5b4fc;
	outline-offset: 1px;
	border-color: var(--vb-indigo-600);
}

.vb-ledger-list {
	overflow: hidden;
	background: white;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
}

.vb-ledger-columns {
	display: grid;
	grid-template-columns: minmax(250px, 1.1fr) minmax(270px, 1fr) minmax(110px, 0.38fr);
	gap: 1rem;
	padding: 0.55rem 4rem 0.55rem 3.6rem;
	color: var(--vb-slate-500);
	font-size: 0.68rem;
	font-weight: 900;
	background: #f1f5f9;
	border-bottom: 1px solid #cbd5e1;
}

.vb-ledger-row + .vb-ledger-row {
	border-top: 1px solid #e2e8f0;
}

.vb-ledger-row.is-expanded {
	background: #f8fafc;
	outline: 2px solid #818cf8;
	outline-offset: -2px;
}

.vb-ledger-row__summary {
	display: grid;
	grid-template-columns: 2.2rem minmax(180px, 1.1fr) minmax(250px, 1fr) minmax(105px, 0.38fr) 1.25rem;
	gap: 0.85rem;
	align-items: center;
	width: 100%;
	min-height: 76px;
	padding: 0.65rem 0.9rem;
	color: var(--vb-slate-900);
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.vb-ledger-row__summary:hover {
	background: #eef2ff;
}

.vb-ledger-row__number {
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.vb-ledger-row__word,
.vb-ledger-row__grammar,
.vb-ledger-row__state {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.vb-ledger-row__word strong {
	color: var(--vb-slate-900);
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1.15;
}

.vb-ledger-row__word small,
.vb-ledger-row__grammar small {
	margin-top: 0.12rem;
	overflow: hidden;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vb-ledger-row__grammar b {
	color: var(--vb-indigo-700);
	font-size: 0.78rem;
}

.vb-ledger-row__meta {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.vb-ledger-linga-badge {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 22px;
	padding: 0.1rem 0.45rem;
	font-size: 0.68rem;
	font-weight: 900;
	line-height: 1.2;
	border: 1px solid;
	border-radius: 999px;
}

.vb-ledger-linga-badge--masculine {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #93c5fd;
}

.vb-ledger-linga-badge--neuter {
	color: #c2410c;
	background: #fff7ed;
	border-color: #fdba74;
}

.vb-ledger-linga-badge--feminine {
	color: #be185d;
	background: #fff1f7;
	border-color: #fb7185;
}

.vb-ledger-linga-badge--neutral {
	color: var(--vb-slate-700);
	background: var(--vb-slate-100);
	border-color: #cbd5e1;
}

.vb-ledger-row__meta-copy {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vb-ledger-row__state {
	flex-direction: row;
	align-items: center;
	gap: 0.35rem;
	color: var(--vb-emerald-700);
	font-size: 0.72rem;
	font-weight: 900;
}

.vb-ledger-row__chevron {
	color: var(--vb-slate-500);
	font-size: 0.75rem;
	transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vb-ledger-row.is-expanded .vb-ledger-row__chevron {
	transform: rotate(180deg);
}

.vb-ledger-detail {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.5rem;
	padding: 0.9rem 1.2rem 1rem 3.95rem;
	background: #eef2ff;
	border-top: 1px solid #c7d2fe;
}

.vb-ledger-detail section + section {
	padding-left: 1.5rem;
	border-left: 1px solid #c7d2fe;
}

.vb-ledger-detail h3 {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.55rem;
	color: var(--vb-indigo-700);
	font-size: 0.88rem;
	font-weight: 900;
}

.vb-ledger-detail dl {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.38rem 1rem;
	margin: 0;
}

.vb-ledger-detail dl div {
	display: grid;
	grid-template-columns: minmax(4.5rem, 0.65fr) 1fr;
	gap: 0.4rem;
}

.vb-ledger-detail dt,
.vb-ledger-detail dd,
.vb-ledger-detail p,
.vb-ledger-detail blockquote {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.55;
}

.vb-ledger-detail dt {
	color: var(--vb-slate-500);
	font-weight: 700;
}

.vb-ledger-detail dd {
	color: var(--vb-slate-900);
	font-weight: 800;
}

.vb-ledger-detail p {
	color: var(--vb-slate-700);
}

.vb-ledger-detail p + p {
	margin-top: 0.4rem;
}

.vb-ledger-detail blockquote {
	margin: 0.55rem 0;
	padding: 0.55rem 0.7rem;
	color: #78350f;
	font-weight: 800;
	background: #fffbeb;
	border-radius: 9px;
}

.vb-ledger-detail__actions {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	padding-top: 0.2rem;
}

.vb-detail-toggle,
.vb-remove-word {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.55rem 0.75rem;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 900;
	background: white;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	cursor: pointer;
}

.vb-detail-toggle {
	color: var(--vb-indigo-700);
}

.vb-remove-word {
	color: #be123c;
}

.vb-vault-empty {
	display: grid;
	min-height: 330px;
	padding: 2rem;
	place-items: center;
	align-content: center;
	color: var(--vb-slate-500);
	text-align: center;
	background: white;
	border: 1px dashed #94a3b8;
	border-radius: 12px;
}

.vb-vault-empty > i {
	color: #818cf8;
	font-size: 2.4rem;
}

.vb-vault-empty h2,
.vb-vault-empty p {
	margin: 0;
}

.vb-vault-empty h2 {
	margin-top: 0.65rem;
	color: var(--vb-slate-900);
	font-size: 1.15rem;
	font-weight: 900;
}

.vb-vault-empty p {
	max-width: 45ch;
	margin: 0.25rem 0 0.85rem;
	font-size: 0.82rem;
	line-height: 1.6;
}

.vb-undo-toast {
	position: fixed;
	z-index: 70;
	right: 1rem;
	bottom: max(1rem, env(safe-area-inset-bottom));
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 52px;
	padding: 0.65rem 0.8rem 0.65rem 1rem;
	color: white;
	background: #0f172a;
	border-radius: 12px;
	box-shadow: 0 6px 8px rgba(15, 23, 42, 0.24);
}

.vb-undo-toast button {
	min-height: 38px;
	padding: 0.4rem 0.7rem;
	color: #a7f3d0;
	font: inherit;
	font-weight: 900;
	background: transparent;
	border: 1px solid #34d399;
	border-radius: 9px;
	cursor: pointer;
}

/* แฟลชการ์ด */
.vb-online-score {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35rem;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	color: #fef3c7 !important;
	font-size: 0.78rem !important;
	font-weight: 900;
	background: rgba(217, 119, 6, 0.2);
	border: 1px solid rgba(251, 191, 36, 0.62);
	border-radius: 10px;
}

.vb-flash-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 1rem;
	background: #eef2ff;
	border-bottom: 1px solid #c7d2fe;
}

.vb-flash-modes {
	display: inline-flex;
	padding: 0.25rem;
	background: #e2e8f0;
	border-radius: 11px;
}

.vb-flash-modes button {
	min-height: 40px;
	padding: 0.5rem 0.85rem;
	color: var(--vb-slate-700);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 900;
	background: transparent;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.vb-flash-modes button.is-active {
	color: white;
	background: var(--vb-indigo-600);
}

.vb-flash-session-score {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
}

.vb-flash-session-score strong {
	color: #92400e;
	font-size: 1.1rem;
	font-variant-numeric: tabular-nums;
}

.vb-vault-empty--room {
	margin: 1rem;
}

.vb-flash-stage {
	padding: 1rem;
}

.vb-flash-progress {
	height: 7px;
	overflow: hidden;
	background: #e2e8f0;
	border-radius: 999px;
}

.vb-flash-progress span {
	display: block;
	height: 100%;
	background: var(--vb-emerald-600);
	border-radius: inherit;
	transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vb-flash-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0.55rem 0 0.8rem;
	color: var(--vb-slate-500);
	font-size: 0.72rem;
	font-weight: 800;
}

.vb-flash-meta span:last-child {
	color: #b45309;
}

.vb-flash-card {
	max-width: 900px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 1.75rem);
	text-align: center;
	background: white;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
}

.vb-flash-card > p {
	margin: 0;
	color: var(--vb-slate-500);
	font-size: 0.85rem;
	font-weight: 800;
}

.vb-flash-card > h2 {
	margin: 0.6rem 0 0;
	color: var(--vb-slate-900);
	font-size: 3.2rem;
	font-weight: 900;
	line-height: 1.1;
}

.vb-flash-card__tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 0.6rem;
}

.vb-flash-card__tags span {
	padding: 0.25rem 0.55rem;
	color: var(--vb-indigo-700);
	font-size: 0.68rem;
	font-weight: 800;
	background: #eef2ff;
	border-radius: 999px;
}

.vb-flash-case-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
	margin-top: 1.25rem;
}

.vb-flash-case-grid button {
	display: grid;
	grid-template-columns: 3.8rem 1fr auto;
	gap: 0.6rem;
	align-items: center;
	min-height: 58px;
	padding: 0.45rem 0.65rem;
	color: var(--vb-slate-900);
	text-align: left;
	background: white;
	border: 1px solid #c7d2fe;
	border-radius: 10px;
	cursor: pointer;
}

.vb-flash-case-grid button.is-bahu {
	background: #faf5ff;
	border-color: #ddd6fe;
}

.vb-flash-case-grid button strong {
	display: grid;
	min-height: 42px;
	place-items: center;
	color: var(--vb-indigo-700);
	font-size: 1.2rem;
	background: #eef2ff;
	border-radius: 8px;
}

.vb-flash-case-grid button span {
	font-size: 0.8rem;
	font-weight: 900;
}

.vb-flash-case-grid button small {
	color: var(--vb-slate-500);
	font-size: 0.65rem;
	font-weight: 800;
}

.vb-flash-meaning-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
	margin-top: 1.25rem;
}

.vb-flash-meaning-grid button {
	min-height: 58px;
	padding: 0.65rem 0.8rem;
	color: var(--vb-slate-900);
	font: inherit;
	font-size: 0.84rem;
	font-weight: 800;
	background: white;
	border: 1px solid #c7d2fe;
	border-radius: 10px;
	cursor: pointer;
}

.vb-flash-case-grid button.is-selected,
.vb-flash-meaning-grid button.is-selected {
	background: #eef2ff;
	border-color: var(--vb-indigo-600);
	outline: 2px solid #a5b4fc;
}

.vb-flash-case-grid button.is-answer,
.vb-flash-meaning-grid button.is-answer {
	color: #065f46;
	background: #ecfdf5;
	border-color: #10b981;
	outline-color: #6ee7b7;
}

.vb-flash-case-grid button.is-wrong,
.vb-flash-meaning-grid button.is-wrong {
	color: #9f1239;
	background: #fff1f2;
	border-color: #fb7185;
}

.vb-flash-feedback {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.65rem;
	align-items: center;
	margin-top: 0.85rem;
	padding: 0.7rem 0.85rem;
	text-align: left;
	border-radius: 10px;
}

.vb-flash-feedback.is-correct {
	color: #065f46;
	background: #d1fae5;
}

.vb-flash-feedback.is-wrong {
	color: #9f1239;
	background: #ffe4e6;
}

.vb-flash-feedback > i {
	font-size: 1.35rem;
}

.vb-flash-feedback strong,
.vb-flash-feedback p,
.vb-flash-feedback small {
	display: block;
	margin: 0;
}

.vb-flash-feedback p {
	margin-top: 0.1rem;
	font-size: 0.82rem;
	font-weight: 800;
}

.vb-flash-feedback small {
	margin-top: 0.18rem;
	font-size: 0.7rem;
}

.vb-flash-actions {
	display: flex;
	justify-content: center;
	margin-top: 0.9rem;
}

.vb-flash-actions .vb-primary-button {
	min-width: 180px;
}

.vb-flash-result {
	display: grid;
	min-height: 520px;
	padding: 2rem;
	place-items: center;
	align-content: center;
	text-align: center;
}

.vb-flash-result__medal {
	display: grid;
	width: 70px;
	height: 70px;
	place-items: center;
	color: #92400e;
	font-size: 2rem;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 50%;
}

.vb-flash-result > p,
.vb-flash-result h2 {
	margin: 0;
}

.vb-flash-result > p {
	margin-top: 0.75rem;
	color: var(--vb-slate-500);
	font-size: 0.78rem;
	font-weight: 800;
}

.vb-flash-result h2 {
	margin-top: 0.15rem;
	color: var(--vb-slate-900);
	font-size: 1.55rem;
	font-weight: 900;
}

.vb-flash-result > div:not(.vb-summary-actions) {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.55rem;
	margin-top: 1rem;
}

.vb-flash-result > div:not(.vb-summary-actions) span {
	display: flex;
	flex-direction: column;
	min-width: 110px;
	padding: 0.65rem 0.8rem;
	color: var(--vb-slate-500);
	font-size: 0.68rem;
	background: #f1f5f9;
	border-radius: 10px;
}

.vb-flash-result > div span b {
	color: var(--vb-indigo-700);
	font-size: 1.1rem;
}

.vb-guest-score-note {
	max-width: 52ch;
	margin: 1rem 0 0 !important;
	color: var(--vb-slate-700) !important;
	font-size: 0.78rem !important;
	line-height: 1.6;
}

.vb-guest-score-note a {
	color: var(--vb-indigo-700);
	font-weight: 900;
}

@media (max-width: 900px) {
	.vb-vault-teaser {
		grid-template-columns: auto 1fr;
	}

	.vb-vault-teaser__actions {
		grid-column: 1 / -1;
		justify-content: flex-start;
		padding-left: 4rem;
	}

	.vb-ledger__toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.vb-ledger__tools {
		justify-content: stretch;
	}

	.vb-vault-search {
		width: auto;
		flex: 1 1 auto;
	}

	.vb-ledger-columns {
		display: none;
	}

	.vb-ledger-row__summary {
		grid-template-columns: 2rem minmax(150px, 1fr) minmax(210px, 1fr) auto 1rem;
	}

	.vb-ledger-row__state span {
		display: none;
	}

	.vb-ledger-detail {
		padding-left: 1rem;
	}
}

@media (max-width: 680px) {
	.vb-workspace--reading {
		min-height: calc(100vh - 58px);
		padding: 0;
		background: #f8fafc;
		border-radius: 0;
	}

	.vb-workspace--reading::before {
		display: none;
	}

	.vb-reading-room {
		min-height: calc(100vh - 58px);
		border-radius: 0;
		box-shadow: none;
	}

	.vb-reading-head {
		align-items: flex-start;
		min-height: 0;
		padding: 0.85rem 1rem;
		flex-direction: column;
		border-radius: 0;
	}

	.vb-reading-head h1 {
		font-size: 1.35rem;
	}

	.vb-reading-head__actions {
		width: 100%;
		justify-content: space-between;
	}

	.vb-floor-rail {
		display: flex;
		scroll-snap-type: x mandatory;
	}

	.vb-floor-rail button {
		flex: 0 0 112px;
		scroll-snap-align: start;
	}

	.vb-ledger {
		padding: 0.75rem;
	}

	.vb-ledger__tools {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.vb-ledger__toolbar h2 {
		font-size: 1.05rem;
	}

	.vb-ledger-row__summary {
		grid-template-columns: 1.6rem minmax(0, 1fr) auto 1rem;
		gap: 0.55rem;
		min-height: 78px;
		padding: 0.55rem 0.65rem;
	}

	.vb-ledger-row__grammar {
		grid-column: 2 / 4;
		grid-row: 2;
	}

	.vb-ledger-row__state {
		grid-column: 3;
		grid-row: 1;
	}

	.vb-ledger-row__chevron {
		grid-column: 4;
		grid-row: 1 / span 2;
	}

	.vb-ledger-row__word strong {
		font-size: 1.2rem;
	}

	.vb-ledger-row__grammar b {
		font-size: 0.72rem;
	}

	.vb-ledger-row__grammar small {
		font-size: 0.67rem;
	}

	.vb-ledger-detail {
		grid-template-columns: 1fr;
		gap: 0.85rem;
		padding: 0.8rem;
	}

	.vb-ledger-detail section + section {
		padding-top: 0.8rem;
		padding-left: 0;
		border-top: 1px solid #c7d2fe;
		border-left: 0;
	}

	.vb-ledger-detail dl {
		grid-template-columns: 1fr;
	}

	.vb-ledger-detail__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.vb-ledger-detail__actions > * {
		width: 100%;
	}

	.vb-undo-toast {
		right: 0.75rem;
		bottom: max(0.75rem, env(safe-area-inset-bottom));
		left: 0.75rem;
		justify-content: space-between;
	}

	.vb-flash-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.vb-flash-modes {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.vb-flash-session-score {
		justify-content: flex-end;
	}

	.vb-flash-stage {
		padding: 0.75rem;
	}

	.vb-flash-card {
		padding: 0.9rem;
	}

	.vb-flash-card > h2 {
		font-size: 2.55rem;
	}

	.vb-flash-case-grid {
		gap: 0.35rem;
	}

	.vb-flash-case-grid button {
		grid-template-columns: 2.9rem minmax(0, 1fr);
		gap: 0.4rem;
		min-height: 62px;
		padding: 0.4rem;
	}

	.vb-flash-case-grid button strong {
		grid-row: 1 / span 2;
		min-height: 48px;
		font-size: 1.05rem;
	}

	.vb-flash-case-grid button span {
		align-self: end;
		font-size: 0.72rem;
	}

	.vb-flash-case-grid button small {
		align-self: start;
	}

	.vb-flash-meaning-grid {
		gap: 0.4rem;
	}

	.vb-flash-meaning-grid button {
		min-height: 64px;
		padding: 0.5rem;
		font-size: 0.76rem;
	}

	.vb-flash-result {
		min-height: 430px;
		padding: 1.25rem;
	}
}

@media (max-width: 440px) {
	.vb-vault-teaser {
		grid-template-columns: 1fr;
	}

	.vb-vault-teaser__actions {
		padding-left: 0;
	}

	.vb-vault-teaser__actions > * {
		width: 100%;
	}

	.vb-ledger__tools {
		grid-template-columns: 1fr;
	}

	.vb-ledger__tools .vb-primary-button {
		width: 100%;
	}

	.vb-reading-head__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.vb-reading-head__actions > * {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vb-ledger-row__chevron,
	.vb-flash-progress span {
		transition: none;
	}
}
