: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;
}

.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: 1.35rem;
}

.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;
}

.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;
	}

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

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