:root {
	color-scheme: dark;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
	max-width: 100%;
}

.kana-card {
	display: grid;
	min-height: 112px;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 1rem;
	background: linear-gradient(145deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.04));
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 14px 34px rgb(0 0 0 / 0.2);
}

.kana-card-accent {
	background: linear-gradient(145deg, rgb(59 130 246 / 0.34), rgb(168 85 247 / 0.22));
}

.kana-glyph {
	display: block;
	font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", ui-sans-serif, system-ui, sans-serif;
	font-size: 3.2rem;
	font-weight: 800;
	line-height: 1;
	color: white;
}

.kana-sound {
	display: block;
	align-self: start;
	margin-top: -0.75rem;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	color: rgb(191 219 254);
}

.feature-card {
	min-height: 220px;
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.5rem;
	background: rgb(7 18 38 / 0.88);
	padding: 1.5rem;
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.24);
}

.feature-card h2 {
	margin: 0.45rem 0 0.75rem;
	font-size: 1.55rem;
	font-weight: 850;
	line-height: 1.1;
	color: white;
}

.feature-card p {
	margin: 0;
	color: rgb(203 213 225);
	font-size: 1rem;
	line-height: 1.7;
}

.feature-card .feature-kicker {
	color: rgb(147 197 253);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.prose-dark a {
	color: rgb(147 197 253);
	text-decoration: none;
}

.prose-dark a:hover {
	color: white;
	text-decoration: underline;
}

.prose-dark p,
.prose-dark ul,
.prose-dark ol {
	margin-bottom: 1rem;
}

@media (min-width: 640px) {
	.kana-glyph {
		font-size: 4rem;
	}

	.feature-card h2 {
		font-size: 1.9rem;
	}
}

.trainer-shell,
.login-practice-card {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.5rem;
	background: linear-gradient(145deg, rgb(7 18 38 / 0.96), rgb(8 30 68 / 0.84));
	box-shadow: 0 24px 64px rgb(0 0 0 / 0.3);
}

.trainer-shell {
	padding: 1rem;
}

.trainer-header,
.login-practice-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.trainer-header {
	padding: 0.5rem;
}

.trainer-header h2,
.login-practice-card h2 {
	margin: 0.35rem 0 0.5rem;
	font-size: 1.9rem;
	font-weight: 850;
	line-height: 1.1;
	color: white;
}

.trainer-header p,
.login-practice-card p {
	margin: 0;
	max-width: 44rem;
	color: rgb(203 213 225);
	line-height: 1.7;
}

.trainer-grid {
	display: grid;
	gap: 1rem;
	margin-top: 1rem;
}

.trainer-panel {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1rem;
	background: rgb(2 6 23 / 0.62);
	padding: 1rem;
}

.trainer-card-panel {
	display: grid;
	gap: 1rem;
	justify-items: center;
	text-align: center;
}

.trainer-mode {
	margin: 0;
	color: rgb(147 197 253);
	font-weight: 850;
}

.trainer-card {
	display: grid;
	width: min(100%, 20rem);
	min-height: 15rem;
	place-items: center;
	border: 1px solid rgb(147 197 253 / 0.28);
	border-radius: 1rem;
	background: radial-gradient(circle at 50% 22%, rgb(59 130 246 / 0.24), transparent 42%), rgb(7 18 38);
	color: white;
	cursor: pointer;
}

.trainer-card.is-correct {
	border-color: rgb(74 222 128 / 0.8);
}

.trainer-card.is-wrong {
	border-color: rgb(248 113 113 / 0.8);
}

.trainer-prompt {
	font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", ui-sans-serif, system-ui, sans-serif;
	font-size: 5rem;
	font-weight: 900;
	line-height: 1;
}

.html5-n5-card {
	width: min(100%, 24rem);
	min-height: 16rem;
	padding: 1.25rem;
	background:
		linear-gradient(145deg, rgb(20 184 166 / 0.18), transparent 44%),
		linear-gradient(315deg, rgb(250 204 21 / 0.16), transparent 46%),
		rgb(7 18 38);
}

.html5-n5-card .trainer-prompt {
	font-size: clamp(2.25rem, 10vw, 4.1rem);
	line-height: 1.12;
	overflow-wrap: anywhere;
	word-break: normal;
}

.trainer-answer {
	max-width: 100%;
	color: rgb(226 232 240);
	font-size: 1rem;
	font-weight: 850;
	line-height: 1.45;
	text-align: center;
}

.trainer-card-actions,
.trainer-actions,
.type-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.primary-action,
.secondary-action,
.choice-button {
	border: 0;
	border-radius: 0.85rem;
	font-weight: 850;
	cursor: pointer;
}

.primary-action {
	background: linear-gradient(90deg, rgb(59 130 246), rgb(168 85 247));
	color: white;
	padding: 0.85rem 1.15rem;
}

.secondary-action {
	border: 1px solid rgb(255 255 255 / 0.14);
	background: rgb(255 255 255 / 0.08);
	color: white;
	padding: 0.8rem 1rem;
}

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

.choice-button {
	min-height: 4.5rem;
	background: rgb(255 255 255 / 0.08);
	color: white;
	font-size: 1rem;
	line-height: 1.3;
	padding: 0.85rem;
	text-align: left;
}

.trainer-course-kana .choice-button {
	font-size: 1.35rem;
	text-align: center;
}

.choice-button:hover,
.secondary-action:hover {
	background: rgb(255 255 255 / 0.14);
}

.choice-button.is-correct {
	background: rgb(22 163 74 / 0.82);
}

.choice-button.is-wrong {
	background: rgb(220 38 38 / 0.82);
}

.choice-button:disabled {
	cursor: default;
}

.trainer-feedback {
	min-height: 1.6rem;
	margin: 0;
	color: rgb(226 232 240);
}

.type-form {
	display: grid;
	gap: 0.85rem;
}

.type-form label,
.stat-row span,
.trainer-stats h3 {
	color: rgb(203 213 225);
	font-weight: 800;
}

.type-row input {
	min-width: 0;
	flex: 1 1 12rem;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 0.85rem;
	background: rgb(2 6 23 / 0.7);
	color: white;
	font-size: 1.15rem;
	padding: 0.85rem 1rem;
}

.trainer-stats {
	display: grid;
	gap: 0.85rem;
}

.stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid rgb(255 255 255 / 0.08);
	padding-bottom: 0.75rem;
}

.stat-row strong {
	color: white;
	font-size: 1.25rem;
}

.trainer-stats h3 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.weak-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	color: rgb(148 163 184);
}

.weak-chip {
	border: 1px solid rgb(147 197 253 / 0.22);
	border-radius: 999px;
	background: rgb(59 130 246 / 0.12);
	color: rgb(219 234 254);
	padding: 0.45rem 0.7rem;
	font-weight: 850;
}

.login-practice-card {
	padding: 1.5rem;
}

.hidden {
	display: none !important;
}

@media (min-width: 900px) {
	.trainer-grid {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 18rem;
	}
}

.learning-page {
	width: min(100%, 80rem);
	margin: 0 auto;
	padding: 2.5rem 1rem;
}

.page-hero {
	margin-bottom: 1.5rem;
	border-bottom: 1px solid rgb(255 255 255 / 0.1);
	padding-bottom: 1.5rem;
}

.page-hero h1 {
	margin: 0.35rem 0 0.75rem;
	font-size: 2.5rem;
	font-weight: 900;
	line-height: 1.05;
	color: white;
}

.page-hero p {
	max-width: 48rem;
	margin: 0;
	color: rgb(203 213 225);
	font-size: 1.1rem;
	line-height: 1.7;
}

.learning-section {
	margin-top: 1rem;
}

.learning-card-grid {
	display: grid;
	gap: 1rem;
	margin-top: 1rem;
}

.level-grid {
	display: grid;
	gap: 1rem;
	margin: 1rem 0 1.25rem;
}

.level-card,
.n5-support-card {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1rem;
	background: linear-gradient(145deg, rgb(7 18 38 / 0.92), rgb(20 83 45 / 0.18));
	padding: 1rem;
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.22);
}

.level-card h2,
.n5-support-card h2 {
	margin: 0.35rem 0 0.65rem;
	color: white;
	font-size: 1.25rem;
	font-weight: 900;
	line-height: 1.15;
}

.level-card p,
.n5-support-card p {
	margin: 0;
	color: rgb(203 213 225);
	line-height: 1.65;
}

.level-card span {
	display: inline-flex;
	margin-top: 0.85rem;
	border: 1px solid rgb(45 212 191 / 0.24);
	border-radius: 999px;
	background: rgb(20 184 166 / 0.12);
	color: rgb(204 251 241);
	font-size: 0.85rem;
	font-weight: 850;
	padding: 0.35rem 0.65rem;
}

.n5-support-layout {
	display: grid;
	gap: 1rem;
	margin-top: 1.25rem;
}

.source-list,
.genki-list {
	display: grid;
	gap: 0.75rem;
	margin-top: 1rem;
}

.source-row,
.genki-list div {
	border: 1px solid rgb(255 255 255 / 0.08);
	border-radius: 0.85rem;
	background: rgb(2 6 23 / 0.48);
	padding: 0.85rem;
}

.source-row strong,
.genki-list strong {
	display: block;
	color: white;
	font-weight: 900;
}

.source-row span,
.genki-list span {
	display: block;
	margin-top: 0.2rem;
	color: rgb(253 224 71);
	font-size: 0.88rem;
	font-weight: 850;
}

.source-row p {
	margin-top: 0.45rem;
	color: rgb(203 213 225);
	font-size: 0.95rem;
}

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

.restaurant-scene {
	position: relative;
	min-height: 24rem;
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.5rem;
	background: linear-gradient(180deg, rgb(15 23 42), rgb(7 18 38) 55%, rgb(31 41 55));
	box-shadow: 0 24px 64px rgb(0 0 0 / 0.28);
}

.restaurant-wall {
	position: absolute;
	inset: 0 0 42%;
	background:
		linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 4rem 4rem,
		linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px) 0 0 / 4rem 4rem,
		rgb(8 30 68);
}

.menu-board {
	position: absolute;
	top: 2rem;
	left: 50%;
	display: grid;
	width: min(18rem, 70%);
	transform: translateX(-50%);
	border: 1px solid rgb(250 204 21 / 0.32);
	border-radius: 1rem;
	background: rgb(2 6 23 / 0.82);
	padding: 1rem;
	text-align: center;
	color: rgb(254 240 138);
}

.menu-board span {
	font-weight: 900;
	font-size: 1.5rem;
}

.menu-board small {
	margin-top: 0.3rem;
	color: rgb(226 232 240);
	font-weight: 800;
}

.restaurant-counter {
	position: absolute;
	right: -2rem;
	bottom: 5.5rem;
	left: -2rem;
	height: 5rem;
	border-top: 1px solid rgb(255 255 255 / 0.16);
	background: linear-gradient(180deg, rgb(148 163 184), rgb(71 85 105));
}

.restaurant-person {
	position: absolute;
	bottom: 5.9rem;
	display: grid;
	justify-items: center;
	gap: 0.25rem;
	color: white;
	font-weight: 900;
}

.restaurant-person.server {
	left: 18%;
}

.restaurant-person.guest {
	right: 16%;
}

.person-head {
	width: 3.8rem;
	height: 3.8rem;
	border-radius: 999px;
	background: rgb(254 205 170);
	box-shadow: inset 0 -0.35rem 0 rgb(194 65 12 / 0.18);
}

.person-body {
	width: 5rem;
	height: 5.6rem;
	border-radius: 1.4rem 1.4rem 0.5rem 0.5rem;
	background: linear-gradient(135deg, rgb(59 130 246), rgb(168 85 247));
}

.guest .person-body {
	background: linear-gradient(135deg, rgb(20 184 166), rgb(59 130 246));
}

.speech-bubble {
	position: absolute;
	max-width: 13rem;
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: 1rem;
	background: rgb(255 255 255 / 0.9);
	padding: 0.85rem 1rem;
	color: rgb(15 23 42);
	font-weight: 900;
	box-shadow: 0 14px 30px rgb(0 0 0 / 0.22);
}

.server-bubble {
	top: 8.5rem;
	left: 7%;
}

.guest-bubble {
	right: 6%;
	bottom: 13.2rem;
}

.dialogue-panel {
	display: grid;
	gap: 0.75rem;
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.5rem;
	background: rgb(7 18 38 / 0.88);
	padding: 1rem;
	box-shadow: 0 20px 48px rgb(0 0 0 / 0.24);
}

.dialogue-line {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.9rem;
	align-items: start;
	border-bottom: 1px solid rgb(255 255 255 / 0.08);
	padding-bottom: 0.75rem;
}

.dialogue-line:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.line-play {
	border: 0;
	border-radius: 0.85rem;
	background: linear-gradient(90deg, rgb(59 130 246), rgb(168 85 247));
	color: white;
	cursor: pointer;
	font-weight: 850;
	padding: 0.75rem 0.9rem;
}

.speaker,
.japanese-line,
.romaji-line,
.english-line {
	margin: 0;
}

.speaker {
	color: rgb(147 197 253);
	font-size: 0.85rem;
	font-weight: 900;
	text-transform: uppercase;
}

.japanese-line {
	margin-top: 0.15rem;
	color: white;
	font-size: 1.35rem;
	font-weight: 900;
}

.romaji-line {
	margin-top: 0.25rem;
	color: rgb(203 213 225);
	font-weight: 800;
}

.english-line {
	margin-top: 0.15rem;
	color: rgb(148 163 184);
}

@media (min-width: 900px) {
	.page-hero h1 {
		font-size: 3.6rem;
	}

	.level-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.learning-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.n5-support-layout {
		grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.8fr);
	}

	.restaurant-layout {
		grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 0.85fr);
		align-items: stretch;
	}
}

.primary-link-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	background: linear-gradient(90deg, rgb(59 130 246), rgb(168 85 247));
	box-shadow: 0 12px 28px rgb(79 70 229 / 0.35);
	color: white;
	font-weight: 900;
	padding: 0.85rem 1.25rem;
	text-decoration: none;
}

.secondary-inline-link {
	display: inline-flex;
	margin-top: 0.9rem;
	color: rgb(147 197 253);
	font-weight: 900;
	text-decoration: none;
}

.secondary-inline-link:hover {
	color: white;
	text-decoration: underline;
}

.dashboard-grid,
.badge-grid,
.path-list {
	display: grid;
	gap: 1rem;
}

.dashboard-grid {
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.metric-card,
.path-step,
.badge-card {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.25rem;
	background: rgb(7 18 38 / 0.88);
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.24);
	padding: 1.25rem;
}

.metric-card-wide {
	grid-column: 1 / -1;
}

.metric-card span,
.metric-card p,
.path-step p,
.badge-card p {
	color: rgb(203 213 225);
	line-height: 1.65;
}

.metric-card strong {
	display: block;
	margin-top: 0.35rem;
	font-size: 2.15rem;
	color: white;
}

.metric-card h2,
.path-step h2,
.badge-card h2 {
	margin: 0.35rem 0 0.5rem;
	font-size: 1.45rem;
	font-weight: 900;
	color: white;
}

.progress-bar {
	overflow: hidden;
	height: 0.7rem;
	border-radius: 999px;
	background: rgb(15 23 42);
	box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.4);
}

.progress-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, rgb(59 130 246), rgb(168 85 247));
}

.path-step {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1rem;
}

.path-step-number,
.badge-icon {
	display: grid;
	width: 3.2rem;
	height: 3.2rem;
	place-items: center;
	border-radius: 1rem;
	background: rgb(59 130 246 / 0.18);
	font-size: 1.35rem;
	font-weight: 900;
}

.path-complete,
.badge-card.is-earned {
	border-color: rgb(74 222 128 / 0.35);
	background: linear-gradient(145deg, rgb(6 78 59 / 0.48), rgb(7 18 38 / 0.9));
}

.path-active {
	border-color: rgb(147 197 253 / 0.36);
}

.path-locked,
.badge-card.is-locked {
	opacity: 0.62;
}

.badge-grid {
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.link-action {
	text-decoration: none;
}

.course-overview-grid {
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.course-card {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.25rem;
	background: rgb(7 18 38 / 0.88);
	box-shadow: 0 18px 44px rgb(0 0 0 / 0.24);
	padding: 1.25rem;
}

.course-card h2 {
	margin: 0.35rem 0 0.5rem;
	font-size: 1.45rem;
	font-weight: 900;
	color: white;
}

.course-card p {
	color: rgb(203 213 225);
	line-height: 1.65;
}

.course-card.is-locked {
	opacity: 0.62;
}

.course-meta {
	margin: 0.65rem 0 0;
	font-size: 0.9rem;
	font-weight: 800;
	color: rgb(148 163 184) !important;
}

/* Navigation and login framework */
.sn-nav-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	color: rgb(226 232 240);
	padding: 0.65rem 0.85rem;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sn-nav-link:hover,
.sn-nav-link.is-active {
	background: rgb(255 255 255 / 0.1);
	color: white;
}

.account-pill {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.06);
	color: rgb(219 234 254);
	font-size: 0.82rem;
	font-weight: 800;
	max-width: 14rem;
	overflow: hidden;
	padding: 0.62rem 0.9rem;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.login-nav-button,
.mobile-login-link,
.secondary-button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	font-weight: 900;
	text-decoration: none;
}

.login-nav-button,
.mobile-login-link {
	background: linear-gradient(90deg, rgb(59 130 246), rgb(168 85 247));
	box-shadow: 0 12px 28px rgb(79 70 229 / 0.28);
	color: white;
	padding: 0.7rem 1rem;
}

.mobile-nav-link {
	border-radius: 0.9rem;
	color: rgb(226 232 240);
	padding: 0.7rem 0.85rem;
	text-decoration: none;
}

.mobile-nav-link:hover {
	background: rgb(255 255 255 / 0.1);
	color: white;
}

.secondary-button-link {
	border: 1px solid rgb(255 255 255 / 0.14);
	background: rgb(255 255 255 / 0.08);
	color: white;
	padding: 0.82rem 1.15rem;
}

.home-mini-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.home-mini-nav a {
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.07);
	color: rgb(219 234 254);
	font-size: 0.9rem;
	font-weight: 800;
	padding: 0.55rem 0.85rem;
	text-decoration: none;
}

.home-mini-nav a:hover {
	background: rgb(255 255 255 / 0.13);
	color: white;
}

.home-account-card,
.login-card,
.login-benefits-card {
	border: 1px solid rgb(255 255 255 / 0.1);
	border-radius: 1.75rem;
	background: rgb(7 18 38 / 0.9);
	box-shadow: 0 24px 64px rgb(0 0 0 / 0.35);
	padding: 1.5rem;
}

.home-account-card h2,
.login-card h2,
.login-benefits-card h2 {
	margin: 0.35rem 0 0.65rem;
	font-size: 1.55rem;
	font-weight: 950;
	color: white;
}

.home-account-card p,
.login-card p,
.login-benefits-card p,
.login-benefits-card li {
	color: rgb(203 213 225);
	line-height: 1.65;
}

.home-account-actions,
.login-action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1rem;
}

.login-layout {
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
	.login-layout {
		grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.8fr);
		align-items: start;
	}
}

.sn-login-form {
	display: grid;
	gap: 0.75rem;
	margin-top: 1rem;
}

.sn-login-form label {
	color: rgb(219 234 254);
	font-size: 0.9rem;
	font-weight: 900;
}

.sn-login-form input[type="text"],
.sn-login-form input[type="password"] {
	border: 1px solid rgb(255 255 255 / 0.16);
	border-radius: 1rem;
	background: rgb(2 6 23 / 0.88);
	color: white;
	font: inherit;
	padding: 0.85rem 1rem;
	width: 100%;
}

.sn-login-form input:focus {
	border-color: rgb(147 197 253);
	box-shadow: 0 0 0 3px rgb(59 130 246 / 0.22);
	outline: none;
}

.login-submit-button {
	border: 0;
	cursor: pointer;
	margin-top: 0.35rem;
}

.form-alert {
	border-radius: 1rem;
	font-weight: 800;
	margin-top: 1rem;
	padding: 0.85rem 1rem;
}

.form-alert-error {
	border: 1px solid rgb(248 113 113 / 0.35);
	background: rgb(127 29 29 / 0.35);
	color: rgb(254 226 226);
}

.login-help {
	font-size: 0.9rem;
	margin-top: 1rem;
}

.login-benefits-card ul {
	display: grid;
	gap: 0.55rem;
	margin: 1rem 0 0;
	padding-left: 1.15rem;
}

/* HTML5 romaji-choice flashcard mode */
.html5-kana-card {
	position: relative;
	min-height: 18rem;
	overflow: hidden;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.html5-kana-card::before {
	content: "";
	position: absolute;
	inset: 1rem;
	border: 1px solid rgb(255 255 255 / 0.08);
	border-radius: 0.8rem;
	pointer-events: none;
}

.html5-kana-card:active {
	transform: scale(0.99);
}

.html5-kana-card.is-revealed .trainer-prompt {
	transform: translateY(-0.35rem) scale(0.92);
}

.trainer-answer {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	border: 1px solid rgb(147 197 253 / 0.28);
	border-radius: 999px;
	background: rgb(15 23 42 / 0.88);
	color: rgb(219 234 254);
	font-size: 1.35rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	padding: 0.45rem 1rem;
}

.choice-instructions,
.keyboard-hint {
	margin: 0 0 1rem;
	color: rgb(203 213 225);
	font-weight: 800;
}

.keyboard-hint {
	margin: 1rem 0 0;
	color: rgb(148 163 184);
	font-size: 0.9rem;
}

.html5-choice-grid .choice-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	min-height: 5.25rem;
	font-size: 1.55rem;
	letter-spacing: 0.03em;
	transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.html5-choice-grid .choice-button:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgb(0 0 0 / 0.18);
}

.choice-number {
	display: inline-grid;
	width: 1.55rem;
	height: 1.55rem;
	place-items: center;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.14);
	font-size: 0.85rem;
	font-weight: 950;
}

@media (max-width: 640px) {
	.trainer-grid {
		gap: 0.8rem;
	}

	.html5-kana-card {
		min-height: 15rem;
	}

	.html5-choice-grid .choice-button {
		min-height: 4.6rem;
		font-size: 1.3rem;
	}
}

.listen-action {
	min-width: 7rem;
}

.listen-action::before {
	content: "\1F50A";
	margin-right: 0.45rem;
}

.secondary-action:disabled,
.listen-action:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Firefox Japanese audio helper */
.audio-helper-card {
	border: 1px solid rgb(251 191 36 / 0.38);
	border-radius: 1.25rem;
	background: linear-gradient(135deg, rgb(120 53 15 / 0.42), rgb(30 41 59 / 0.72));
	box-shadow: 0 18px 40px rgb(0 0 0 / 0.24);
	color: rgb(254 243 199);
	display: grid;
	gap: 0.9rem;
	margin-bottom: 1rem;
	padding: 1rem;
}

.audio-helper-card.hidden {
	display: none;
}

.audio-helper-card h3 {
	color: white;
	font-size: 1.1rem;
	font-weight: 950;
	margin: 0.2rem 0 0.4rem;
}

.audio-helper-card p {
	margin: 0;
}

.audio-helper-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.audio-helper-install {
	font-size: 0.92rem;
	padding: 0.75rem 1rem;
}

.audio-helper-note {
	border-top: 1px solid rgb(255 255 255 / 0.14);
	color: rgb(253 230 138);
	font-size: 0.86rem;
	padding-top: 0.85rem;
}

.audio-mode-label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: 0.85rem;
	background: rgb(255 255 255 / 0.08);
	color: rgb(203 213 225);
	font-size: 0.85rem;
	font-weight: 800;
	padding: 0.55rem 0.7rem;
}

.audio-mode-select {
	border: 1px solid rgb(255 255 255 / 0.18);
	border-radius: 0.55rem;
	background: rgb(2 6 23 / 0.85);
	color: white;
	font-weight: 800;
	padding: 0.35rem 0.45rem;
}

.audio-helper-install {
	border: 0;
	cursor: pointer;
}
