:root {
	--bg: #102421;
	--bg-deep: #071512;
	--card: rgba(255, 248, 230, 0.95);
	--card-strong: #fff6d3;
	--card-quiet: rgba(255, 255, 255, 0.08);
	--ink: #1b231f;
	--muted: #5f6d63;
	--leaf: #1f6f55;
	--leaf-dark: #17453a;
	--sun: #ffc857;
	--berry: #d95941;
	--line: rgba(27, 35, 31, 0.12);
	--shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	font-family: "Trebuchet MS", "Avenir Next", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background:
		radial-gradient(circle at 16% 10%, rgba(255, 200, 87, 0.22), transparent 24rem),
		radial-gradient(circle at 86% 14%, rgba(67, 150, 116, 0.34), transparent 26rem),
		linear-gradient(135deg, var(--bg), var(--bg-deep));
}

body.browser-locked {
	color: #fff8e3;
}

body::before {
	position: fixed;
	inset: 0;
	pointer-events: none;
	content: "";
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: linear-gradient(to bottom, black, transparent 88%);
}

button,
input,
textarea {
	font: inherit;
}

button {
	border: 0;
	cursor: pointer;
}

img {
	display: block;
}

.shell {
	position: relative;
	width: min(980px, 100%);
	margin: 0 auto;
	padding:
		max(16px, env(safe-area-inset-top))
		16px
		calc(118px + env(safe-area-inset-bottom));
}

.browser-lock {
	position: relative;
	min-height: 100vh;
	padding:
		max(24px, env(safe-area-inset-top))
		18px
		max(24px, env(safe-area-inset-bottom));
	overflow: hidden;
}

.browser-lock__mesh {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 14% 16%, rgba(255, 200, 87, 0.24), transparent 22rem),
		radial-gradient(circle at 82% 18%, rgba(81, 180, 142, 0.28), transparent 24rem),
		radial-gradient(circle at 70% 82%, rgba(217, 89, 65, 0.18), transparent 18rem);
}

.browser-lock__layout {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 18px;
	width: min(1120px, 100%);
	margin: 0 auto;
}

.browser-lock__copy,
.browser-lock__qr-card {
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 32px;
	backdrop-filter: blur(18px);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.browser-lock__copy {
	padding: 24px;
	background: linear-gradient(145deg, rgba(9, 25, 21, 0.84), rgba(18, 42, 36, 0.92));
}

.browser-lock__eyebrow,
.browser-lock__label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 248, 227, 0.62);
}

.browser-lock h1 {
	margin: 0;
	font-size: clamp(34px, 8vw, 66px);
	line-height: 0.94;
	letter-spacing: -0.07em;
}

.browser-lock__lead {
	max-width: 650px;
	margin: 16px 0 0;
	font-size: 17px;
	line-height: 1.55;
	color: rgba(255, 248, 227, 0.84);
}

.browser-lock__steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-top: 22px;
}

.browser-lock__step {
	display: grid;
	gap: 8px;
	padding: 16px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-lock__step span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 800;
	color: #173e35;
	background: linear-gradient(145deg, #ffe59e, #ffc857);
}

.browser-lock__step strong {
	font-size: 20px;
	letter-spacing: -0.04em;
}

.browser-lock__step p,
.browser-lock__qr-card p {
	margin: 0;
	line-height: 1.45;
	color: rgba(255, 248, 227, 0.74);
}

.browser-lock__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}

.browser-lock__cta,
.browser-lock__ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 20px;
	border-radius: 18px;
	text-decoration: none;
	font-weight: 800;
	font-size: 15px;
}

.browser-lock__cta {
	color: #143028;
	background: linear-gradient(135deg, #ffe59f, #ffc857);
	box-shadow: 0 18px 34px rgba(255, 200, 87, 0.18);
}

.browser-lock__ghost {
	color: #fff8e3;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.browser-lock__meta {
	display: grid;
	gap: 14px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.browser-lock__raw-link {
	display: block;
	line-height: 1.45;
	color: rgba(255, 248, 227, 0.84);
	word-break: break-word;
}

.browser-lock__visual {
	display: flex;
	align-items: stretch;
}

.browser-lock__qr-card {
	width: 100%;
	padding: 20px;
	background: linear-gradient(145deg, rgba(255, 247, 225, 0.12), rgba(255, 255, 255, 0.06));
}

.browser-lock__qr-frame {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	width: min(100%, 340px);
	margin: 0 auto 14px;
	padding: 18px;
	border-radius: 28px;
	background: linear-gradient(135deg, rgba(255, 248, 227, 0.94), rgba(255, 240, 195, 0.88));
	box-shadow: inset 0 0 0 1px rgba(20, 48, 40, 0.08);
}

.browser-lock__qr-frame img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 18px;
}

.topbar {
	display: grid;
	gap: 16px;
	margin-bottom: 18px;
	color: #fff9e3;
}

.brand-block h1 {
	margin: 0;
	font-size: clamp(34px, 8vw, 58px);
	line-height: 0.94;
	letter-spacing: -0.06em;
	text-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.hero-copy {
	max-width: 680px;
	margin: 10px 0 0;
	color: rgba(255, 249, 227, 0.8);
	font-size: 15px;
	line-height: 1.45;
}

.eyebrow,
.section-kicker,
.summary-label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.eyebrow {
	color: rgba(255, 249, 227, 0.7);
}

.section-kicker,
.summary-label {
	color: var(--muted);
}

.hero-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.score-card,
.panel,
.wallet-card,
.task-card,
.quick-card,
.metric-card,
.stat-card,
.collection-item,
.shop-card,
.empty-card {
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 26px;
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
}

.score-card {
	padding: 14px 15px;
	color: #123028;
	background: linear-gradient(145deg, #fff4c8, #ffd978);
}

.score-card.accent {
	background: linear-gradient(145deg, #ffe7a9, #ffbe4d);
}

.score-card span {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	opacity: 0.7;
}

.score-card strong {
	display: block;
	font-size: 21px;
	line-height: 1;
}

.app-main {
	display: block;
}

.screen {
	display: none;
	gap: 14px;
}

.screen.is-active {
	display: grid;
}

.panel,
.task-card,
.wallet-card,
.metric-card,
.stat-card,
.collection-item,
.shop-card,
.empty-card {
	background: var(--card);
}

.panel,
.wallet-card {
	padding: 18px;
}

.panel h2,
.panel h3,
.task-card h3,
.screen-head h2,
.wallet-card h3 {
	margin: 0;
	letter-spacing: -0.04em;
	line-height: 1.08;
}

.panel h2,
.screen-head h2 {
	font-size: 28px;
}

.panel h3,
.task-card h3,
.wallet-card h3 {
	font-size: 24px;
}

.panel-copy {
	margin: 8px 0 0;
	color: var(--muted);
	line-height: 1.48;
}

.intro-panel,
.selection-panel,
.screen-head,
.panel-head,
.shop-card-top,
.shop-card-footer,
.task-topline {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
}

.summary-panel {
	padding: 0;
}

.summary-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background: rgba(27, 35, 31, 0.08);
	border-radius: 26px;
	overflow: hidden;
}

.summary-cell {
	padding: 18px;
	background: var(--card);
}

.summary-cell strong {
	display: block;
	font-size: 19px;
	line-height: 1.18;
}

.quick-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.quick-card {
	position: relative;
	display: grid;
	gap: 10px;
	padding: 18px;
	text-align: left;
	color: var(--ink);
	background: linear-gradient(145deg, rgba(255, 248, 230, 0.98), rgba(231, 242, 205, 0.94));
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-card::after,
.topic-card::after {
	position: absolute;
	right: -28px;
	bottom: -38px;
	width: 120px;
	height: 120px;
	content: "";
	border-radius: 999px;
	background: rgba(31, 111, 85, 0.12);
}

.quick-card strong {
	position: relative;
	z-index: 1;
	font-size: 24px;
}

.quick-card span:last-child {
	position: relative;
	z-index: 1;
	color: var(--muted);
	line-height: 1.4;
}

.quick-card-primary {
	color: #fff8e2;
	background: linear-gradient(135deg, #c85840, #804231 50%, #163d34);
}

.quick-card-primary span:last-child {
	color: rgba(255, 248, 226, 0.82);
}

.quick-icon {
	position: relative;
	z-index: 1;
	font-size: 28px;
}

.secondary-button,
.primary-button,
.age-button,
.option-button,
.tab-button,
.inline-action {
	transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.secondary-button,
.inline-action {
	padding: 12px 14px;
	color: #fff8dd;
	background: var(--leaf-dark);
	border-radius: 18px;
}

.primary-button {
	width: 100%;
	padding: 16px;
	color: #fff8dd;
	background: linear-gradient(135deg, var(--leaf), var(--leaf-dark));
	border-radius: 18px;
	box-shadow: 0 16px 34px rgba(22, 75, 61, 0.25);
}

.primary-button.compact {
	width: auto;
	padding: 12px 14px;
}

.secondary-button:disabled,
.primary-button:disabled,
.option-button:disabled {
	cursor: default;
	opacity: 0.56;
}

.secondary-button:active,
.primary-button:active,
.age-button:active,
.option-button:active,
.quick-card:active,
.topic-card:active,
.tab-button:active,
.inline-action:active,
.browser-lock__cta:active,
.browser-lock__ghost:active {
	transform: translateY(2px) scale(0.99);
}

.age-panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.age-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.age-button {
	padding: 14px;
	color: var(--ink);
	background: #fff6d8;
	border-radius: 18px;
	border: 1px solid var(--line);
}

.age-button.is-selected {
	color: #fff8dd;
	background: linear-gradient(135deg, var(--leaf), var(--leaf-dark));
	border-color: rgba(31, 111, 85, 0.5);
}

.topic-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.topic-card {
	position: relative;
	min-height: 116px;
	padding: 18px;
	overflow: hidden;
	text-align: left;
	color: var(--ink);
	background: linear-gradient(145deg, rgba(255, 248, 230, 0.98), rgba(231, 242, 205, 0.94));
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.topic-card strong {
	position: relative;
	z-index: 1;
	display: block;
	margin-bottom: 10px;
	font-size: 23px;
}

.topic-card span {
	position: relative;
	z-index: 1;
	color: var(--muted);
	line-height: 1.35;
}

.topic-card.is-active {
	border-color: rgba(31, 111, 85, 0.48);
	box-shadow: 0 18px 44px rgba(22, 75, 61, 0.26);
}

.topic-card.mixed {
	color: #fff8e2;
	background: linear-gradient(135deg, #c85840, #804231 50%, #163d34);
}

.topic-card.mixed span {
	color: rgba(255, 248, 226, 0.84);
}

.task-card {
	padding: 18px;
}

.task-topline {
	margin-bottom: 14px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}

.task-image {
	width: 100%;
	max-height: 220px;
	margin-bottom: 14px;
	object-fit: cover;
	border-radius: 22px;
	background: #dfe7d2;
}

.options {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.option-button {
	width: 100%;
	padding: 16px;
	text-align: left;
	color: var(--ink);
	background: #fffdf3;
	border-radius: 18px;
	border: 1px solid var(--line);
}

.option-button.correct {
	color: #0f3d2e;
	background: #def4cf;
	border-color: rgba(31, 111, 85, 0.35);
}

.option-button.wrong {
	color: #6d2116;
	background: #ffe0d8;
	border-color: rgba(217, 89, 65, 0.34);
}

.result {
	margin-top: 14px;
	padding: 14px;
	border-radius: 18px;
	line-height: 1.48;
	border: 1px solid var(--line);
	background: var(--card-strong);
}

.result.success {
	background: #eef8d8;
	border-color: rgba(31, 111, 85, 0.25);
}

.result.fail {
	background: #fff0ea;
	border-color: rgba(217, 89, 65, 0.22);
}

.result strong,
.result p {
	display: block;
	margin: 0 0 8px;
}

.result p:last-child {
	margin-bottom: 0;
}

.result-bonus {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.result-bonus strong {
	width: 100%;
	margin-bottom: 0;
}

.result-bonus span {
	padding: 8px 10px;
	background: rgba(31, 111, 85, 0.12);
	border-radius: 999px;
	font-size: 13px;
}

.metrics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.metric-card {
	padding: 16px;
}

.metric-card span {
	display: block;
	margin-bottom: 10px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.metric-card strong {
	font-size: 28px;
	line-height: 1;
	letter-spacing: -0.05em;
}

.stats-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.stat-card,
.collection-item,
.shop-card,
.empty-card {
	padding: 18px;
}

.stat-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.stat-card-head strong {
	font-size: 20px;
}

.stat-card-head span,
.stat-card p,
.collection-item p,
.shop-card p,
.collection-meta {
	color: var(--muted);
	line-height: 1.42;
}

.stat-card p,
.collection-item p,
.shop-card p {
	margin: 10px 0 0;
}

.stat-bar {
	width: 100%;
	height: 12px;
	overflow: hidden;
	background: rgba(27, 35, 31, 0.08);
	border-radius: 999px;
}

.stat-bar span {
	display: block;
	height: 100%;
	background: linear-gradient(135deg, var(--sun), #f39c31, var(--leaf));
	border-radius: inherit;
}

.leaderboard-list {
	display: grid;
	gap: 10px;
	width: 100%;
}

.leaderboard-item {
	display: grid;
	grid-template-columns: 46px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(27, 35, 31, 0.08);
}

.leaderboard-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.leaderboard-item.is-current {
	color: var(--leaf-dark);
}

.leaderboard-rank {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 16px;
	font-size: 18px;
	font-weight: 800;
	background: #fff4cf;
}

.leaderboard-meta strong {
	display: block;
	margin-bottom: 4px;
	font-size: 18px;
}

.leaderboard-meta span {
	color: var(--muted);
	font-size: 14px;
}

.leaderboard-stars {
	font-size: 16px;
	font-weight: 800;
	white-space: nowrap;
}

.collection-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	width: 100%;
}

.collection-item strong {
	display: block;
	font-size: 21px;
}

.collection-badge,
.price-pill,
.item-rarity {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.collection-badge,
.item-rarity {
	color: #16453a;
	background: rgba(31, 111, 85, 0.13);
}

.price-pill {
	color: #60340d;
	background: rgba(255, 200, 87, 0.28);
}

.shop-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.wallet-card {
	display: block;
	background: linear-gradient(145deg, #fff1c1, #ffd671);
}

.shop-card.owned {
	background: linear-gradient(145deg, rgba(245, 248, 235, 0.98), rgba(232, 243, 221, 0.92));
}

.shop-card.affordable {
	border-color: rgba(31, 111, 85, 0.36);
}

.shop-card-top strong {
	display: block;
	margin-bottom: 6px;
	font-size: 22px;
}

.shop-card-top p {
	margin-top: 0;
}

.shop-card-footer {
	align-items: center;
	margin-top: 14px;
}

.settings-block {
	display: grid;
	gap: 14px;
}

.form-stack {
	display: grid;
	gap: 10px;
}

.text-input,
.text-area {
	width: 100%;
	padding: 15px 16px;
	color: var(--ink);
	background: #fffdf4;
	border: 1px solid var(--line);
	border-radius: 18px;
	outline: none;
}

.text-input:focus,
.text-area:focus {
	border-color: rgba(31, 111, 85, 0.44);
	box-shadow: 0 0 0 3px rgba(31, 111, 85, 0.12);
}

.text-area {
	min-height: 112px;
	resize: vertical;
}

.helper {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
}

.info-panel {
	align-items: stretch;
}

.empty-card {
	color: var(--muted);
}

.empty-card strong {
	display: block;
	margin-bottom: 6px;
	color: var(--ink);
}

.empty-card p {
	margin: 0 0 12px;
}

.tabbar {
	position: fixed;
	left: 50%;
	bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 30;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	width: min(960px, calc(100% - 24px));
	padding: 10px;
	transform: translateX(-50%);
	background: rgba(7, 21, 18, 0.78);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 28px;
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(22px);
}

.tab-button {
	display: grid;
	justify-items: center;
	gap: 5px;
	padding: 10px 6px;
	color: rgba(255, 249, 227, 0.76);
	background: transparent;
	border-radius: 18px;
	font-size: 11px;
	font-weight: 700;
}

.tab-button.is-active {
	color: #132e28;
	background: linear-gradient(145deg, #fff3c1, #ffd56f);
}

.tab-icon {
	font-size: 18px;
	line-height: 1;
}

.toast {
	position: fixed;
	right: 16px;
	left: 16px;
	bottom: calc(102px + env(safe-area-inset-bottom));
	z-index: 40;
	max-width: 520px;
	padding: 14px 16px;
	margin: 0 auto;
	color: #fff8dd;
	background: rgba(7, 21, 18, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 18px;
	box-shadow: var(--shadow);
}

.hidden {
	display: none !important;
}

@media (min-width: 720px) {
	.browser-lock__layout {
		grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
		align-items: stretch;
		padding-top: 18px;
	}

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

	.browser-lock__meta {
		grid-template-columns: 220px minmax(0, 1fr);
		align-items: start;
	}

	.topbar {
		grid-template-columns: 1.3fr auto;
		align-items: start;
	}

	.hero-stats {
		min-width: 290px;
	}

	.quick-grid,
	.topic-grid,
	.collection-grid,
	.stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

@media (max-width: 520px) {
	.browser-lock__actions {
		flex-direction: column;
	}

	.browser-lock__cta,
	.browser-lock__ghost {
		width: 100%;
	}

	.intro-panel,
	.selection-panel,
	.screen-head,
	.panel-head,
	.shop-card-top,
	.shop-card-footer,
	.task-topline {
		flex-direction: column;
		align-items: stretch;
	}

	.summary-grid {
		grid-template-columns: 1fr;
	}

	.age-grid {
		grid-template-columns: 1fr;
	}

	.tabbar {
		gap: 6px;
		padding: 8px;
	}

	.tab-button {
		padding: 9px 4px;
		font-size: 10px;
	}

	.tab-icon {
		font-size: 17px;
	}
}
