/* FinalsMains - style.css */
/* Organized by component; all responsive overrides are grouped at the end. */
/* Load style.css before manage.css so management overrides retain priority. */

/* ==========================================================================
   01. Fonts & theme
   Local typefaces and shared typography variables.
   ========================================================================== */

@font-face {
	font-family: "Saira Finals Condensed";
	src: url("/assets/fonts/saira/Saira_Condensed-Medium.ttf") format("truetype");
	font-style: normal;
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Saira Finals Condensed";
	src: url("/assets/fonts/saira/Saira_Condensed-Bold.ttf") format("truetype");
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Saira Finals ExtraCondensed";
	src: url("/assets/fonts/saira/Saira_ExtraCondensed-Italic.ttf") format("truetype");
	font-style: italic;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Saira Finals ExtraCondensed";
	src: url("/assets/fonts/saira/Saira_ExtraCondensed-BoldItalic.ttf") format("truetype");
	font-style: italic;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Saira Finals ExtraCondensed";
	src: url("/assets/fonts/saira/Saira_ExtraCondensed-ExtraBoldItalic.ttf") format("truetype");
	font-style: italic;
	font-weight: 800;
	font-display: swap;
}

:root {
	--font-body: "Saira Finals Condensed", Arial, sans-serif;
	--font-heading: "Saira Finals ExtraCondensed", "Arial Narrow", Arial, sans-serif;
	--font-button: "Saira Finals ExtraCondensed", "Arial Narrow", Arial, sans-serif;
}

/* ==========================================================================
   02. Base & utilities
   Site-wide reset, document colors and accessible utility styles.
   ========================================================================== */

* {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
}

body {
	margin: 0;
	overflow-x: hidden;
	background-color: #090b0e;
	color: #f2f3f5;
	font-family: var(--font-body);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.45;
	background-image: url("/assets/img/branding/background.jpg");
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	overflow-y: hidden;
}

[hidden] {
	display: none !important;
}

.sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

html,
body {
	height: 100%;
}

/* ==========================================================================
   03. Page layout & scrolling
   Only the directory scrolls on normal screens; the header and footer stay visible.
   ========================================================================== */

.mains-page {
	position: relative;
	z-index: 0;
	width: min(1160px, calc(100% - 40px));
	margin: 30px auto;
	padding: 30px;
	border-radius: 11px;
	background: #111318;
	box-shadow: 0 0 50px #000;
	display: flex;
	flex-direction: column;
	height: calc(100dvh - 60px);
	min-height: 0;
	overflow: hidden;
}

.mains-page > :not(.mains-list) {
	flex-shrink: 0;
}

.mains-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #42474e transparent;
	padding-right: 4px;
}

.mains-page > .mains-list-frame {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.mains-list-frame > .mains-list {
	flex: 1 1 auto;
	min-height: 0;
}

.mains-list-frame::after {
	content: "";
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 0;
	right: 0;
	height: 68px;
	background: linear-gradient(to bottom, transparent, #111318);
	pointer-events: none;
}

/* ==========================================================================
   04. Header & branding
   Logo, main header and navigation actions.
   ========================================================================== */

.mains-header {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 20px;
	min-height: 154px;
	margin: 0 0 24px;
	padding: 30px 28px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 11px;
	background-color: #111318;
	background-image: url("/assets/img/branding/banner.jpg");
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.mains-brand {
	display: flex;
	align-items: center;
	gap: 15px;
	min-width: 0;
	justify-self: start;
}

.mains-brand-logo {
	height: 90px;
	object-fit: contain;
	flex: 0 0 auto;
	filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.75));
}

.mains-brand-copy {
	min-width: 0;
	display: none;
}

.header-account {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
	justify-self: end;
}

.directory-tools-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #2b2d31;
	border-radius: 50%;
	background: #1e1f22;
	color: #b5bac1;
	cursor: pointer;
	box-shadow: 0 0 20px #2b2d31;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.directory-tools-toggle svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.directory-tools-toggle:hover {
	border-color: #00cc6c;
	background: #00cc6c;
	color: #111214;
}

.directory-tools-toggle.is-open,
.directory-tools-toggle.has-active-filters {
	border-color: #00ff87;
	background: #00ff87;
	color: #111214;
}

.mains-header h1 {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 55px;
	font-style: italic;
	font-weight: 800;
	line-height: 0.75;
	text-transform: uppercase;
}

.mains-header p {
	margin: 0;
	font-size: 20px;
	line-height: 1;
	margin-left: -2px;
}

.login-button,
.join-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid #4752c4;
	border-radius: 4px;
	background: #5865f2;
	color: #fff;
	box-shadow: 0 0 20px #5865f2;
	font-family: var(--font-button);
	font-style: italic;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.login-button:hover,
.join-button:hover {
	background: #4752c4;
}

/* ==========================================================================
   05. Authentication
   Sign-in notices and session-related notifications.
   ========================================================================== */

.auth-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	margin-bottom: 20px;
	padding: 12px 14px;
	border: 1px solid #3f4147;
	border-radius: 8px;
	background: #1e1f22;
	color: #dbdee1;
}

.auth-notice-content {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.auth-notice-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 4px;
	background: #5865f2;
	color: #fff;
	font-family: var(--font-button);
	font-style: italic;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.auth-notice-action:hover {
	background: #4752c4;
}

.auth-notice-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #949ba4;
	font: inherit;
	font-family: Arial, sans-serif;
	font-size: 25px;
	font-style: normal;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.auth-notice-close:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.auth-notice .discord-role-color {
	white-space: nowrap;
}

/* ==========================================================================
   06. Directory tools & sorting
   Search, filters, column headings and the empty state.
   ========================================================================== */

.directory-tools {
	margin-top: -6px;
	margin-bottom: 18px;
	padding: 14px;
	border: 1px solid #2b2d31;
	border-radius: 8px;
	background: #181a1e;
}

.directory-search {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}

.directory-search > svg {
	position: absolute;
	left: 14px;
	width: 19px;
	height: 19px;
	fill: none;
	stroke: #72767d;
	stroke-width: 2;
	stroke-linecap: round;
	pointer-events: none;
	transition: stroke 0.15s ease;
}

.directory-search:focus-within > svg {
	stroke: #00ff87;
}

.directory-search input {
	width: 100%;
	height: 46px;
	padding: 0 14px 0 44px;
	border: 1px solid #3f4147;
	border-radius: 5px;
	outline: none;
	background: #111214;
	color: #f2f3f5;
	font-family: var(--font-body);
	font-size: 17px;
	font-weight: 500;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.directory-search input:hover {
	border-color: #55585f;
}

.directory-search input:focus,
.directory-search input:focus:hover {
	border-color: #00ff87;
}

.directory-search input::placeholder {
	color: #72767d;
}

.directory-filter-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.directory-filter-toggle,
.directory-filter-select select,
#directory-reset {
	height: 38px;
	border: 1px solid #35373c;
	border-radius: 5px;
	background-color: #222428;
	color: #b5bac1;
	font-family: var(--font-heading);
	font-size: 15px;
	font-style: italic;
	font-weight: 700;
	text-transform: uppercase;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.directory-filter-toggle,
#directory-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 12px;
	cursor: pointer;
}

.directory-filter-toggle:hover,
.directory-filter-select select:hover,
#directory-reset:hover {
	border-color: #55585f;
	background-color: #2b2d31;
	color: #f2f3f5;
}

.directory-filter-toggle svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.directory-filter-toggle.is-active {
	border-color: #00ff87;
	background: rgba(0, 255, 135, 0.12);
	color: #00ff87;
}

.directory-filter-select {
	position: relative;
	display: inline-flex;
}

.directory-filter-select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 11px;
	width: 7px;
	height: 7px;
	border-right: 1.8px solid currentColor;
	border-bottom: 1.8px solid currentColor;
	color: #949ba4;
	transform: translateY(-68%) rotate(45deg);
	pointer-events: none;
}

.directory-filter-select select {
	min-width: 128px;
	height: 38px;
	min-height: 38px;
	padding: 0 34px 0 12px;
	background-image: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.directory-filter-select select:focus,
.directory-filter-select select:focus:hover {
	border-color: #00ff87;
}

.directory-weapon-filter {
	position: relative;
	display: inline-flex;
	height: 38px;
}

.directory-weapon-filter-button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 156px;
	height: 38px;
	padding: 0 10px 0 12px;
	border: 1px solid #35373c;
	border-radius: 5px;
	background: #222428;
	color: #b5bac1;
	font-family: var(--font-heading);
	font-size: 15px;
	font-style: italic;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.directory-weapon-filter-button:hover,
.directory-weapon-filter.is-open .directory-weapon-filter-button {
	border-color: #55585f;
	background: #2b2d31;
	color: #f2f3f5;
}

.directory-weapon-filter.is-open .directory-weapon-filter-button,
.directory-weapon-filter.is-active .directory-weapon-filter-button {
	border-color: #00ff87;
}

.directory-weapon-filter-value {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.directory-weapon-filter-value img {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex: 0 0 auto;
}

.directory-weapon-filter-value span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.directory-weapon-filter-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	color: #949ba4;
	flex: 0 0 auto;
}

.directory-weapon-filter-arrow svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.15s ease;
}

.directory-weapon-filter.is-open .directory-weapon-filter-arrow svg {
	transform: rotate(180deg);
}

.directory-weapon-filter-menu {
	position: absolute;
	z-index: 800;
	top: calc(100% + 6px);
	left: 0;
	width: 250px;
	max-height: 350px;
	overflow-y: auto;
	padding: 6px;
	border: 1px solid #3f4147;
	border-radius: 7px;
	background: #111214;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.directory-weapon-filter-group + .directory-weapon-filter-group {
	margin-top: 5px;
}

.directory-weapon-filter-group-title {
	padding: 7px 9px 4px;
	color: #72767d;
	font-family: var(--font-heading);
	font-size: 13px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.directory-weapon-filter-option {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	min-height: 38px;
	padding: 6px 9px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #dbdee1;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.directory-weapon-filter-option:hover,
.directory-weapon-filter-option.is-selected {
	background: #24262a;
	color: #fff;
}

.directory-weapon-filter-option.is-selected {
	box-shadow: inset 2px 0 0 #00ff87;
}

.directory-weapon-filter-option img {
	width: 24px;
	height: 24px;
	object-fit: contain;
	flex: 0 0 auto;
}

.directory-filter-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	min-height: 38px;
}

#directory-result-count {
	color: #72767d;
	font-family: var(--font-heading);
	font-size: 15px;
	font-style: italic;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
}

#directory-reset {
	padding: 0 10px;
	background: transparent;
}

.directory-columns {
	display: grid;
	--primary-weapon-width: 200px;
	--row-column-gap: 16px;
	grid-template-columns: 135px minmax(145px, 225px) minmax(0, 1fr) var(--primary-weapon-width) 72px;
	align-items: center;
	gap: var(--row-column-gap);
	padding: 0 18px 8px;
}

.directory-columns .directory-sort[data-sort="weapon"] {
	grid-column: 4;
}

.directory-columns > span:last-child {
	grid-column: 5;
}

.directory-sort {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 5px;
	width: max-content;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: #72767d;
	font-family: var(--font-heading);
	font-size: 14px;
	font-style: italic;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.15s ease;
}

.directory-sort:hover {
	color: #dbdee1;
}

.directory-sort.is-active {
	color: #00ff87;
}

.directory-sort svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.directory-sort:hover svg {
	opacity: 0.4;
}

.directory-sort.is-active svg {
	opacity: 1;
}

.directory-sort.is-active[data-direction="asc"] svg {
	transform: rotate(180deg);
}

.directory-empty {
	padding: 44px 20px;
	border: 1px dashed #35373c;
	border-radius: 8px;
	color: #72767d;
	text-align: center;
}

.directory-empty > strong,
.directory-empty > span {
	display: block;
}

.directory-empty > strong {
	margin-bottom: 4px;
	color: #dbdee1;
	font-family: var(--font-heading);
	font-size: 22px;
	font-style: italic;
	font-weight: 800;
	text-transform: uppercase;
}

.directory-filter-select.is-active select {
	border-color: rgba(0, 255, 135, 0.65);
	background-color: rgba(0, 255, 135, 0.08);
	color: #f2f3f5;
}

.directory-filter-select.is-active::after {
	color: #00ff87;
}

.directory-empty span + span {
	margin-top: 8px;
}

.directory-empty a,
.directory-empty-reset {
	color: #00ff87;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.directory-empty-reset {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}

.directory-empty .channel-name {
	display: inline;
	margin: 0;
}

/* ==========================================================================
   07. Creator entries
   Entry rows, rank, creator name, verification and recognition badges.
   ========================================================================== */

.main-entry {
	overflow: hidden;
	margin-bottom: 8px;
	border-radius: 8px;
	background: #1e1f22;
}

.main-entry.verified {
	box-shadow: inset 3px 0 0 #00ff87, inset 0 0 0 1px rgba(0, 255, 135, 0.16);
	background: linear-gradient(90deg, rgba(0, 255, 135, 0.055), #1e1f22 24%);
}

.main-row {
	display: grid;
	--primary-weapon-width: 200px;
	--row-column-gap: 16px;
	grid-template-columns: 135px minmax(145px, 225px) minmax(0, 1fr) var(--primary-weapon-width) 72px;
	align-items: center;
	gap: var(--row-column-gap);
	min-height: 64px;
	padding: 0 18px;
	cursor: pointer;
	user-select: none;
	transition: background 0.15s ease;
}

.main-row > .main-weapon {
	grid-column: 3 / 5;
}

.main-row > .main-controls {
	grid-column: 5;
}

.main-row:hover,
.main-entry.is-open .main-row {
	background: rgba(255, 255, 255, 0.025);
}

.main-row:focus-visible {
	outline: 2px solid #00ff87;
	outline-offset: -2px;
}

.main-rank {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: #f2f3f5;
}

.main-rank-score {
	font-family: var(--font-heading);
	font-size: 23px;
	font-style: italic;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.main-name,
.main-name-display {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.main-name-display {
	width: 100%;
}

.main-name strong,
.main-weapon span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.main-name strong,
.field-value,
.profile-links a,
.discord-role-color,
.discord-role-badge {
	font-weight: 700;
}

.verified-mark {
	color: #00ff87;
	font-weight: 700;
}

.main-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: 72px;
	min-width: 72px;
}

.main-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #35373c;
	border-radius: 50%;
	background: #17181b;
	color: #b5bac1;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.main-toggle svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transform: rotate(0deg);
	transform-origin: 50% 50%;
	transition: transform 0.18s ease;
}

.main-entry.is-open .main-toggle {
	border-color: #4a4d54;
	background: #222428;
	color: #f2f3f5;
}

.main-entry.is-open .main-toggle svg {
	transform: rotate(180deg);
}

.main-name .discord-role-color {
	display: inline-block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.honorable-badge {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	max-width: 100%;
	padding: 3px 8px;
	border: 1px solid rgba(225, 176, 93, 0.45);
	border-radius: 4px;
	background: rgba(225, 176, 93, 0.11);
	color: #e8c58c;
	font-family: var(--font-heading);
	font-size: 11px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ==========================================================================
   08. Weapon display
   Primary weapon aligns below Weapon; secondary weapons sit to its left.
   ========================================================================== */

.main-weapon,
.main-weapon-display {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.main-weapon {
	color: #b5bac1;
	width: 100%;
}

.main-weapon img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	flex: 0 0 auto;
}

.main-weapon-display {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--primary-weapon-width);
	align-items: center;
	column-gap: var(--row-column-gap);
	width: 100%;
	white-space: nowrap;
}

.main-weapon-extras {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.main-weapon-item {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 7px;
	flex: 0 0 auto;
	min-width: 0;
	white-space: nowrap;
}

.main-weapon-primary {
	justify-self: start;
}

.main-weapon-item img,
.main-weapon .main-weapon-item img {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.main-weapon-item span {
	white-space: nowrap;
}

/* ==========================================================================
   09. Expanded creator details
   Details grid, bio, links and creator information.
   ========================================================================== */

.main-details {
	padding: 22px;
	border-top: 1px solid #2b2d31;
}

.main-details-content,
.main-details-form {
	margin: 0;
}

.details-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 24px;
}

.detail-item {
	min-width: 0;
}

.detail-label {
	display: block;
	margin-bottom: 7px;
	color: #949ba4;
	font-family: var(--font-heading);
	font-size: 16px;
	font-style: italic;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.details-grid .field-value {
	font-size: 21px;
	min-height: 48px;
}

.field-value {
	min-height: 40px;
	display: flex;
	align-items: center;
	color: #f2f3f5;
	font-weight: 600;
	line-height: 1.4;
}

.field-value-text {
	display: block;
	min-height: 0;
	color: #dbdee1;
	font-weight: 400;
	line-height: 1.6;
}

.detail-section {
	margin-top: 24px;
}

.profile-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.profile-links a {
	color: #00ff87;
	font-weight: 600;
	text-decoration: none;
}

.profile-links a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   10. Discord roles
   Discord-specific gradients and badges.
   ========================================================================== */

.discord-role-color {
	font-weight: 700;
}

.discord-role-color.is-solid {
	color: var(--role-color);
}

.discord-role-color.is-gradient {
	background-image: var(--role-gradient);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.discord-role-list {
	flex-wrap: wrap;
	gap: 8px;
}

.discord-role-badge {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 9px;
	border: 1px solid #3f4147;
	border-radius: 999px;
	background: #2b2d31;
	color: #dbdee1;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.discord-role-badge.is-solid {
	border-color: color-mix(in srgb, var(--role-color) 60%, #3f4147);
	background: color-mix(in srgb, var(--role-color) 18%, #1e1f22);
	color: var(--role-color);
}

.discord-role-badge.is-gradient {
	border-color: transparent;
	background: linear-gradient(#1e1f22, #1e1f22) padding-box, var(--role-gradient) border-box;
	-webkit-text-fill-color: initial;
	color: #f2f3f5;
}

/* ==========================================================================
   11. Ranked league
   League emblem and associated rank treatments.
   ========================================================================== */

.rank-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.rank-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.rank-icon-list {
	width: 36px;
	height: 36px;
}

.rank-icon-detail {
	width: 48px;
	height: 48px;
}

.rank-detail-value {
	min-height: 48px;
	gap: 10px;
}

.rank-detail-name {
	font-family: var(--font-heading);
	font-size: 21px;
	font-style: italic;
	font-weight: 800;
	line-height: 1;
}

.rank-empty {
	color: #949ba4;
}

/* ==========================================================================
   12. Footer
   Site links, invite CTA and copyright information.
   ========================================================================== */

.site-footer {
	border-top: 1px solid #2b2d31;
	color: #949ba4;
	margin-top: 12px;
	padding-top: 12px;
}

.site-footer-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-footer-brand {
	display: flex;
	align-items: center;
	gap: 11px;
}

.site-footer-brand img {
	height: 33px;
	object-fit: contain;
}

.site-footer-brand > div {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
}

.site-footer-brand strong {
	color: #f2f3f5;
	font-family: var(--font-heading);
	font-size: 20px;
	font-style: italic;
	font-weight: 800;
	text-transform: uppercase;
}

.site-footer-brand span {
	margin-top: 3px;
	margin-left: -2px;
	font-size: 14px;
}

.site-footer-links {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.site-footer-links a {
	color: #b5bac1;
	font-family: var(--font-heading);
	font-size: 16px;
	font-style: italic;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.site-footer-legal {
	display: flex;
	align-items: flex-end;
	gap: 4px 18px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	flex-wrap: wrap;
	font-size: 13px;
	line-height: 1.35;
}

.site-footer-legal p {
	margin: 0;
}

.site-footer-legal span {
	margin-left: auto;
	white-space: nowrap;
}

.site-footer-invite {
	flex: 1 1 240px;
	max-width: 370px;
	margin: 0;
	color: #aeb5bf;
	font-size: 14px;
	line-height: 1.4;
}

.site-footer-invite strong,
.directory-empty .channel-name {
	color: #00ff87;
	font: inherit;
	font-weight: 700;
	text-transform: none;
}

/* ==========================================================================
   Responsive overrides
   All breakpoints are collected here. Narrower max-width rules follow wider ones.
   The max-height rule is last so short-window accessibility takes precedence.
   ========================================================================== */

/* Responsive adjustments at (max-width: 1000px). */
@media (max-width: 1000px) {
	.main-row {
		--primary-weapon-width: 190px;
	}

	.main-weapon .main-weapon-item > span {
		display: none;
	}
}

/* Responsive adjustments at (max-width: 800px). */
@media (max-width: 800px) {
	.main-row {
		--primary-weapon-width: 30px;
		grid-template-columns: 98px minmax(145px, 225px) minmax(0, 1fr) var(--primary-weapon-width) 72px;
	}

	.auth-notice {
		width: min(100% - 24px, 1100px);
		margin: 12px auto -18px;
	}

	.mains-header {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 14px;
		min-height: 164px;
		margin: 0 0 24px;
		padding: 24px 20px;
	}

	.mains-brand {
		grid-column: 1;
		grid-row: 1;
	}

	.mains-brand-logo {
		position: absolute;
		top: 24px;
		left: 20px;
		height: calc(100% - 48px);
	}

	.directory-tools-toggle {
		grid-column: 2;
		grid-row: 1;
	}

	.header-account {
		grid-column: 1 / -1;
		grid-row: 2;
		width: 100%;
	}

	.directory-columns {
		--primary-weapon-width: 55px;
		--row-column-gap: 10px;
		grid-template-columns: 105px minmax(95px, 150px) minmax(72px, 1fr) var(--primary-weapon-width) 60px;
		gap: var(--row-column-gap);
	}

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

	.directory-filter-meta {
		width: 100%;
		margin-left: 0;
		justify-content: space-between;
	}

	.site-footer-legal span {
		margin-top: 6px;
		margin-left: 0;
	}

	.mains-page {
		width: min(100% - 24px, 1160px);
		margin: 0 auto;
		padding: 42px 20px 20px;
		border-radius: 0;
		height: calc(100dvh - 60px);
		min-height: 0;
	}

	.site-footer-main {
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 10px 18px;
	}

	.site-footer-invite {
		max-width: none;
	}

	.site-footer-legal {
		align-items: flex-start;
		flex-direction: column;
		gap: 2px;
		margin-top: 10px;
		padding-top: 8px;
	}

	.main-name-display {
		gap: 1px;
		flex-wrap: wrap;
	}

	.main-name strong {
		margin-right: 5px;
	}
}

/* Responsive adjustments at (max-width: 640px). */
@media (max-width: 640px) {
	.auth-notice-content {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

	.directory-tools {
		padding: 10px;
	}

	.directory-filter-select,
	.directory-weapon-filter {
		flex: 1 1 calc(50% - 4px);
	}

	.directory-filter-select select,
	.directory-weapon-filter-button {
		width: 100%;
		min-width: 0;
	}

	.directory-filter-toggle {
		flex: 1 1 100%;
	}

	.directory-weapon-filter-menu {
		width: min(290px, calc(100vw - 44px));
	}
}

/* Responsive adjustments at (max-width: 600px). */
@media (max-width: 600px) {
	.mains-brand-logo {
		height: 55px;
	}

	.main-rank-score {
		display: none;
	}

	.main-row {
		--row-column-gap: 4px;
		grid-template-columns: 38px minmax(62px, 1fr) minmax(64px, 1fr) var(--primary-weapon-width) 72px;
		gap: var(--row-column-gap);
		padding: 0 10px;
	}

	.directory-columns {
		--primary-weapon-width: 55px;
		--row-column-gap: 4px;
		grid-template-columns: 38px minmax(62px, 1fr) minmax(64px, 1fr) var(--primary-weapon-width) 65px;
		gap: var(--row-column-gap);
		padding: 0 10px 8px;
	}

	.honorable-badge {
		font-size: 10px;
		padding: 3px 5px;
	}

	.main-weapon-display {
		--primary-weapon-width: 42px;
	}

	.main-weapon-extras {
		gap: 8px;
	}
}

/* Responsive adjustments at (max-width: 500px). */
@media (max-width: 500px) {
	.mains-header {
		min-height: 180px;
		margin: 0 0 20px;
		padding: 20px 16px;
		background-position: 38% center;
	}

	.mains-brand {
		gap: 10px;
	}

	.mains-header h1 {
		font-size: 38px;
	}

	.main-details {
		padding: 18px 14px;
	}

	.details-grid {
		grid-template-columns: 1fr 1fr;
		gap: 18px 12px;
	}

	.main-controls {
		gap: 2px;
	}

	.directory-sort[data-sort="rs"] {
		font-size: 11px;
	}

	.directory-sort {
		font-size: 13px;
	}

	.mains-page {
		width: min(100% - 14px, 1160px);
		margin: 0 auto;
		padding: 26px 12px 12px;
		border-radius: 0;
		height: 100dvh;
		min-height: 0;
	}

	.site-footer {
		margin-top: 10px;
	}

	.site-footer-main {
		gap: 7px 12px;
	}

	.site-footer-invite {
		font-size: 12px;
		line-height: 1.25;
	}

	.site-footer-legal {
		font-size: 11px;
	}

	.mains-list-frame::after {
		height: 48px;
	}

	.main-weapon-primary.main-weapon-item > span {
		display: none;
	}

	.main-weapon-extras {
		gap: 5px;
	}
}

/* Responsive adjustments at (max-width: 370px). */
@media (max-width: 370px) {
	.main-weapon-extras {
		gap: 0;
	}
}

/* Short viewports: allow page-level scrolling. */
@media (max-height: 560px) {
	body {
		overflow-y: auto;
	}

	.mains-page {
		height: auto;
		min-height: 100dvh;
		overflow: visible;
	}

	.mains-list {
		flex: none;
		height: min(45dvh, 360px);
		min-height: 140px;
	}

	.mains-page > .mains-list-frame {
		flex: none;
		height: min(45dvh, 360px);
		min-height: 140px;
	}

	.mains-list-frame > .mains-list {
		flex: 1 1 auto;
		height: auto;
		min-height: 0;
	}
}
