.leaderboard-page {
	padding: 96px 20px 64px;
	background: #f4f4f4;
	min-height: calc(100vh - 120px);
}

.lb-card {
	max-width: 1180px;
	margin: 0 auto;
	padding: 28px 28px 18px;
	border: 1px solid #ebebeb;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.lb-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20px;
	margin-bottom: 24px;
}

.lb-header__left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.lb-header__icon {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
}

.lb-header__icon img {
	width: 100%;
	height: auto;
	display: block;
}

.lb-header h1 {
	margin: 0;
	font-size: 34px;
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #111;
}

.lb-header p {
	margin: 6px 0 0;
	font-size: 15px;
	color: #777;
}

.lb-season {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin-left: 5%;
	min-width: 0;
	padding: 7px 0 0;
	border-radius: 16px;
	background: #f3f3f3;
	line-height: 1.25;
	overflow: hidden;
	border: 1px solid #e1e1e1;
}

.lb-season__title{
	font-size: 18px;
}
.lb-season__start {
	width: 100%;
	font-size: 14px;
	text-align: center;
}

.lb-season__remaining {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	padding: 7px 15px;
	color: #222;
	font-size: 15px;
	background: #e1e1e1;
}

.lb-season__icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: #444;
}

.lb-season__remaining strong {
	font-weight: 600;
}

.lb-table-shell {
	position: relative;
}

.lb-table-shell::before,
.lb-table-shell::after {
	content: "";
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	width: 26px;
	pointer-events: none;
	z-index: 4;
}

.lb-table-shell::before {
	left: 0;
	background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.lb-table-shell::after {
	right: 0;
	background: linear-gradient(270deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.lb-table-wrap {
	overflow-x: hidden;
}

.lb-details {
	display: contents;
}

.lb-table {
	width: 100%;
	min-width: 0;
}

.lb-row {
	display: grid;
	grid-template-columns: 100px minmax(0, 1.7fr) 110px repeat(3, minmax(0, 1fr));
	align-items: center;
	padding: 16px 22px;
	border-bottom: 1px solid #efefef;
	position: relative;
}

.lb-row--head {
	padding: 12px 22px;
	border: 0;
	border-radius: 10px;
	background: #efefef;
	margin-bottom: 10px;
}

.lb-row--head .lb-col {
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	color: #222;
}

.lb-col {
	text-align: center;
}

.lb-col--rank,
.lb-col--prize,
.lb-col--avatar,
.lb-col--since,
.lb-col--points {
	justify-self: center;
}

/* Only the top five win something, so the cell stays empty further down the
   table and must not collapse the row height. */
.lb-col--prize {
	min-height: 1px;
}

.lb-prize {
	display: block;
	width: auto;
	height: 64px;
	max-width: 100px;
	object-fit: contain;
}

.lb-col--rank {
	position: sticky;
	left: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: stretch;
	align-self: stretch;
	margin: -16px 0;
	padding: 16px 6px;
	background: #fff;
	border-top-left-radius: inherit;
	border-bottom-left-radius: inherit;
}

.lb-row--head .lb-col--rank {
	margin: -12px 0;
	padding: 12px 6px;
	background: #efefef;
}

.lb-col--user {
	justify-self: stretch;
	min-width: 0;
	overflow: hidden;
	text-align: left;
}

.lb-row--gold,
.lb-row--silver,
.lb-row--bronze {
	margin: 8px 0;
	border: 1px solid #ededed;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	border-bottom: 1px solid #ededed;
}

.lb-row--gold { box-shadow: inset 5px 0 0 #d4af37, 0 8px 24px rgba(212, 175, 55, 0.08); }
.lb-row--silver { box-shadow: inset 5px 0 0 #9aa0a6, 0 8px 24px rgba(154, 160, 166, 0.08); }
.lb-row--bronze { box-shadow: inset 5px 0 0 #cd7f32, 0 8px 24px rgba(205, 127, 50, 0.08); }

.lb-row--gold::after,
.lb-row--silver::after,
.lb-row--bronze::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 120px;
	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;
	pointer-events: none;
}

.lb-row--gold::after { background: linear-gradient(90deg, rgba(255,255,255,0), rgba(212,175,55,0.12)); }
.lb-row--silver::after { background: linear-gradient(90deg, rgba(255,255,255,0), rgba(154,160,166,0.14)); }
.lb-row--bronze::after { background: linear-gradient(90deg, rgba(255,255,255,0), rgba(205,127,50,0.12)); }

.lb-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin: 0 auto;
}

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

.lb-rank-num {
	display: inline-block;
	font-size: 18px;
	font-weight: 700;
	color: #111;
	line-height: 1;
}

.lb-username {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	font-size: 18px;
	font-weight: 700;
	color: #111;
}

.lb-username__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lb-row--gold .lb-username, .lb-row--silver .lb-username, .lb-row--bronze .lb-username{
	font-size: 24px;
}

.lb-verified {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	display: inline-flex;
}

.lb-verified svg {
	width: 100%;
	height: 100%;
}

.lb-verified--gold { color: #d4af37; }
.lb-verified--silver { color: #9aa0a6; }
.lb-verified--bronze { color: #cd7f32; }

.lb-avatar {
	display: inline-flex;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	background: #ddd;
}

.lb-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lb-avatar--gold,
.lb-avatar--silver,
.lb-avatar--bronze {
	width: 68px;
	height: 68px;
	padding: 1px;
	background: #fff;
	box-sizing: border-box;
}

.lb-avatar--gold { box-shadow: 0 0 0 3px #d4af37, 0 0 28px rgba(212, 175, 55, 0.85); }
.lb-avatar--silver { box-shadow: 0 0 0 3px #9aa0a6, 0 0 28px rgba(154, 160, 166, 0.85); }
.lb-avatar--bronze { box-shadow: 0 0 0 3px #cd7f32, 0 0 28px rgba(205, 127, 50, 0.85); }

.lb-avatar--gold img,
.lb-avatar--silver img,
.lb-avatar--bronze img {
	border-radius: 50%;
}

.lb-col--since {
	font-size: 16px;
	color: #444;
	white-space: nowrap;
}

.lb-since__date,
.lb-since__time {
	display: block;
	line-height: 1.25;
}

.lb-since__time {
	margin-top: 2px;
	font-weight: 700;
	color: #111;
}
.lb-row--gold .lb-col--since, .lb-row--silver .lb-col--since, .lb-row--bronze .lb-col--since{
	font-size: 18px;
}
.lb-points-value {
	display: block;
	font-size: 42px;
	font-weight: 700;
	line-height: 1;
	color: #111;
}

.lb-row--standard .lb-points-value {
	font-size: 22px;
}

.lb-row.lb-row--standard{
	border-left: 1px solid #ededed;
	border-right: 1px solid #ededed;
}
.lb-row:not(.lb-row--standard) + .lb-row.lb-row--standard{
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	border-top: 1px solid #ededed;
	margin-top: 20px;
}

.lb-row.lb-row--standard:last-child{
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
}
@media (max-width: 860px) {
	.leaderboard-page {
		padding: 88px 14px 48px;
	}

	.lb-card {
		padding: 20px 14px 12px;
		border-radius: 22px;
	}

	.lb-header {
		flex-direction: column;
	}

	.lb-header h1 {
		font-size: 28px;
	}

	.lb-season {
		width: 100%;
		align-self: flex-end;
		margin-left: 0;
		text-align: center;
	}
	.lb-season__remaining{width: 100%;text-align: center;justify-content: center;}

	.lb-table-shell::before,
	.lb-table-shell::after {
		display: none;
	}

	.lb-table-wrap {
		overflow-x: visible;
	}

	.lb-table {
		min-width: 0;
	}

	.lb-row--head {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.lb-row:not(.lb-row--head) {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		grid-template-areas:
			"rank user points"
			"details details details";
		column-gap: 8px;
		row-gap: 10px;
		align-items: center;
		padding: 12px;
	}

	.lb-col--rank {
		grid-area: rank;
		position: static;
		margin: 0;
		padding: 0;
		background: transparent;
		align-self: center;
	}

	.lb-col--user {
		grid-area: user;
	}

	.lb-col--points {
		grid-area: points;
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		text-align: right;
	}

	.lb-details {
		display: grid;
		grid-area: details;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px 10px;
		align-items: stretch;
		padding-top: 10px;
		border-top: 1px solid #efefef;
	}

	.lb-details .lb-col {
		display: grid;
		grid-template-rows: auto 52px;
		justify-self: stretch;
		justify-items: center;
		align-items: center;
		min-width: 0;
		text-align: center;
	}

	.lb-col--prize:not(:has(> img))::after {
		content: "—";
		color: #9ca3af;
		font-size: 18px;
		font-weight: 600;
		line-height: 1;
	}

	.lb-details .lb-col::before {
		content: attr(data-label);
		display: block;
		font-size: 10px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		line-height: 1.2;
		color: #6b7280;
		white-space: normal;
	}

	.lb-details .lb-col--since {
		font-size: 13px;
		font-weight: 600;
		color: #111;
		white-space: nowrap;
		line-height: 1.2;
	}

	.lb-details .lb-avatar,
	.lb-details .lb-avatar--gold,
	.lb-details .lb-avatar--silver,
	.lb-details .lb-avatar--bronze {
		width: 48px;
		height: 48px;
	}

	.lb-details .lb-prize {
		width: auto;
		height: 48px;
		max-width: 100%;
		object-fit: contain;
	}

	.lb-username,
	.lb-row--gold .lb-username,
	.lb-row--silver .lb-username,
	.lb-row--bronze .lb-username {
		font-size: 16px;
		white-space: nowrap;
	}

	.lb-points-value,
	.lb-row--gold .lb-points-value,
	.lb-row--silver .lb-points-value,
	.lb-row--bronze .lb-points-value {
		font-size: 22px;
	}

	.lb-badge,
	.lb-avatar--gold,
	.lb-avatar--silver,
	.lb-avatar--bronze {
		width: 52px;
		height: 52px;
	}

	.lb-prize {
		height: 52px;
		max-width: 80px;
	}
}

/* Vertical so the sticky rank cell and the rest of the row stay in step. */
.lb-row--you, .lb-row--you .lb-col--rank {
	background: #f1f1f1;
}

.lb-row--you {
	box-shadow: inset 5px 0 0 #b9b9b9;
}

.lb-you-tag {
	flex-shrink: 0;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: #111;
	color: #fff;
	padding: 2px 6px;
	border-radius: 999px;
}
.lb-you-bar {
	margin-top: 16px;
	text-align: center;
	font-size: 14px;
	color: #4b5563;
} 
/* --- "How you earn points" button + modal -------------------------------- */
.lb-points-guide__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	margin-top: 10px;
	padding: 12px 20px;
	border: 0;
	border-radius: 999px;
	background: #f1f1f1;
	color: #000;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.lb-points-guide__btn:hover {
	transform: translateY(-2px);
}

.lb-points-guide__btn svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

body.lb-modal-open {
	overflow: hidden;
}

.lb-points-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.6);
}

.lb-points-modal[hidden] {
	display: none;
}

.lb-points-modal__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 920px;
	max-height: calc(85vh - 48px);
	/* The head stays put and only the body scrolls, so the panel itself must
	   not be the scroll container. */
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	z-index: 9999;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.lb-points-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex: 0 0 auto;
	padding: 22px 26px;
	background: #fff;
	border-bottom: 1px solid #ececec;
	border-radius: 20px 20px 0 0;
}

.lb-points-modal__brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1 1 auto;
}

.lb-points-modal__icon {
	display: block;
	width: 56px;
	height: 56px;
	flex: 0 0 auto;
}

.lb-points-modal__icon img {
	display: block;
	width: 100%;
	height: auto;
}

.lb-points-modal__head h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	color: #111;
	text-align: left;
}

.lb-points-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-left: auto;
	flex: 0 0 auto;
	border: 0;
	border-radius: 50%;
	background: #f1f1f1;
	color: #333;
	cursor: pointer;
	transition: background 0.2s ease;
}

.lb-points-modal__close:hover {
	background: #e2e2e2;
}

.lb-points-modal__close svg {
	width: 16px;
	height: 16px;
}

.lb-points-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 16px 26px 26px;
	text-align: left;
}

.lb-points-modal .lb-points-modal__intro {
	margin: 0 0 22px;
	font-size: 16px;
	line-height: 1.55;
	color: #444;
	text-align: left;
}

.lb-points-section + .lb-points-section {
	margin-top: 30px;
	padding-top: 26px;
	border-top: 1px solid #ececec;
}

.lb-points-section__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	color: #111;
	text-align: left;
}

.lb-points-modal .lb-points-section__intro {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 1.55;
	color: #444;
	text-align: left;
}

.lb-points-modal .lb-points-section__note {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.55;
	color: #555;
	text-align: left;
}

.lb-points-modal .lb-points-section__total {
	margin: 10px 0 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	color: #111;
	text-align: left;
}

.lb-points-table {
	overflow-x: auto;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
}

.lb-points-table__head,
.lb-points-table__row {
	display: grid;
	grid-template-columns: minmax(220px, 1.5fr) 88px minmax(120px, 0.85fr) minmax(110px, 0.75fr);
	align-items: stretch;
	min-width: 640px;
}

.lb-points-table__head {
	background: #f6f6f6;
	font-size: 18px;
	font-weight: 700;
	color: #111;
	border-bottom: 1px solid #e4e4e4;
}

.lb-points-table__row {
	font-size: 16px;
	color: #333;
	border-bottom: 1px solid #ececec;
}

.lb-points-table__row:last-child {
	border-bottom: 0;
}

.lb-points-table__head span,
.lb-points-table__row span {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	text-align: left;
	justify-content: flex-start;
}

.lb-points-table__head span:not(:first-child),
.lb-points-table__row span:not(:first-child) {
	border-left: 1px solid #e4e4e4;
}

.lb-points-table__row span:nth-child(2) {
	font-weight: 700;
	color: #111;
	white-space: nowrap;
}

.lb-points-table--duo .lb-points-table__head,
.lb-points-table--duo .lb-points-table__row {
	grid-template-columns: minmax(0, 1fr) minmax(96px, 0.28fr);
	min-width: 0;
}

.lb-points-table--trio .lb-points-table__head,
.lb-points-table--trio .lb-points-table__row {
	grid-template-columns: minmax(0, 1fr) minmax(88px, 0.24fr) minmax(130px, 0.38fr);
	min-width: 420px;
}

.lb-points-table--duo .lb-points-table__head span:last-child,
.lb-points-table--duo .lb-points-table__row span:last-child,
.lb-points-table--trio .lb-points-table__head span:nth-child(2),
.lb-points-table--trio .lb-points-table__row span:nth-child(2) {
	justify-content: flex-end;
	text-align: right;
}

.lb-points-modal .lb-points-modal__note {
	margin: 24px 0 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.55;
	color: #111;
	text-align: left;
}
.lb-points-modal .lb-points-modal__note.nml {
	font-weight: 400;
}

@media (max-width: 860px) {
	.lb-points-guide__btn {
		width: 100%;
		margin: 0 0 12px;
		justify-content: center;
	}

	.lb-points-modal {
		padding: 14px;
	}

	.lb-points-modal__head {
		padding: 18px;
	}

	.lb-points-modal__head h2 {
		font-size: 19px;
	}

	.lb-points-modal__body {
		padding: 4px 18px 20px;
	}

	.lb-points-table__head span,
	.lb-points-table__row span {
		padding: 12px;
		font-size: 14px;
	}

	.lb-points-section__title {
		font-size: 18px;
	}

	.lb-points-modal .lb-points-modal__intro,
	.lb-points-modal .lb-points-section__intro {
		font-size: 15px;
	}

	.lb-points-table--trio .lb-points-table__head,
	.lb-points-table--trio .lb-points-table__row {
		grid-template-columns: minmax(0, 1fr) 56px minmax(84px, 0.55fr);
		min-width: 0;
	}

	.lb-points-table--trio .lb-points-table__head span,
	.lb-points-table--trio .lb-points-table__row span {
		padding: 12px 8px;
	}

	.lb-row--you .lb-col--rank {
		background: transparent;
	}
}


.lb-username__name.is-masked,
.lb-avatar.is-masked img {
	filter: blur(4px);
	user-select: none;
	pointer-events: none;
}
