:root {
	--bg: #101216;
	--panel: #181c24;
	--panel-2: #202632;
	--line: #2d3542;
	--text: #eef2f8;
	--muted: #9aa5b5;
	--primary: #4f8cff;
}

* {
	box-sizing: border-box;
}

body {
	min-height: 100vh;
	margin: 0;
	background:
		radial-gradient(circle at 18% 14%, rgba(79, 140, 255, 0.16), transparent 28%),
		radial-gradient(circle at 82% 8%, rgba(96, 124, 168, 0.12), transparent 24%),
		linear-gradient(180deg, #121722 0%, var(--bg) 42%, #0d0f14 100%);
	color: var(--text);
	font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
	position: relative;
	overflow-x: hidden;
}

body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
}

body::before {
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 72%);
}

body::after {
	inset: auto -120px -180px auto;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: rgba(79, 140, 255, 0.1);
	filter: blur(26px);
}

.app-shell {
	width: min(1180px, calc(100% - 28px));
	margin: 0 auto;
	padding: 28px 0 40px;
	position: relative;
}

.site-footer {
	margin-top: 28px;
	text-align: center;
	color: var(--muted);
	font-size: 12px;
	letter-spacing: .02em;
}

.access-shell .site-footer {
	position: fixed;
	right: 0;
	bottom: 16px;
	left: 0;
	margin: 0;
}


.language-switch {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 1050;
	margin: 0;
}

.admin-button {
	position: fixed;
	top: 16px;
	right: 62px;
	z-index: 1050;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: var(--text);
}

.admin-button:hover,
.admin-button.active {
	border-color: var(--primary);
	color: var(--primary);
}

.admin-button.active::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #49c97a;
	box-shadow: 0 0 0 2px var(--panel);
}

.admin-button svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.language-menu {
	position: relative;
}

.language-button {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: var(--text);
	cursor: pointer;
	list-style: none;
}

.language-button::-webkit-details-marker {
	display: none;
}

.language-button svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.language-button:hover,
.language-menu[open] .language-button {
	border-color: var(--primary);
	color: var(--primary);
}

.language-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 20;
	min-width: 132px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

@media (max-width: 576px) {
	.language-switch {
		top: 10px;
		right: 10px;
	}

	.admin-button {
		top: 10px;
		right: 56px;
	}
}

.language-dropdown a {
	display: block;
	padding: 8px 10px;
	border-radius: 6px;
	color: var(--muted);
	text-decoration: none;
	font-size: 13px;
	white-space: nowrap;
}

.language-dropdown a.active,
.language-dropdown a:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.08);
}

.home-panel {
	min-height: min(560px, calc(100vh - 110px));
	display: grid;
	align-content: start;
	gap: 16px;
	width: min(640px, 100%);
	padding-top: clamp(64px, 15vh, 132px);
}

.home-panel h1,
.page-head h1 {
	font-size: clamp(32px, 6vw, 56px);
	margin: 0;
}

.home-panel h1 {
	line-height: 1.05;
	text-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.home-panel p,
.page-head p,
.hint {
	color: var(--muted);
	margin: 0;
}

.home-actions,
.page-head,
.preset-actions,
.identity-form,
.team-tabs {
	display: flex;
	gap: 12px;
	align-items: center;
}


.access-panel {
    position: fixed;
    top: 30%;
    left: 50%;
    z-index: 2;

    width: min(380px, calc(100% - 32px));
    padding: 28px;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 18px;

    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, .18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .045), transparent 48%),
        var(--panel);

    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .05);

    transform: translate(-50%, -50%);
    overflow: hidden;
}

.access-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 38%),
        radial-gradient(circle at 15% 100%, rgba(255, 255, 255, .035), transparent 36%);

    opacity: .9;
}

.access-panel > * {
    position: relative;
    z-index: 1;
}

.access-panel h1 {
    margin: 0;
    font-size: clamp(26px, 5vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text);
}

.access-panel p {
    margin: -8px 0 2px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.access-panel .alert {
    margin: 0;
    padding: 10px 12px;

    font-size: 13px;
    line-height: 1.45;

    color: #ffd6d6;
    background: rgba(216, 59, 59, .14);
    border: 1px solid rgba(216, 59, 59, .35);
    border-radius: 12px;
}

.access-panel .form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.access-panel label {
    display: flex;
    flex-direction: column;
    gap: 8px;

    width: 100%;
    color: var(--muted);
    font-size: 13px;
}

.access-panel input {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    color: var(--text);
    background: rgba(0, 0, 0, .22);

    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;

    outline: none;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.access-panel input:focus {
    border-color: rgba(79, 140, 255, .75);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, .14);
    background: rgba(0, 0, 0, .28);
}

.access-panel .btn {
    width: 100%;
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 12px;

    font-weight: 700;
    letter-spacing: .02em;

    color: #fff;
    background:
        linear-gradient(135deg, rgba(79, 140, 255, 1), rgba(64, 116, 220, 1));

    box-shadow:
        0 12px 30px rgba(79, 140, 255, .26),
        inset 0 1px 0 rgba(255, 255, 255, .2);

    cursor: pointer;
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        filter .16s ease;
}

.access-panel .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        0 16px 36px rgba(79, 140, 255, .32),
        inset 0 1px 0 rgba(255, 255, 255, .24);
}

.access-panel .btn:active {
    transform: translateY(0);
    filter: brightness(.98);
}

@media (max-width: 520px) {
    .access-panel {
        width: min(100% - 24px, 380px);
        padding: 22px;
        border-radius: 16px;
    }

    .access-panel h1 {
        font-size: 26px;
    }
}

.page-head {
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.back-link {
	color: var(--muted);
	text-decoration: none;
	display: inline-block;
	margin-bottom: 10px;
}

.back-link:hover {
	color: var(--text);
}

.panel,
.preset-card,
.skin-card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.panel {
	padding: 20px;
	margin: 16px 0;
}

.narrow {
	width: min(620px, 100%);
}

.form-grid {
	display: grid;
	gap: 14px;
}

label {
	display: grid;
	gap: 7px;
	color: var(--muted);
	width: 100%;
}

.form-control,
.form-select {
	background-color: #0d1016;
	border-color: var(--line);
	color: var(--text);
}

.form-control:focus,
.form-select:focus {
	background-color: #0d1016;
	color: var(--text);
	border-color: var(--primary);
	box-shadow: 0 0 0 .2rem rgba(79, 140, 255, .2);
}

.preset-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
}

.preset-card {
	position: relative;
	display: grid;
	grid-template-rows: 1fr auto;
	gap: 14px;
	min-height: 150px;
	padding: 14px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .025), transparent),
		var(--panel);
	overflow: hidden;
}

.preset-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle at 85% 10%, rgba(79, 140, 255, .14), transparent 38%);
}

.preset-card-body,
.preset-actions {
	position: relative;
	z-index: 1;
}

.preset-card strong {
	display: block;
	font-size: 17px;
	line-height: 1.3;
	overflow: hidden;
	word-break: break-word;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.preset-card span {
	display: block;
	color: var(--muted);
	font-size: 12px;
	margin-top: 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.loadout-password-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 10px;
	padding: 4px 7px;
	border: 1px solid rgba(79, 140, 255, .35);
	border-radius: 6px;
	background: rgba(79, 140, 255, .1);
	color: #b8d0ff;
	font-size: 11px;
	line-height: 1;
}

.loadout-password-label svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.preset-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.preset-actions form {
	margin: 0;
}

.preset-actions .delete-tooltip-wrap {
	display: block;
	width: 100%;
	margin-top: 0;
	color: inherit;
	font-size: inherit;
	overflow: visible;
	white-space: normal;
}

.preset-actions .btn {
	width: 100%;
	padding-inline: 8px;
}

.team-tabs {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 4px;
}

.team-tabs a {
	color: var(--muted);
	text-decoration: none;
	border-radius: 6px;
	padding: 10px 16px;
}

.team-tabs a.active {
	color: white;
	background: var(--primary);
}

.loadout-info-panel {
	position: relative;
	padding: 22px;
	border-color: rgba(79, 140, 255, .28);
	background:
		radial-gradient(circle at 92% 8%, rgba(79, 140, 255, .12), transparent 32%),
		linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 48%),
		var(--panel);
	overflow: hidden;
}

.create-loadout-panel {
	width: min(780px, 100%);
	margin-inline: auto;
}

.identity-panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.identity-panel-head h1,
.identity-panel-head h2 {
	margin: 0;
	color: var(--text);
	font-size: 22px;
	line-height: 1.25;
}

.identity-panel-head h1 {
	font-size: 28px;
}

.identity-panel-head p {
	margin: 5px 0 0;
	color: var(--muted);
	font-size: 13px;
}

.identity-status {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 9px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: rgba(255, 255, 255, .035);
	color: var(--muted);
	font-size: 11px;
}

.identity-status.active {
	border-color: rgba(79, 140, 255, .42);
	background: rgba(79, 140, 255, .12);
	color: #c4d8ff;
}

.identity-form {
	display: grid;
	gap: 18px;
}

.identity-main-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.loadout-info-form .form-control {
	min-height: 44px;
	border-radius: 7px;
}

.identity-loadout-password-settings {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) auto minmax(240px, .9fr);
	align-items: center;
	gap: 16px;
	padding: 16px;
	border: 1px solid rgba(255, 255, 255, .075);
	border-radius: 8px;
	background: rgba(8, 11, 16, .38);
}

.loadout-password-setting-copy {
	display: grid;
	gap: 4px;
}

.loadout-password-setting-copy strong {
	color: var(--text);
	font-size: 14px;
}

.loadout-password-setting-copy small {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.45;
}

.loadout-password-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: max-content;
	min-height: 24px;
	margin: 0;
	padding-left: 0;
	color: var(--text);
	cursor: pointer;
}

.loadout-password-toggle .form-check-input {
	float: none;
	margin: 0;
	margin-left: 0;
	flex: 0 0 auto;
}

.loadout-password-input-wrap {
	margin: 0;
	transition: opacity .16s ease;
}

.loadout-password-input-wrap.is-inactive,
.nametag-input.is-inactive,
.stattrak-input.is-inactive {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.form-control::placeholder {
	color: rgba(255, 255, 255, .36);
	opacity: 1;
}

.loadout-password-input-wrap small,
.modal-subtitle {
	color: var(--muted);
	font-size: 12px;
}

.identity-form-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 2px;
}

.identity-form-actions .btn {
	min-width: 112px;
}

@media (max-width: 900px) {
	.identity-loadout-password-settings {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.loadout-password-input-wrap {
		grid-column: 1 / -1;
	}
}

#adminModal .modal-footer form {
	margin: 0;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.skin-card {
	position: relative;
	display: grid;
	grid-template-rows: 78px minmax(0, 1fr) auto auto auto;
	gap: 8px;
	padding: 14px;
	height: 380px;
	min-height: 0;
}

.skin-card.featured {
	border-color: rgba(79, 140, 255, .65);
}

.skin-card > form {
	display: contents;
}

.modal-form {
	display: contents;
}

.card-title-wrap {
	grid-row: 1;
	min-height: 0;
	overflow: hidden;
}

.card-title-wrap span {
	display: block;
	color: var(--muted);
	font-size: 13px;
	margin-bottom: 5px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-title-wrap h2 {
	display: -webkit-box;
	font-size: 17px;
	line-height: 1.3;
	margin: 0;
	overflow: hidden;
	word-break: break-word;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.skin-image {
	grid-row: 2;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
	display: block;
	align-self: center;
	justify-self: center;
}

.skin-visual {
	position: relative;
	grid-row: 2;
	width: 100%;
	height: 100%;
	min-height: 0;
	display: grid;
	place-items: center;
}

.skin-visual .skin-image,
.skin-visual .empty-image {
	grid-row: auto;
	width: 100%;
	height: 100%;
}

.pattern-badge {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 1;
	max-width: calc(100% - 8px);
	padding: 4px 8px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 6px;
	background: rgba(7, 10, 15, .82);
	color: var(--text);
	font-size: 11px;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .24);
}

.empty-image {
	grid-row: 2;
	height: 100%;
	min-height: 0;
	display: grid;
	place-items: center;
	color: var(--muted);
	background: #0d1016;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.select-label {
	margin-top: 10px;
}

.skin-card .form-select {
	font-size: 13px;
}

.card-stickers {
	grid-row: 3;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 4px;
	min-height: 34px;
	margin: 0;
	overflow: hidden;
}

.card-stickers img {
	width: 27px;
	height: 27px;
	object-fit: contain;
	padding: 3px;
	background: #2a303b;
	border: 1px solid var(--line);
	border-radius: 6px;
}

.card-stickers img.card-keychain-preview {
	padding: 2px;
	border-width: 2px;
	border-color: #7d8490;
	background: #2a303b;
}


.settings-row {
	grid-row: 5;
	display: flex;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	align-self: end;
	min-width: 0;
	overflow: hidden;
}

.settings-row .btn {
	flex: 0 1 auto;
	min-width: 0;
	padding-left: .45rem;
	padding-right: .45rem;
	white-space: nowrap;
}

.settings-row .btn:disabled {
	background: rgba(255, 255, 255, .03);
	border-color: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .34);
	filter: grayscale(1);
	opacity: .42;
	cursor: not-allowed;
}

.wear-meter {
	position: relative;
	grid-row: 4;
	align-self: center;
	width: 100%;
	padding-top: 0;
}

.wear-value {
	margin-bottom: 9px;
	color: var(--muted);
	font-size: 11px;
	line-height: 14px;
}

.wear-meter .progress {
	height: 8px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 999px;
	background: #0d1016;
}

.wear-meter .progress-bar-fn { background: #377e21; }
.wear-meter .progress-bar-mw { background: #73b566; }
.wear-meter .progress-bar-ft { background: #e4b05e; }
.wear-meter .progress-bar-ww { background: #c85d53; }
.wear-meter .progress-bar-bs { background: #8d413b; }

.wear-pointer-icon {
	position: absolute;
	top: 16px;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-right: 5px solid transparent;
	border-left: 5px solid transparent;
	border-top: 7px solid #f4f7ff;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55));
}

.check-line {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: auto;
	color: var(--text);
}

.check-line input {
	width: 18px;
	height: 18px;
	accent-color: var(--primary);
}

.weapon-option-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: stretch;
}

.nametag-row,
.stattrak-row {
	display: grid;
	grid-template-rows: auto 38px;
	gap: 10px;
	align-items: center;
	min-width: 0;
	min-height: 96px;
	padding: 12px 13px;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 8px;
	background: rgba(8, 11, 16, .58);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.nametag-row:has([data-nametag-toggle]:checked) {
	border-color: rgba(79, 140, 255, .42);
	background: rgba(79, 140, 255, .07);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 0 0 1px rgba(79, 140, 255, .05);
}

.stattrak-row:has([data-stattrak-toggle]:checked) {
	border-color: rgba(207, 106, 50, .48);
	background: rgba(207, 106, 50, .075);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 0 0 1px rgba(207, 106, 50, .06);
}

.nametag-row input[type="hidden"] {
	display: none;
}

.nametag-input[hidden],
.stattrak-input[hidden] {
	display: none;
}

.nametag-input,
.stattrak-input {
	height: 38px;
	transition: opacity .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.skin-edit-modal .modal-dialog {
	width: min(720px, calc(100% - 24px));
	max-width: 720px;
}

.nametag-label {
	color: var(--text);
}

.stattrak-label {
	color: #cf6a32;
	font-weight: 600;
	letter-spacing: .01em;
}

.weapon-option-card .check-line {
	flex-direction: row-reverse;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	min-width: 0;
	cursor: pointer;
}

.weapon-option-card .check-line input[type="checkbox"] {
	position: relative;
	flex: 0 0 auto;
	width: 38px;
	height: 22px;
	margin: 0;
	appearance: none;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	background: #2a303b;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.weapon-option-card .check-line input[type="checkbox"]::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #d9dee8;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
	transition: transform .16s ease, background-color .16s ease;
}

.weapon-option-card .check-line input[type="checkbox"]:checked {
	border-color: var(--primary);
	background: var(--primary);
	box-shadow: 0 0 0 3px rgba(79, 140, 255, .12);
}

.stattrak-row .check-line input[type="checkbox"]:checked {
	border-color: #cf6a32;
	background: #cf6a32;
	box-shadow: 0 0 0 3px rgba(207, 106, 50, .13);
}

.weapon-option-card .check-line input[type="checkbox"]:checked::after {
	transform: translateX(16px);
	background: #fff;
}

.weapon-option-card .check-line input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(255, 255, 255, .8);
	outline-offset: 2px;
}


.sticker-section,
.keychain-section {
	display: grid;
	gap: 8px;
}

.cosmetic-editor {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
}

.customization-panel {
	min-width: 0;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 8px;
	background: rgba(8, 11, 16, .58);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.modal-body .row.g-3 {
	--bs-gutter-y: .75rem;
}

.sticker-section-heading,
.keychain-section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	min-height: 34px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sticker-section-title,
.keychain-section-title {
	color: var(--text);
	font-weight: 600;
}

.sticker-tool-buttons {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.sticker-tool-button-wrap {
	display: inline-grid;
}

.sticker-tool-button {
	width: 34px;
	height: 34px;
	display: inline-grid;
	place-items: center;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.sticker-tool-button:disabled {
	background: rgba(255, 255, 255, .03);
	border-color: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .34);
	filter: grayscale(1);
	opacity: .42;
	cursor: not-allowed;
	pointer-events: none;
}

.sticker-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	align-items: start;
}

.sticker-slot,
.keychain-slot {
	display: grid;
	grid-template-rows: auto 32px;
	gap: 6px;
	min-width: 0;
	max-width: 100%;
	min-height: 0;
	width: 100%;
	justify-items: center;
	align-content: start;
}

.sticker-slot-preview,
.keychain-slot-preview {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.sticker-slot-index {
	position: absolute;
	top: 7px;
	left: 7px;
	z-index: 2;
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 6px;
	background: rgba(4, 7, 11, .78);
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
	pointer-events: none;
}
.sticker-slot-button,
.keychain-slot-button {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	background: rgba(13, 16, 22, .82);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--muted);
	cursor: pointer;
	padding: 8px;
	transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.sticker-slot-button:hover,
.sticker-result:hover,
.keychain-slot-button:hover,
.keychain-result:hover {
	border-color: var(--primary);
	color: var(--text);
	background: rgba(255, 255, 255, .035);
}

.sticker-plus,
.keychain-plus {
	font-size: 28px;
	line-height: 1;
}

.sticker-slot-button img,
.keychain-slot-button img {
	width: 80%;
	height: 80%;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
	display: block;
	object-fit: contain;
}

.sticker-result img,
.keychain-result img {
	width: 64px;
	height: 64px;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.sticker-slot-name,
.keychain-slot-name {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.25;
	height: 32px;
	width: 100%;
	overflow: hidden;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sticker-slot-name span,
.keychain-slot-name span {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sticker-picker-modal .modal-body,
.keychain-picker-modal .modal-body {
	display: grid;
	gap: 12px;
}

.picker-modal-body {
	display: flex !important;
	flex-direction: column;
	gap: 12px;
	overflow: hidden;
	min-height: 0;
}

.picker-search-bar {
	position: sticky;
	top: 0;
	z-index: 2;
	padding-bottom: 2px;
	background: var(--panel);
}

.picker-results-scroll {
	flex: 1 1 auto;
	width: 100%;
	overflow: auto;
	min-height: 0;
	padding-right: 2px;
	align-content: start;
}

.sticker-picker-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: start;
	align-items: flex-start;
	justify-content: flex-start;
}

.keychain-picker-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: start;
	align-items: flex-start;
	justify-content: flex-start;
}

.keychain-grid {
	display: grid;
	grid-template-columns: minmax(96px, 132px);
	gap: 8px;
	align-items: start;
}

.keychain-slot {
	max-width: 132px;
}

.keychain-inline-editor {
	display: grid;
	grid-template-columns: 144px minmax(0, 1fr);
	gap: 18px;
	align-items: stretch;
	padding: 4px;
}

.keychain-inline-controls {
	display: grid;
	grid-template-columns: 1fr;
	gap: 9px;
	align-content: center;
}

.keychain-param-row,
.skin-param-row {
	display: grid;
	grid-template-columns: minmax(112px, max-content) minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	justify-content: stretch;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 7px;
	background: rgba(255, 255, 255, .025);
}

.keychain-param-row > label,
.skin-param-row > label {
	min-width: 0;
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
}

.keychain-param-control,
.skin-param-control {
	display: grid;
	grid-template-columns: minmax(90px, 1fr) 88px;
	gap: 10px;
	align-items: center;
	min-width: 0;
}

.keychain-param-control input[type="range"],
.skin-param-control input[type="range"] {
	width: 100%;
	min-width: 0;
	accent-color: var(--primary);
}

.keychain-param-control .form-control,
.skin-param-control .form-control {
	min-width: 0;
	height: 34px;
	padding: 5px 8px;
	font-size: 12px;
}

.keychain-param-control input:disabled {
	opacity: .46;
	cursor: not-allowed;
}

.skin-param-grid {
	display: grid;
	gap: 9px;
}

.agent-picker-modal .modal-body,
.skin-picker-modal .modal-body {
	display: grid;
	gap: 12px;
}

.agent-picker-grid,
.skin-picker-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: start;
	align-items: flex-start;
	justify-content: flex-start;
}

.sticker-result,
.keychain-result {
	position: relative;
	box-sizing: border-box;
	grid-row: auto;
	grid-column: auto;
	display: grid;
	grid-template-rows: minmax(0, 1fr) 34px;
	gap: 8px;
	align-items: center;
	justify-items: center;
	flex: 0 0 calc((100% - 50px) / 6);
	width: calc((100% - 50px) / 6);
	height: auto;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 1 / 1;
	align-self: start;
	overflow: hidden;
	padding: 10px;
	background: #0d1016;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font-size: 12px;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
}

.agent-result,
.skin-result {
	position: relative;
	box-sizing: border-box;
	grid-row: auto;
	grid-column: auto;
	display: grid;
	grid-template-rows: minmax(0, 1fr) 36px;
	gap: 10px;
	align-items: center;
	justify-items: center;
	flex: 0 0 calc((100% - 40px) / 5);
	width: calc((100% - 40px) / 5);
	height: auto;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 1 / 1;
	align-self: start;
	overflow: hidden;
	padding: 12px;
	background: #0d1016;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font-size: 12px;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
}

.agent-result:hover,
.agent-result.active,
.skin-result:hover,
.skin-result.active {
	border-color: var(--primary);
	color: var(--text);
}

.agent-result.active,
.skin-result.active {
	box-shadow: 0 0 0 1px rgba(79, 140, 255, .35);
}

.agent-result img,
.skin-result img {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
}

.skin-result .empty-image {
	grid-row: 1;
	width: 100%;
	height: 100%;
	font-size: 12px;
	padding: 8px;
}

.sticker-result > span:last-child,
.keychain-result > span:last-child,
.agent-result > span:last-child,
.skin-result > span:last-child {
	display: -webkit-box;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	text-overflow: ellipsis;
}

.sticker-empty-icon,
.keychain-empty-icon {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	border: 1px solid var(--line);
	font-size: 24px;
	color: var(--muted);
}

.card-status-badges {
	position: absolute;
	top: 100px;
	right: 14px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	pointer-events: none;
}

.nametag-badge,
.stattrak-badge {
	border-radius: 6px;
	padding: 2px 6px;
	font-size: 11px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: .01em;
	white-space: nowrap;
}

.nametag-badge {
	color: var(--text);
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .36);
}

.stattrak-badge {
	color: #cf6a32;
	background: rgba(207, 106, 50, .12);
	border: 1px solid rgba(207, 106, 50, .45);
}

.modal-content {
	background: var(--panel);
	border: 1px solid var(--line);
}

.sticker-picker-modal .modal-dialog,
.keychain-picker-modal .modal-dialog,
.skin-picker-modal .modal-dialog {
	width: calc(100% - 32px);
	max-width: 1100px;
	margin-right: auto;
	margin-left: auto;
}

.sticker-picker-modal,
.keychain-picker-modal {
	z-index: 1070;
}

.modal-backdrop.sticker-picker-backdrop {
	opacity: 0 !important;
}

.modal.sticker-underlay-active > .modal-dialog > .modal-content {
	position: relative;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, .05),
		0 30px 90px rgba(0, 0, 0, .9),
		inset 0 0 0 999px rgba(0, 0, 0, .34);
}

.modal.sticker-underlay-active > .modal-dialog > .modal-content::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .34));
}

.btn-primary {
	background: var(--primary);
	border-color: var(--primary);
}

@media (max-width: 720px) {
	.app-shell {
		width: min(100% - 20px, 1180px);
		padding-top: 18px;
	}

	.home-panel {
		min-height: calc(100vh - 94px);
		padding-top: clamp(44px, 12vh, 86px);
	}

	.home-actions,
	.preset-card,
	.preset-actions,
	.identity-form {
		display: grid;
		grid-template-columns: 1fr;
	}

	.home-actions .btn,
	.preset-actions .btn,
	.preset-actions form,
	.identity-form .btn {
		width: 100%;
	}

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

	.weapon-option-grid {
		grid-template-columns: 1fr;
	}

	.loadout-info-panel {
		padding: 17px;
	}

	.identity-panel-head {
		align-items: center;
		margin-bottom: 16px;
	}

	.identity-panel-head h1 {
		font-size: 24px;
	}

	.identity-main-fields,
	.identity-loadout-password-settings {
		grid-template-columns: 1fr;
	}

	.loadout-password-toggle,
	.loadout-password-input-wrap {
		grid-column: auto;
	}

	.identity-form-actions .btn {
		width: 100%;
	}

	.modal-footer {
		flex-wrap: wrap;
	}

	.modal-footer .btn,
	.modal-footer form,
	.modal-footer form .btn {
		width: 100%;
	}

	.cosmetic-editor {
		grid-template-columns: 1fr;
	}

	.sticker-grid {
		grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
	}

	.keychain-slot {
		width: min(132px, 100%);
	}
}






.sticker-slot,
.keychain-slot {
	position: relative;
}

.sticker-slot-settings {
	position: absolute;
	left: 98%;
	top: 98%;
	transform: translate(-100%, -100%);
	width: 28px;
	height: 28px;
	display: inline-grid;
	place-items: center;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .26);
	border-radius: 8px;
	background: rgba(13, 16, 22, .86);
	color: var(--text);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.sticker-slot-settings:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.sticker-slot-settings[hidden] {
	display: none;
}

.sticker-advanced-modal {
	z-index: 1070;
}

.sticker-advanced-subtitle {
	margin-top: 4px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.35;
}

.sticker-advanced-body {
	display: grid;
	gap: 14px;
}

.sticker-advanced-row {
	display: grid;
	gap: 8px;
}

.sticker-advanced-row label {
	color: var(--text);
	font-weight: 600;
}

.sticker-advanced-controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 96px;
	gap: 12px;
	align-items: center;
}

.sticker-advanced-controls input[type="range"] {
	width: 100%;
}

.sticker-advanced-controls input[type="number"] {
	min-width: 0;
}

@media (max-width: 520px) {
	.sticker-advanced-controls {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.keychain-inline-editor {
		grid-template-columns: 1fr;
	}

	.keychain-grid,
	.keychain-slot {
		width: 144px;
		max-width: 144px;
		justify-self: center;
	}

	.keychain-inline-controls {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 430px) {
	.keychain-param-row,
	.skin-param-row {
		grid-template-columns: 1fr;
		gap: 7px;
	}

	.keychain-param-control,
	.skin-param-control {
		grid-template-columns: minmax(0, 1fr) 82px;
	}
}

@media (max-width: 900px) {
	.sticker-result,
	.keychain-result {
		flex-basis: calc((100% - 40px) / 5);
		width: calc((100% - 40px) / 5);
	}

	.agent-result,
	.skin-result {
		flex-basis: calc((100% - 30px) / 4);
		width: calc((100% - 30px) / 4);
	}
}

@media (max-width: 700px) {
	.sticker-result,
	.keychain-result,
	.agent-result,
	.skin-result {
		flex-basis: calc((100% - 20px) / 3);
		width: calc((100% - 20px) / 3);
	}
}

@media (max-width: 430px) {
	.sticker-result,
	.keychain-result,
	.agent-result,
	.skin-result {
		flex-basis: calc((100% - 10px) / 2);
		width: calc((100% - 10px) / 2);
	}
}
