/* ---------- Tokens ---------- */

:root {
	--bg: #0b0d10;
	--bg-raised: #12151a;
	--bg-sunken: #080a0c;
	--surface: #161a20;
	--surface-hi: #1d222a;
	--line: rgba(226, 232, 245, 0.08);
	--line-strong: rgba(226, 232, 245, 0.16);
	--text: #e9ecf1;
	--text-dim: #9aa3b2;
	--text-faint: #626b7a;
	--accent: #f0a23b;
	--accent-ink: #1b1204;
	--accent-soft: rgba(240, 162, 59, 0.14);
	--accent-line: rgba(240, 162, 59, 0.45);
	--shadow: 0 24px 60px -24px rgba(0, 4, 12, 0.9);
	--grid-line: rgba(226, 232, 245, 0.035);
	--img-shadow: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.55));

	--font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--font-body: "Outfit", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;

	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 16px;

	--z-topbar: 10;
	--z-toast: 30;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--page: min(1440px, 100% - clamp(2rem, 5vw, 5rem));
}

:root[data-theme="light"] {
	--bg: #f3f1ec;
	--bg-raised: #faf9f6;
	--bg-sunken: #e9e6df;
	--surface: #ffffff;
	--surface-hi: #f6f4ef;
	--line: rgba(38, 32, 20, 0.1);
	--line-strong: rgba(38, 32, 20, 0.2);
	--text: #1c1a16;
	--text-dim: #5f5a50;
	--text-faint: #8f897c;
	--accent: #c97a12;
	--accent-ink: #fffaf2;
	--accent-soft: rgba(201, 122, 18, 0.12);
	--accent-line: rgba(201, 122, 18, 0.45);
	--shadow: 0 24px 50px -28px rgba(60, 44, 16, 0.45);
	--grid-line: rgba(38, 32, 20, 0.045);
	--img-shadow: drop-shadow(0 14px 14px rgba(60, 44, 16, 0.3));
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

html[data-theme="light"] {
	color-scheme: light;
}

body {
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
dl,
dd,
figure {
	margin: 0;
}

img {
	display: block;
	max-width: 100%;
}

button,
input {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.mono {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 40;
	padding: 0.6rem 1rem;
	border-radius: var(--r-sm);
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
}

/* Ambient light, blueprint grid and grain behind everything */
.backdrop {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(60rem 34rem at 82% -8%, var(--accent-soft), transparent 70%),
		radial-gradient(46rem 30rem at -6% 30%, rgba(90, 120, 170, 0.09), transparent 70%),
		linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
}

.backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.22;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.7rem 1.15rem;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	font-weight: 500;
	font-size: 0.95rem;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.btn:active {
	transform: translateY(1px) scale(0.985);
}

.btn--primary {
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
}

.btn--primary:hover {
	background: color-mix(in srgb, var(--accent) 86%, white);
}

.btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.btn--ghost {
	border-color: var(--line-strong);
	background: transparent;
	color: var(--text-dim);
}

.btn--ghost:hover {
	border-color: var(--text-faint);
	color: var(--text);
	background: var(--surface);
}

.btn--steam {
	padding: 1rem 1.5rem;
	font-size: 1.05rem;
	font-weight: 600;
	background: var(--accent);
	color: var(--accent-ink);
	box-shadow: 0 18px 40px -18px var(--accent-line);
}

.btn--steam:hover {
	background: color-mix(in srgb, var(--accent) 86%, white);
	transform: translateY(-2px);
}

.iconbtn {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex: none;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: transparent;
	color: var(--text-dim);
	transition: background-color 0.2s, color 0.2s;
}

.iconbtn:hover {
	background: var(--surface-hi);
	color: var(--text);
}

/* ---------- Top bar ---------- */

.topbar {
	position: sticky;
	top: 0;
	z-index: var(--z-topbar);
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 78%, transparent);
	backdrop-filter: blur(14px) saturate(1.3);
}

.topbar__inner {
	width: var(--page);
	margin-inline: auto;
	min-height: 4rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	margin-right: auto;
	text-decoration: none;
}

.brand__mark {
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 5px;
	background:
		linear-gradient(135deg, transparent 46%, var(--bg) 46% 54%, transparent 54%),
		var(--accent);
}

.brand__name {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.search {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: min(22rem, 40vw);
	padding: 0 0.75rem;
	height: 2.5rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--bg-raised);
	color: var(--text-faint);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
	border-color: var(--accent-line);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text);
	font-size: 0.92rem;
}

.search input::placeholder {
	color: var(--text-faint);
}

.search input::-webkit-search-cancel-button {
	display: none;
}

.search kbd {
	padding: 0.05rem 0.4rem;
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--text-faint);
}

.search--wide {
	width: auto;
	flex: 1;
}

/* ---------- Sign-in page ---------- */

.hero {
	flex: 1;
	width: var(--page);
	margin-inline: auto;
	padding-block: clamp(3rem, 8vw, 6.5rem) clamp(4rem, 9vw, 8rem);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
}

.hero__copy > * {
	animation: rise 0.8s var(--ease) both;
}

.hero__copy > :nth-child(2) { animation-delay: 0.07s; }
.hero__copy > :nth-child(3) { animation-delay: 0.14s; }
.hero__copy > :nth-child(4) { animation-delay: 0.21s; }
.hero__copy > :nth-child(5) { animation-delay: 0.28s; }

.hero__title {
	margin-top: 1rem;
	font-family: var(--font-display);
	font-size: clamp(3.4rem, 8.5vw, 7.5rem);
	font-weight: 700;
	line-height: 0.88;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.hero__title em {
	font-style: normal;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--accent);
}

.hero__lede {
	max-width: 46ch;
	margin-top: 1.75rem;
	font-size: 1.1rem;
	color: var(--text-dim);
	text-wrap: pretty;
}

.hero .btn--steam {
	margin-top: 2.25rem;
}

.hero__note {
	margin-top: 1.1rem;
	font-size: 0.85rem;
	color: var(--text-faint);
}

.hero__stage {
	position: relative;
	min-height: clamp(22rem, 42vw, 34rem);
}

.hero__skin {
	position: absolute;
	padding: 1.25rem 1.5rem 1rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	background: linear-gradient(160deg, var(--surface-hi), var(--bg-raised));
	box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
	animation: rise 1s var(--ease) both;
}

.hero__skin img {
	width: 100%;
	filter: var(--img-shadow);
	animation: float 7s ease-in-out infinite;
}

.hero__skin figcaption {
	margin-top: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: var(--text-dim);
}

.hero__skin--1 {
	top: 0;
	right: 0;
	width: 78%;
	animation-delay: 0.15s;
}

.hero__skin--2 {
	top: 36%;
	left: 0;
	width: 66%;
	transform: rotate(-3deg);
	animation-delay: 0.3s;
}

.hero__skin--2 img { animation-delay: -2.5s; }

.hero__skin--3 {
	right: 6%;
	bottom: 0;
	width: 42%;
	border-color: var(--accent-line);
	animation-delay: 0.45s;
}

.hero__skin--3 img { animation-delay: -4.5s; }

/* ---------- Loadout page ---------- */

.shell {
	flex: 1;
	width: var(--page);
	margin-inline: auto;
	padding-block: clamp(2rem, 4vw, 3.5rem) 5rem;
}

.intro {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.5rem 3rem;
}

.intro__title {
	font-family: var(--font-display);
	font-size: clamp(3rem, 7vw, 5.5rem);
	font-weight: 700;
	line-height: 0.9;
	text-transform: uppercase;
}

.stats {
	display: flex;
	gap: 2.5rem;
}

.stats dt {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.stats dd {
	font-family: var(--font-display);
	font-size: 2.1rem;
	font-weight: 600;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.stats dd span {
	color: var(--text-faint);
	font-size: 1.3rem;
}

.stats .stats__text {
	font-size: 1.6rem;
	padding-top: 0.35rem;
}

.filters {
	display: flex;
	gap: 0.4rem;
	margin-top: 1.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
	scrollbar-width: none;
}

.filters::-webkit-scrollbar {
	display: none;
}

.chip {
	flex: none;
	padding: 0.5rem 0.95rem;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	background: transparent;
	color: var(--text-dim);
	font-size: 0.9rem;
	font-weight: 500;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
	color: var(--text);
	background: var(--surface);
}

.chip.is-active {
	border-color: var(--accent-line);
	background: var(--accent-soft);
	color: var(--accent);
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	grid-auto-flow: dense;
	gap: 0.9rem;
	margin-top: 1.5rem;
}

/* ---------- Weapon card ---------- */

.card {
	--mx: 50%;
	--my: 0%;
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 17rem;
	padding: 1rem 1.1rem 1.1rem;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: linear-gradient(170deg, var(--surface), var(--bg-raised));
	text-align: left;
	isolation: isolate;
	animation: rise 0.6s var(--ease) both;
	animation-delay: calc(min(var(--i, 0), 18) * 28ms);
	transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s;
}

/* Cursor-following light */
.card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	background: radial-gradient(18rem circle at var(--mx) var(--my), var(--accent-soft), transparent 65%);
	transition: opacity 0.3s;
}

.card:hover,
.card:focus-visible {
	border-color: var(--accent-line);
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}

.card:hover::before,
.card:focus-visible::before {
	opacity: 1;
}

.card:active {
	transform: translateY(-1px) scale(0.99);
}

.card[hidden] {
	display: none;
}

.card__tag {
	align-self: flex-start;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.card.is-painted .card__tag,
.card--knife .card__tag {
	color: var(--accent);
}

.card__stage {
	flex: 1;
	display: grid;
	place-items: center;
	min-height: 8.5rem;
	padding: 0.5rem 0.25rem;
}

.card__stage img {
	width: 82%;
	max-height: 7.5rem;
	object-fit: contain;
	filter: var(--img-shadow);
	transition: transform 0.5s var(--ease);
}

.card:not(.is-painted):not(.card--knife) .card__stage img {
	opacity: 0.6;
	filter: grayscale(0.6) var(--img-shadow);
}

.card:hover .card__stage img {
	transform: scale(1.09) rotate(-3deg);
	opacity: 1;
	filter: var(--img-shadow);
}

.card__meta {
	display: flex;
	flex-direction: column;
}

.card__weapon {
	font-size: 0.8rem;
	color: var(--text-dim);
}

.card__paint {
	font-family: var(--font-display);
	font-size: 1.45rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-wrap: balance;
}

.card:not(.is-painted):not(.card--knife):not(.card--mvp):not(.card--gloves):not(.card--agent) .card__paint {
	color: var(--text-faint);
}

.card__specs,
.card__cta {
	display: flex;
	gap: 0.9rem;
	margin-top: 0.8rem;
	padding-top: 0.7rem;
	border-top: 1px solid var(--line);
	font-size: 0.78rem;
	color: var(--text-dim);
}

.card__specs span:first-child {
	margin-right: auto;
}

.card__cta {
	color: var(--text-faint);
	transition: color 0.2s;
}

.card__cta::after {
	content: "→";
	margin-left: auto;
	transition: transform 0.3s var(--ease);
}

.card:hover .card__cta {
	color: var(--accent);
}

.card:hover .card__cta::after {
	transform: translateX(4px);
}

.card--knife {
	grid-column: span 2;
	border-color: var(--accent-line);
	background:
		radial-gradient(24rem 14rem at 78% 40%, var(--accent-soft), transparent 70%),
		linear-gradient(170deg, var(--surface-hi), var(--bg-raised));
}

.card--knife .card__stage {
	min-height: 11rem;
}

.card--knife .card__stage img {
	width: 60%;
	max-height: 10rem;
}

.card--knife .card__paint {
	font-size: 2rem;
}

.empty {
	margin-top: 1.5rem;
	padding: 4rem 1.5rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-lg);
	text-align: center;
	color: var(--text-dim);
}

.empty__title {
	font-family: var(--font-display);
	font-size: 1.8rem;
	font-weight: 600;
	color: var(--text);
}

.empty .btn {
	margin-top: 1.25rem;
}

/* ---------- Skin picker ---------- */

.picker {
	width: min(72rem, 100% - 2rem);
	height: min(46rem, 100dvh - 2rem);
	max-width: none;
	max-height: none;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	background: var(--bg-raised);
	color: var(--text);
	box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
	overflow: hidden;
}

.picker[open] {
	animation: pop 0.35s var(--ease);
}

.picker::backdrop {
	background: rgba(4, 6, 9, 0.72);
	backdrop-filter: blur(6px);
}

.picker__form {
	display: grid;
	grid-template-columns: 21rem minmax(0, 1fr);
	height: 100%;
}

.picker__side {
	display: flex;
	flex-direction: column;
	padding: 1.6rem 1.5rem 1.5rem;
	border-right: 1px solid var(--line);
	background:
		radial-gradient(20rem 14rem at 50% 28%, var(--accent-soft), transparent 70%),
		var(--bg-sunken);
	overflow-y: auto;
}

.picker__title {
	margin-top: 0.3rem;
	font-family: var(--font-display);
	font-size: 2.3rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.picker__preview {
	display: grid;
	place-items: center;
	min-height: 10rem;
	margin-top: 0.75rem;
}

.picker__preview img {
	width: 88%;
	max-height: 10rem;
	object-fit: contain;
	filter: var(--img-shadow);
}

.picker__preview img.is-swapping {
	animation: swap 0.4s var(--ease);
}

.picker__paint {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
}

.picker__controls {
	display: grid;
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.picker__controls[hidden] {
	display: none;
}

.field__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.5rem;
	font-size: 0.85rem;
}

.field__row label {
	font-weight: 500;
}

.field__hint {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: var(--accent);
}

.input {
	width: 100%;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--bg-raised);
	font-size: 0.9rem;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
	outline: 0;
	border-color: var(--accent-line);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.input:user-invalid {
	border-color: #d9604c;
}

input[type="range"] {
	width: 100%;
	height: 1.25rem;
	margin: 0;
	background: transparent;
	appearance: none;
	-webkit-appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: var(--line-strong);
}

input[type="range"]::-moz-range-track {
	height: 4px;
	border-radius: 2px;
	background: var(--line-strong);
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: calc(-0.55rem + 2px);
	border: 3px solid var(--bg-sunken);
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}

input[type="range"]::-moz-range-thumb {
	width: 0.8rem;
	height: 0.8rem;
	border: 3px solid var(--bg-sunken);
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}

/* Wear bands: FN .07 / MW .08 / FT .23 / WW .07 / BS .55 */
.wearbar {
	display: grid;
	grid-template-columns: 7fr 8fr 23fr 7fr 55fr;
	gap: 2px;
	margin: 0.15rem 0 0.7rem;
}

.wearbar i {
	height: 3px;
	border-radius: 1px;
	background: var(--accent);
}

.wearbar i:nth-child(1) { opacity: 1; }
.wearbar i:nth-child(2) { opacity: 0.75; }
.wearbar i:nth-child(3) { opacity: 0.55; }
.wearbar i:nth-child(4) { opacity: 0.38; }
.wearbar i:nth-child(5) { opacity: 0.22; }

.picker__actions {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 0.6rem;
	margin-top: auto;
	padding-top: 1.5rem;
}

.picker__main {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.picker__bar {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--line);
}

.picker__count {
	font-size: 0.75rem;
	color: var(--text-faint);
	white-space: nowrap;
}

.picker__list {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	grid-auto-rows: max-content;
	gap: 0.6rem;
	padding: 1.25rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}

.skin {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.7rem 0.7rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	text-align: left;
	transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--ease);
}

.skin:hover {
	border-color: var(--line-strong);
	background: var(--surface-hi);
	transform: translateY(-2px);
}

.skin img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	filter: var(--img-shadow);
}

.skin span {
	font-size: 0.82rem;
	line-height: 1.25;
	color: var(--text-dim);
}

.skin.is-selected {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.skin.is-selected span {
	color: var(--text);
}

.skin.is-current span::after {
	content: " · equipped";
	color: var(--accent);
	font-size: 0.72rem;
}

.skeleton {
	height: 10rem;
	border-radius: var(--r-md);
	background: linear-gradient(100deg, var(--surface) 30%, var(--surface-hi) 50%, var(--surface) 70%) 0 0 / 300% 100%;
	animation: shimmer 1.4s linear infinite;
}

.picker__message {
	grid-column: 1 / -1;
	padding: 3rem 1rem;
	text-align: center;
	color: var(--text-dim);
}

.picker__message .btn {
	margin-top: 1rem;
}

/* ---------- Page links ---------- */

.topnav {
	display: flex;
	gap: 0.25rem;
	margin-right: auto;
}

.brand:has(+ .topnav) {
	margin-right: 1rem;
}

.topnav__link {
	padding: 0.5rem 0.85rem;
	border-radius: var(--r-sm);
	color: var(--text-dim);
	font-size: 0.92rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.topnav__link:hover {
	background: var(--surface);
	color: var(--text);
}

.topnav__link.is-active {
	color: var(--accent);
}

.brand__name {
	white-space: nowrap;
}

.topbar .search {
	flex: 0 1 22rem;
	min-width: 0;
}

.topbar .btn {
	flex: none;
}

@media (max-width: 960px) {
	.brand__name,
	.search kbd {
		display: none;
	}
}

/* ---------- Agent cards ---------- */

.card--agent-t { --side: #d9a441; }
.card--agent-ct { --side: #6b9bd8; }

.card.card--agent .card__tag {
	color: var(--side);
}

.card--agent .card__stage img {
	width: auto;
	max-width: 90%;
	max-height: 9rem;
}

.card.card--agent .card__stage img {
	opacity: 1;
	filter: var(--img-shadow);
}

.card.card--agent:hover .card__stage img {
	transform: scale(1.06);
}

.card.card--agent .card__paint {
	color: var(--text);
}

/* ---------- Gloves card ---------- */

.card--gloves {
	grid-column: span 2;
	background:
		radial-gradient(22rem 13rem at 50% 35%, var(--accent-soft), transparent 70%),
		linear-gradient(170deg, var(--surface-hi), var(--bg-raised));
}

.card--gloves .card__stage {
	min-height: 11rem;
}

.card--gloves .card__stage img {
	width: 58%;
	max-height: 10rem;
}

.card.card--gloves .card__paint {
	font-size: 2rem;
	color: var(--text);
}

.card.card--gloves .card__stage img {
	opacity: 1;
	filter: var(--img-shadow);
}

/* ---------- Side switch and quick loadouts ---------- */

.teams {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-top: 2rem;
}

.teams__option {
	--side: var(--accent);
	padding: 0.55rem 1.1rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	color: var(--text-dim);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.teams__option--t { --side: #d9a441; }
.teams__option--ct { --side: #6b9bd8; }

.teams__option:hover {
	color: var(--text);
	background: var(--surface);
}

.teams__option.is-active {
	border-color: var(--side);
	background: color-mix(in srgb, var(--side) 16%, transparent);
	color: var(--side);
}

.teams__hint {
	margin-left: 0.75rem;
	font-size: 0.82rem;
	color: var(--text-faint);
}

.presets {
	margin-top: 1.75rem;
}

.presets__title {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.presets__row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(11rem, 1fr);
	gap: 0.7rem;
	margin-top: 0.75rem;
	padding-bottom: 0.4rem;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}

.preset {
	--swatch: var(--text-faint);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.75rem 0.9rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background:
		radial-gradient(12rem 6rem at 50% 0%, color-mix(in srgb, var(--swatch) 22%, transparent), transparent 75%),
		var(--surface);
	text-align: left;
	transition: border-color 0.25s, transform 0.3s var(--ease);
}

.preset:hover,
.preset:focus-visible {
	border-color: var(--swatch);
	transform: translateY(-3px);
}

.preset:active {
	transform: translateY(-1px) scale(0.99);
}

.preset__thumbs {
	display: flex;
	align-items: center;
	height: 3.5rem;
}

.preset__thumbs img {
	width: 40%;
	margin-right: -8%;
	object-fit: contain;
	filter: var(--img-shadow);
}

.preset__thumbs--text {
	font-size: 0.82rem;
	color: var(--text-faint);
}

.preset__name {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1;
}

.preset__swatch {
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 3px;
	background: var(--swatch);
	box-shadow: inset 0 0 0 1px var(--line-strong);
}

.confirm {
	width: min(27rem, 100% - 2rem);
	padding: 1.6rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	background: var(--bg-raised);
	color: var(--text);
	box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85);
}

.confirm[open] {
	animation: pop 0.3s var(--ease);
}

.confirm::backdrop {
	background: rgba(4, 6, 9, 0.72);
	backdrop-filter: blur(6px);
}

.confirm__title {
	margin-top: 0.3rem;
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.confirm__text {
	margin-top: 0.9rem;
	color: var(--text-dim);
	text-wrap: pretty;
}

/* ---------- MVP anthem ---------- */

.bars {
	display: flex;
	align-items: flex-end;
	gap: 0.35rem;
	height: 4.5rem;
}

.bars[hidden] {
	display: none;
}

.bars i {
	width: 0.45rem;
	height: 100%;
	border-radius: 2px;
	background: var(--accent);
	transform-origin: bottom;
	transform: scaleY(var(--h));
}

.bars i:nth-child(1) { --h: 0.35; opacity: 0.45; }
.bars i:nth-child(2) { --h: 0.6; opacity: 0.65; }
.bars i:nth-child(3) { --h: 0.85; opacity: 0.85; }
.bars i:nth-child(4) { --h: 1; }
.bars i:nth-child(5) { --h: 0.7; opacity: 0.85; }
.bars i:nth-child(6) { --h: 0.5; opacity: 0.65; }
.bars i:nth-child(7) { --h: 0.3; opacity: 0.45; }

.card--mvp:hover .bars i,
.bars.is-playing i {
	animation: beat 0.9s ease-in-out infinite alternate;
}

.bars i:nth-child(2n) { animation-delay: -0.3s; }
.bars i:nth-child(3n) { animation-delay: -0.55s; }

.bars--large {
	height: 7rem;
	gap: 0.5rem;
}

.bars--large i {
	width: 0.6rem;
}

.card--mvp {
	grid-column: span 2;
	background:
		radial-gradient(22rem 13rem at 22% 40%, var(--accent-soft), transparent 70%),
		linear-gradient(170deg, var(--surface-hi), var(--bg-raised));
}

.card--mvp .card__tag {
	color: var(--accent);
}

.card--mvp .card__stage {
	min-height: 11rem;
}

.card.card--mvp .card__paint {
	font-size: 2rem;
	color: var(--text);
}

.card--mvp.is-offline {
	cursor: not-allowed;
	opacity: 0.6;
}

.picker__note {
	margin-top: 1rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	font-size: 0.82rem;
	color: var(--text-dim);
	text-wrap: pretty;
}

.picker__note[hidden] {
	display: none;
}

.picker__list--mvp {
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.picker__group {
	grid-column: 1 / -1;
	margin: 0.6rem 0 0;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.picker__group:first-child {
	margin-top: 0;
}

.anthem {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	overflow: hidden;
	transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--ease);
}

.anthem:hover {
	border-color: var(--line-strong);
	background: var(--surface-hi);
	transform: translateY(-2px);
}

.anthem.is-selected {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.anthem__pick {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.85rem 1rem;
	border: 0;
	background: transparent;
	text-align: left;
}

.anthem__name {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.15;
}

.anthem__hint {
	font-size: 0.78rem;
	color: var(--text-faint);
}

.anthem.is-selected .anthem__hint {
	color: var(--accent);
}

.anthem__play {
	flex: none;
	display: grid;
	place-items: center;
	width: 3.5rem;
	border: 0;
	border-left: 1px solid var(--line);
	background: transparent;
	color: var(--text-dim);
	transition: background-color 0.2s, color 0.2s;
}

.anthem__play:hover,
.anthem__play.is-playing {
	background: var(--accent);
	color: var(--accent-ink);
}

/* Play triangle, swapped for a stop square while playing */
.anthem__play::before {
	content: "";
	width: 0.85rem;
	height: 0.95rem;
	margin-left: 0.15rem;
	background: currentColor;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.anthem__play.is-playing::before {
	width: 0.8rem;
	height: 0.8rem;
	margin-left: 0;
	clip-path: none;
	border-radius: 1px;
}

@keyframes beat {
	to {
		transform: scaleY(calc(var(--h) * 0.35));
	}
}

/* ---------- Connection test page ---------- */

.shell--narrow {
	max-width: 52rem;
}

.checks {
	display: grid;
	gap: 0.6rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.checks__item {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 0.15rem 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--line);
	border-left: 3px solid var(--text-faint);
	border-radius: var(--r-md);
	background: var(--surface);
}

.checks__state {
	grid-row: span 2;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-faint);
	padding-top: 0.3rem;
}

.checks__name {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.2;
}

.checks__detail {
	grid-column: 2;
	font-size: 0.9rem;
	color: var(--text-dim);
	overflow-wrap: anywhere;
}

.checks__item--ok {
	border-left-color: #5fb37a;
}

.checks__item--ok .checks__state {
	color: #5fb37a;
}

.checks__item--fail {
	border-left-color: #d9604c;
}

.checks__item--fail .checks__state {
	color: #d9604c;
}

.checks__locked {
	margin-top: 2rem;
	padding: 1.25rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-md);
	color: var(--text-dim);
	overflow-wrap: anywhere;
}

.checks__back {
	margin-top: 2rem;
}

/* ---------- Add a song page ---------- */

.songform {
	display: grid;
	gap: 1.25rem;
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
}

.songform .btn {
	justify-self: start;
}

.input--file {
	height: auto;
	padding: 0.6rem 0.75rem;
}

.songlist__title {
	margin-top: 2.5rem;
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 600;
}

.songlist__title + .checks {
	margin-top: 1rem;
}

.notice {
	margin-top: 1.5rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--line-strong);
	border-left-width: 3px;
	border-radius: var(--r-sm);
	background: var(--surface);
}

.notice--ok {
	border-left-color: #5fb37a;
}

.notice--fail {
	border-left-color: #d9604c;
}

/* ---------- Name tag, StatTrak, stickers and charm ---------- */

/* The side panel scrolls once the extra controls are shown; keep Cancel and Apply in reach */
.picker__side .picker__actions {
	position: sticky;
	bottom: -1.5rem;
	z-index: 1;
	margin-bottom: -1.5rem;
	padding-bottom: 1.5rem;
	background: linear-gradient(transparent, var(--bg-sunken) 1.1rem);
}

@media (max-width: 860px) {
	.picker__form {
		overflow-y: auto;
	}

	.picker__side .picker__actions {
		position: static;
		margin-bottom: 0;
		padding-bottom: 0;
		background: none;
	}

	.picker__main {
		min-height: 28rem;
	}

	.picker__list {
		overflow: visible;
	}
}

.picker__extras {
	display: grid;
	gap: 1.1rem;
	min-width: 0;
	margin: 1.25rem 0 0;
	padding: 1.25rem 0 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.picker__extras[hidden] {
	display: none;
}

.field__label {
	font-weight: 500;
}

.switch {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
}

.switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.switch__track {
	position: relative;
	width: 2.5rem;
	height: 1.4rem;
	flex: none;
	border: 1px solid var(--line-strong);
	border-radius: 0.7rem;
	background: var(--bg-raised);
	transition: background-color 0.2s, border-color 0.2s;
}

.switch__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: calc(1.4rem - 6px);
	height: calc(1.4rem - 6px);
	border-radius: 50%;
	background: var(--text-faint);
	transition: transform 0.25s var(--ease), background-color 0.2s;
}

.switch input:checked + .switch__track {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.switch input:checked + .switch__track::after {
	background: var(--accent);
	transform: translateX(1.1rem);
}

.switch input:focus-visible + .switch__track {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.slots {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.4rem;
}

.slot {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	padding: 0.2rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--bg-raised);
	color: var(--text-faint);
	transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.slot::before {
	content: "+";
	font-size: 1.2rem;
	line-height: 1;
}

.slot.is-filled::before,
.slot--wide::before {
	content: none;
}

.slot:hover {
	border-color: var(--accent-line);
	color: var(--accent);
	transform: translateY(-1px);
}

.slot.is-filled {
	border-style: solid;
	background: var(--surface);
}

.slot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.slot--wide {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	aspect-ratio: auto;
	min-height: 2.75rem;
	padding: 0.3rem 0.75rem;
	font-size: 0.85rem;
	text-align: left;
}

.slot--wide img {
	width: 2.1rem;
	height: 2.1rem;
	flex: none;
}

.slot--wide.is-filled {
	color: var(--text);
}

.slots__place {
	width: 100%;
	margin-top: 0.5rem;
	padding-block: 0.6rem;
	font-size: 0.85rem;
}

.slots__place:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.placer {
	width: min(64rem, 100% - 2rem);
	max-width: none;
	max-height: calc(100dvh - 2rem);
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	background: var(--bg-raised);
	color: var(--text);
	box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85);
	overflow: auto;
}

.placer[open] {
	animation: pop 0.3s var(--ease);
}

.placer::backdrop {
	background: rgba(4, 6, 9, 0.6);
	backdrop-filter: blur(4px);
}

.placer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.4rem;
	border-bottom: 1px solid var(--line);
}

.placer__title {
	margin-top: 0.2rem;
	font-family: var(--font-display);
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.placer__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19rem;
}

.placer__stage {
	position: relative;
	align-self: center;
	margin: 1.5rem;
	border: 1px dashed var(--line);
	border-radius: var(--r-md);
	background:
		linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
		radial-gradient(24rem 14rem at 50% 50%, var(--accent-soft), transparent 70%);
	touch-action: none;
	user-select: none;
}

.placer__weapon {
	width: 100%;
	pointer-events: none;
	filter: var(--img-shadow);
}

.placer__sticker {
	position: absolute;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	cursor: grab;
	touch-action: none;
}

.placer__sticker:active {
	cursor: grabbing;
}

.placer__sticker img {
	width: 100%;
	pointer-events: none;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.placer__sticker.is-selected {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* A sticker still on the game's default spot */
.placer__sticker.is-default:not(.is-selected) {
	outline: 1px dashed var(--line-strong);
	outline-offset: 3px;
}

.placer__panel {
	display: grid;
	align-content: start;
	gap: 1.1rem;
	padding: 1.4rem;
	border-left: 1px solid var(--line);
	background: var(--bg-sunken);
}

.placer__tabs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.4rem;
}

.placer__tab {
	aspect-ratio: 1;
	padding: 0.2rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--bg-raised);
	transition: border-color 0.2s, background-color 0.2s;
}

.placer__tab img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.placer__tab.is-active {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.placer__pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
}

.placer__note {
	font-size: 0.8rem;
	color: var(--text-faint);
	text-wrap: pretty;
}

@media (max-width: 860px) {
	.placer {
		width: 100%;
		max-height: 100dvh;
		border: 0;
		border-radius: 0;
	}

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

	.placer__stage {
		margin: 1rem;
	}

	.placer__panel {
		border-left: 0;
		border-top: 1px solid var(--line);
	}
}

.card__extras {
	margin-top: 0.45rem;
	overflow: hidden;
	font-size: 0.76rem;
	color: var(--accent);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.browser {
	width: min(56rem, 100% - 2rem);
	height: min(40rem, 100dvh - 2rem);
	max-width: none;
	max-height: none;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	background: var(--bg-raised);
	color: var(--text);
	box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85);
	overflow: hidden;
}

.browser[open] {
	display: flex;
	flex-direction: column;
	animation: pop 0.3s var(--ease);
}

.browser::backdrop {
	background: rgba(4, 6, 9, 0.6);
	backdrop-filter: blur(4px);
}

.browser__bar {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--line);
}

.browser__title {
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.browser__status {
	padding: 0.6rem 1.25rem 0;
	font-size: 0.75rem;
	color: var(--text-faint);
}

.browser__list {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
	grid-auto-rows: max-content;
	gap: 0.6rem;
	padding: 0.9rem 1.25rem 1.25rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}

@media (max-width: 860px) {
	.browser {
		width: 100%;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}

	.browser__bar {
		flex-wrap: wrap;
	}

	.browser__title {
		width: 100%;
	}

	.picker__extras {
		margin-top: 0.9rem;
		padding-top: 0.9rem;
	}
}

/* ---------- Sending in and reviewing songs ---------- */

.picker__links {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.picker__links[hidden] {
	display: none;
}

.songform__title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.1;
}

.songform__pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.9rem;
}

.songform + .songform {
	margin-top: 1rem;
}

.songform__rules {
	font-size: 0.85rem;
	color: var(--text-dim);
	text-wrap: pretty;
}

.review {
	display: grid;
	gap: 0.7rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.review__item {
	padding: 1.1rem;
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: var(--r-md);
	background: var(--surface);
}

.review__form {
	display: grid;
	gap: 0.8rem;
}

.review__head {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 0.6rem;
}

.review__item--song {
	border-left-color: var(--line-strong);
}

.review__head--song {
	grid-template-columns: minmax(0, 1fr) auto auto;
}

.btn--danger {
	border-color: rgba(217, 96, 76, 0.5);
	background: transparent;
	color: #e07a68;
}

.btn--danger:hover {
	border-color: #d9604c;
	background: rgba(217, 96, 76, 0.14);
	color: #f0a092;
}

.review__audio {
	width: 100%;
	height: 2.5rem;
}

.review__meta {
	font-size: 0.8rem;
	color: var(--text-faint);
	overflow-wrap: anywhere;
}

.review__meta a {
	color: var(--text-dim);
}

.review__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.6rem;
}

@media (max-width: 600px) {
	.review__head,
	.review__head--song {
		grid-template-columns: 1fr;
	}
}

/* ---------- Leaderboard ---------- */

.avatar {
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	flex: none;
	border: 1px solid var(--line-strong);
	border-radius: 28%;
	background: var(--surface-hi);
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--text-dim);
}

.avatar--small {
	width: 2.25rem;
	height: 2.25rem;
	font-size: 0.95rem;
}

.podium {
	display: grid;
	grid-template-columns: 1fr 1.15fr 1fr;
	align-items: end;
	gap: 0.9rem;
	margin: 2.25rem 0 0;
	padding: 0;
	list-style: none;
}

.podium__place {
	--metal: #b9805a;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	min-width: 0;
	padding: 1.4rem 1.4rem 1.5rem;
	overflow: hidden;
	border: 1px solid var(--line);
	border-top: 2px solid var(--metal);
	border-radius: var(--r-md);
	background:
		radial-gradient(18rem 9rem at 85% 0%, color-mix(in srgb, var(--metal) 20%, transparent), transparent 70%),
		linear-gradient(170deg, var(--surface-hi), var(--bg-raised));
	animation: rise 0.7s var(--ease) both;
}

.podium__place--1 {
	--metal: var(--accent);
	order: 2;
	padding-block: 2rem 2.1rem;
}

.podium__place--2 {
	--metal: #aeb6c2;
	order: 1;
	animation-delay: 0.08s;
}

.podium__place--3 {
	order: 3;
	animation-delay: 0.16s;
}

.podium__rank {
	position: absolute;
	top: -0.6rem;
	right: 0.9rem;
	font-family: var(--font-display);
	font-size: 6.5rem;
	font-weight: 700;
	line-height: 1;
	color: var(--metal);
	opacity: 0.16;
}

.podium__place .avatar {
	border-color: var(--metal);
	color: var(--metal);
	margin-bottom: 0.6rem;
}

.podium__name {
	max-width: 100%;
	overflow: hidden;
	font-family: var(--font-display);
	font-size: 1.7rem;
	font-weight: 600;
	line-height: 1.1;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.podium__place--1 .podium__name {
	font-size: 2.1rem;
}

.podium__title {
	font-size: 0.85rem;
	color: var(--text-dim);
}

.podium__points {
	margin-top: 0.7rem;
	font-size: 1.5rem;
	font-weight: 500;
	color: var(--metal);
}

.podium__points small {
	font-size: 0.75rem;
	color: var(--text-faint);
}

.podium__line {
	font-size: 0.75rem;
	color: var(--text-faint);
}

.board {
	margin-top: 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--bg-raised);
	overflow-x: auto;
}

.board__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.board__table th {
	padding: 0.8rem 0.9rem;
	border-bottom: 1px solid var(--line-strong);
	font-family: var(--font-mono);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--text-faint);
}

.board__table td {
	padding: 0.65rem 0.9rem;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}

.board__table tbody tr:last-child td {
	border-bottom: 0;
}

.board__table tbody tr {
	transition: background-color 0.15s;
}

.board__table tbody tr:hover {
	background: var(--surface);
}

.board__table .num {
	text-align: right;
}

.board__table td.num {
	font-size: 0.85rem;
	color: var(--text-dim);
}

.board__table td small {
	margin-left: 0.3rem;
	font-size: 0.72rem;
	color: var(--text-faint);
}

.board__table th.is-sorted {
	color: var(--accent);
}

.board__table td.is-sorted {
	color: var(--text);
	font-weight: 500;
}

.board__pos {
	width: 3.5rem;
	color: var(--text-faint);
}

.board__seen {
	font-size: 0.82rem;
	color: var(--text-faint);
}

.board__table tr.is-me,
.board__table tr.is-me:hover {
	background: var(--accent-soft);
}

.board__table tr.is-me .board__pos {
	color: var(--accent);
	box-shadow: inset 3px 0 0 var(--accent);
}

.podium__place.is-me {
	box-shadow: 0 0 0 1px var(--accent-line);
}

.player {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 12rem;
}

.player__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.player__name {
	max-width: 18rem;
	overflow: hidden;
	font-weight: 500;
	text-decoration: none;
	text-overflow: ellipsis;
}

.player__name:hover {
	color: var(--accent);
}

.player__rank {
	font-size: 0.76rem;
	color: var(--text-faint);
}

.pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.5rem;
}

.pager__status {
	font-size: 0.8rem;
	color: var(--text-faint);
}

form.search {
	margin: 0;
}

@media (max-width: 1150px) {
	.board__table .col-wide {
		display: none;
	}
}

@media (max-width: 760px) {
	.board__table .col-mid {
		display: none;
	}

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

	.podium__place--1 { order: 1; }
	.podium__place--2 { order: 2; }
	.podium__place--3 { order: 3; }

	.player {
		min-width: 0;
	}

	.player__name {
		max-width: 9rem;
	}
}

/* ---------- Toast & footer ---------- */

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.75rem;
	z-index: var(--z-toast);
	padding: 0.75rem 1.2rem;
	border: 1px solid var(--accent-line);
	border-radius: var(--r-sm);
	background: var(--surface-hi);
	box-shadow: var(--shadow);
	font-size: 0.9rem;
	transform: translateX(-50%);
	animation: toast 3.2s var(--ease) both;
}

.toast[hidden] {
	display: none;
}

.footer {
	width: var(--page);
	margin-inline: auto;
	padding-block: 1.5rem 2rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	border-top: 1px solid var(--line);
	font-size: 0.82rem;
	color: var(--text-faint);
}

.footer a {
	color: var(--text-dim);
	text-underline-offset: 3px;
}

.footer a:hover {
	color: var(--accent);
}

/* ---------- Motion ---------- */

@keyframes rise {
	from {
		opacity: 0;
		translate: 0 18px;
	}
}

@keyframes float {
	50% {
		translate: 0 -10px;
	}
}

@keyframes pop {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}
}

@keyframes swap {
	from {
		opacity: 0;
		transform: translateX(-14px) scale(0.96);
	}
}

@keyframes shimmer {
	to {
		background-position: -300% 0;
	}
}

@keyframes toast {
	0% {
		opacity: 0;
		translate: 0 12px;
	}

	10%,
	85% {
		opacity: 1;
		translate: 0 0;
	}

	100% {
		opacity: 0;
		translate: 0 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
	}

	.hero__stage {
		min-height: 20rem;
	}

	.picker {
		width: 100%;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}

	.picker__form {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
	}

	.picker__side {
		padding: 1rem 1.1rem;
		border-right: 0;
		border-bottom: 1px solid var(--line);
		overflow: visible;
	}

	.picker__title {
		font-size: 1.7rem;
	}

	.picker__preview {
		min-height: 5rem;
		margin-top: 0.25rem;
	}

	.picker__preview img {
		max-height: 5rem;
	}

	.picker__paint {
		font-size: 1.2rem;
	}

	.picker__controls {
		grid-template-columns: 1fr 1fr;
		gap: 0.9rem;
		margin-top: 0.75rem;
	}

	.picker__controls input[type="range"],
	.wearbar {
		display: none;
	}

	.picker__actions {
		padding-top: 0.9rem;
	}

	.picker__bar {
		padding: 0.7rem 1.1rem;
	}

	.picker__list {
		grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
		padding: 0.9rem 1.1rem;
	}
}

@media (max-width: 600px) {
	.topnav__link {
		padding: 0.5rem 0.55rem;
		font-size: 0.85rem;
	}

	.topbar .search {
		display: none;
	}

	.card.card--mvp .card__paint,
	.card.card--gloves .card__paint,
	.card--knife .card__paint {
		font-size: 1.5rem;
	}

	.search kbd,
	.brand__name {
		display: none;
	}

	.search {
		width: auto;
		flex: 1;
	}

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

	.card {
		min-height: 14rem;
		padding: 0.8rem;
	}

	.card__paint {
		font-size: 1.2rem;
	}

	.card__specs span:first-child {
		display: none;
	}

	.stats {
		gap: 1.75rem;
	}
}
