.member-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: #101010;
	border-bottom: 1px solid #333;
}
.member-header-inner, .member-nav, .member-hero, .member-balance {
	display: flex;
	align-items: center;
}
.member-header-inner {
	min-height: 76px;
	gap: clamp(16px, 4vw, 52px);
}
.member-header .wordmark {
	flex-shrink: 0;
}
.member-nav {
	gap: clamp(12px, 3vw, 38px);
	font-size: .85rem;
	font-weight: 800;
	text-transform: uppercase;
}
.member-nav [aria-current] {
	color: var(--gold);
}
.member-menu {
	position: relative;
}
.member-menu summary {
	list-style: none;
	cursor: pointer;
}
.member-menu summary::-webkit-details-marker {
	display: none;
}
.member-nav summary::after {
	content: ' ▾';
	color: var(--gold);
}
.member-account-menu {
	margin-left: auto;
}
.member-identity {
	display: grid;
	position: relative;
	place-items: center;
	width: 44px;
	height: 44px;
	background: var(--gold);
	border-radius: 50%;
	color: #17110b;
	font-weight: 900;
	overflow: hidden;
}
.member-identity object {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}
.member-menu-panel {
	position: absolute;
	top: calc(100% + 12px);
	min-width: 160px;
	padding: 6px;
	background: #181818;
	border: 1px solid #494949;
	box-shadow: 0 12px 24px #0009;
	white-space: nowrap;
}
.member-account-menu .member-menu-panel {
	right: 0;
}
.member-menu-panel a, .member-menu-panel button {
	display: block;
	width: 100%;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: white;
	font: inherit;
	text-align: left;
}
.member-menu-panel a:hover, .member-menu-panel button:hover {
	background: #353535;
}
.member-dashboard {
	padding-block: clamp(32px, 6vw, 75px);
}
.member-hero {
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}
.member-hero h1, .member-form-card h1 {
	font-size: clamp(40px, 7vw, 78px);
	overflow-wrap: anywhere;
}
.member-balance {
	justify-content: space-between;
	gap: 18px;
	min-width: 235px;
	padding: 17px 21px;
	background: #650717;
	border: 1px solid #a22b3c;
}
.member-balance strong {
	display: block;
	font: 32px var(--display);
}
.member-qoin {
	display: grid;
	flex: 0 0 46px;
	height: 46px;
	place-items: center;
	border: 2px solid var(--gold);
	border-radius: 50%;
	color: var(--gold);
	font: 27px var(--display);
}
.member-leaderboards, .member-card-grid {
	display: grid;
	gap: 18px;
}
.member-leaderboards {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.member-board, .member-card, .member-form-card {
	background: #171717;
	border: 1px solid #3b3935;
	border-top: 3px solid var(--gold);
}
.member-board {
	padding: clamp(14px, 2vw, 24px);
}
.member-board h2, .member-card-section h2 {
	margin-bottom: 14px;
	font-size: clamp(28px, 3vw, 42px);
}
.member-board ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
.member-board li {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 51px;
	padding: 6px 8px;
	border-top: 1px solid #343230;
}
.member-board li.member-your-score {
	background: #3a2712;
}
.member-rank {
	color: #ccc;
	font: 1.25rem var(--display);
}
.member-board li:first-child .member-rank {
	color: var(--gold);
}
.member-player {
	overflow-wrap: anywhere;
}
.member-score {
	text-align: right;
	color: var(--gold);
	font-weight: 800;
}
.member-board small {
	display: block;
	color: #c6c1ba;
	font-size: .73rem;
}
.member-card-section {
	margin-top: 38px;
}
.member-card-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
}
.member-card {
	position: relative;
	padding: 20px 34px 20px 18px;
}
.member-card:hover, .member-balance:hover {
	border-color: var(--gold);
	background-color: #382219;
}
.member-card p {
	margin-top: 8px;
	color: var(--muted);
	font-size: .9rem;
}
.member-card > span {
	position: absolute;
	top: 18px;
	right: 14px;
	color: var(--gold);
}
.member-form-wrap {
	display: grid;
	place-items: start center;
	padding-block: clamp(28px, 8vw, 90px);
}
.member-form-card {
	width: min(100%, 500px);
	padding: clamp(18px, 5vw, 42px);
}
.member-form-card form {
	display: grid;
	gap: 8px;
	margin: 25px 0 18px;
}
.member-form-card form input:not([type="hidden"]):not([type="checkbox"]) {
	width: 100%;
	margin-bottom: 6px;
	padding: 10px;
	border: 1px solid #747474;
	background: #090909;
	color: white;
	font: inherit;
}
.member-remember {
	display: flex;
	align-items: center;
	gap: 9px;
	justify-self: start;
	margin-block: 2px 10px;
	cursor: pointer;
}
.member-form-card .button {
	justify-self: start;
	border: 0;
}
.member-form-card > p:not(.eyebrow) {
	margin-top: 15px;
}
.member-form-card a {
	color: var(--gold);
	text-decoration: none;
}
.member-message {
	padding: 11px;
	background: #302719;
}
.member-error {
	background: #611a23;
}
.member-form-card dd {
	margin: 0 0 14px;
	overflow-wrap: anywhere;
}
.member-form-card dt {
	color: var(--muted);
	font-size: .87rem;
}
@media (max-width: 680px) {
	.member-header-inner {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 12px;
		padding-block: 12px;
	}
	.member-nav {
		grid-row: 2;
		grid-column: 1 / -1;
		flex-wrap: wrap;
	}
	.member-header-inner:has(.member-nav) .member-account-menu {
		grid-column: 2;
		grid-row: 1;
	}
	.member-hero {
		align-items: stretch;
		flex-direction: column;
	}
	.member-leaderboards {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 360px) {
	.member-nav > .member-menu:last-child .member-menu-panel {
		right: 0;
	}
}

/* Authentication controls: keep the visibility toggle inside the password field. */
.member-password-field {
	position: relative;
	min-width: 0;
	margin-bottom: 6px;
}
.member-form-card .member-password-field input {
	margin-bottom: 0;
	padding-right: 78px;
}
.member-password-toggle {
	position: absolute;
	top: 1px;
	right: 1px;
	bottom: 1px;
	min-width: 70px;
	padding: 0 12px;
	border: 0;
	background: #090909;
	color: var(--gold);
	font: inherit;
	font-size: .75rem;
	font-weight: 800;
	cursor: pointer;
}
.member-password-toggle:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: -4px;
}
.member-form-card .member-submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.member-submit:disabled {
	opacity: .7;
	cursor: wait;
}
.member-submit-spinner {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	border: 2px solid #ffffff66;
	border-top-color: #fff;
	border-radius: 50%;
	animation: member-signin-spin .7s linear infinite;
}
.member-submit-spinner[hidden], .member-password-toggle[hidden] {
	display: none;
}
.member-form-status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
@keyframes member-signin-spin {
	to {
		transform: rotate(360deg);
	}
}
@media (prefers-reduced-motion: reduce) {
	.member-submit-spinner {
		animation: none;
	}
}

/* Separate dashboard leaderboards from the cards above them. */
.member-dashboard .member-leaderboards {
	margin-top: 38px;
}

/* Keep account form links consistent with content links. */
.member-form-card a:is(:hover, :focus-visible) {
	color: #e90035;
}
