* {
	box-sizing: border-box;
	letter-spacing: 0;
}

html {
	background: #07110a;
	color-scheme: dark;
}

body {
	margin: 0;
	min-width: 300px;
	background: #07110a;
	color: #f2fff5;
	font-family: "Open Sans", Arial, ui-sans-serif, system-ui, sans-serif;
	font-size: 12px;
}

.page {
	width: 100%;
	max-width: 1680px;
	margin: 0 auto;
	padding: 4px;
}

.topbar {
	padding: 1px 1px 5px;
}

h1 {
	margin: 0;
	color: #f7fff7;
	font-size: 16px;
	font-weight: 850;
	line-height: 1;
	overflow-wrap: anywhere;
}

.event-line {
	margin-top: 2px;
	color: #a8b8aa;
	font-size: 10px;
	font-weight: 650;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.teams-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	align-items: start;
}

.team-card {
	position: relative;
	min-width: 0;
	background: #0e1711;
}

.team-head {
	display: grid;
	grid-template-columns: 19px minmax(0, 1fr) minmax(54px, auto);
	align-items: center;
	gap: 3px;
	min-width: 0;
	min-height: 42px;
	padding: 4px;
	background: #082313;
}

.rank {
	color: #e2f3e5;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	text-align: center;
}

.team-copy {
	min-width: 0;
}

.team-copy h2 {
	margin: 0;
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 850;
	line-height: 1.05;
	overflow-wrap: anywhere;
}

.team-copy p {
	margin: 2px 0 0;
	color: #a9b8ac;
	font-size: 9px;
	font-weight: 750;
	line-height: 1.05;
	overflow-wrap: anywhere;
}

.team-meta {
	display: grid;
	justify-items: end;
	align-content: center;
	min-width: 0;
}

.chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 13px;
	padding: 1px 4px;
	background: #f7d94b;
	color: #161306;
	font-size: 8px;
	font-weight: 900;
	line-height: 1;
}

.chip-float {
	position: absolute;
	top: 3px;
	right: 5px;
	z-index: 5;
}

.points-stack {
	color: #9fac9f;
	font-size: 8px;
	font-weight: 900;
	line-height: 1.05;
	text-align: right;
	white-space: nowrap;
}

.event-points strong {
	color: #ffffff;
	font-size: 14px;
	font-weight: 950;
	line-height: 1;
}

.total-points,
.total-points strong,
.total-points span {
	color: #a9b8ac;
}

.total-points strong {
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
}

.total-points span {
	font-size: 7px;
}

.pitch-shell {
	position: relative;
	min-width: 0;
	padding: 0 3px 3px;
}

.pitch {
	display: grid;
	grid-template-rows: repeat(4, minmax(0, 1fr));
	gap: 2px;
	min-width: 0;
	height: 252px;
	padding: 5px 3px;
	background: #0b803a;
}

.pitch-line {
	display: grid;
	grid-template-columns: repeat(var(--count), minmax(0, 1fr));
	align-items: center;
	justify-items: center;
	gap: 2px;
	width: min(100%, calc(var(--count) * 43px));
	min-width: 0;
	margin: 0 auto;
}

.pick {
	display: grid;
	grid-template-rows: 14px 48px;
	justify-items: stretch;
	align-items: end;
	width: 100%;
	max-width: 43px;
	min-width: 0;
}

.pick-marker {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 14px;
	overflow: visible;
	color: #ffe768;
	font-size: 12px;
	font-weight: 950;
	line-height: 1;
	text-align: center;
}

.captain-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #000000;
	color: #ffffff;
	font-size: 9px;
	font-weight: 950;
	line-height: 1;
	text-transform: uppercase;
	transform: translateY(7px);
}

.shirt {
	position: relative;
	display: grid;
	grid-template-rows: minmax(0, 1fr) 13px;
	align-items: center;
	min-width: 0;
	height: 48px;
	padding: 5px 2px 2px;
	isolation: isolate;
}

.shirt::before {
	position: absolute;
	z-index: -1;
	inset: 0;
	content: "";
	border: 1px solid rgba(0, 0, 0, 0.44);
	background: var(--shirt-a);
	clip-path: polygon(23% 0, 77% 0, 100% 17%, 87% 39%, 82% 100%, 18% 100%, 13% 39%, 0 17%);
}

.shirt::after {
	position: absolute;
	top: 1px;
	left: 50%;
	width: 13px;
	height: 6px;
	content: "";
	border-radius: 0 0 8px 8px;
	background: rgba(0, 0, 0, 0.23);
	transform: translateX(-50%);
}

.player-name {
	z-index: 1;
	align-self: center;
	justify-self: center;
	width: calc(100% - 3px);
	min-width: 0;
	padding: 1px;
	background: #000000;
	color: #ffffff;
	font-size: 8px;
	font-weight: 400;
	line-height: 8.1px;
	text-align: center;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.pick-points {
	z-index: 1;
	align-self: end;
	justify-self: center;
	min-width: 18px;
	height: 13px;
	padding: 0 2px;
	background: #f8fff8;
	color: #07100b;
	font-size: 10px;
	font-weight: 950;
	line-height: 13px;
	text-align: center;
}

.pick-points.is-empty {
	color: transparent;
}

.is-captain .pick-points {
	background: #ffe768;
}

.is-subbed-out .shirt {
	opacity: 0.58;
	filter: grayscale(0.55);
}

.is-active-bench .shirt::before {
	outline: 2px solid #ffe768;
	outline-offset: -2px;
}

.auto-subs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin-top: 2px;
	min-width: 0;
}

.auto-sub {
	padding: 1px 3px;
	background: rgba(255, 231, 104, 0.17);
	color: #ffe768;
	font-size: 8px;
	font-weight: 850;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.bench-wrap {
	min-width: 0;
	margin-top: 2px;
}

.bench {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	justify-items: center;
	gap: 2px;
	min-width: 0;
}

.bench .pick {
	grid-template-rows: 9px 40px;
	max-width: 39px;
}

.bench .pick-marker {
	height: 9px;
	font-size: 8px;
	line-height: 1;
}

.bench .shirt {
	height: 40px;
	padding: 4px 2px 2px;
	grid-template-rows: minmax(0, 1fr) 12px;
}

.bench .shirt::after {
	width: 11px;
	height: 5px;
}

.bench .player-name {
	font-size: 7px;
	line-height: 7.1px;
}

.bench .pick-points {
	min-width: 17px;
	height: 12px;
	font-size: 9px;
	line-height: 12px;
}

.no-picks {
	min-height: 294px;
	padding: 12px 8px;
	color: #d4e6d7;
	font-size: 10px;
	font-weight: 800;
	overflow-wrap: anywhere;
}

@media (min-width: 900px) {
	.teams-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 5px;
	}

	.page {
		padding: 5px;
	}

	.pitch {
		height: 292px;
	}

	.pitch-line {
		width: min(100%, calc(var(--count) * 50px));
	}

	.pick {
		grid-template-rows: 14px 52px;
		max-width: 50px;
	}

	.pick-marker {
		height: 14px;
		font-size: 13px;
		line-height: 1;
	}

	.captain-badge {
		width: 14px;
		height: 14px;
		font-size: 9.5px;
		transform: translateY(7px);
	}

	.shirt {
		height: 52px;
		grid-template-rows: minmax(0, 1fr) 14px;
	}

	.player-name {
		font-size: 8.8px;
		line-height: 9px;
	}

	.pick-points {
		height: 14px;
		font-size: 11px;
		line-height: 14px;
	}

	.bench .pick {
		max-width: 44px;
	}
}

@media (max-width: 380px) {
	.page {
		padding: 3px;
	}

	.topbar {
		padding-bottom: 4px;
	}

	h1 {
		font-size: 14px;
	}

	.event-line {
		font-size: 9px;
	}

	.teams-grid {
		gap: 3px;
	}

	.team-head {
		grid-template-columns: 17px minmax(0, 1fr) minmax(48px, auto);
		gap: 2px;
		padding: 3px;
	}

	.rank {
		font-size: 11px;
	}

	.team-copy h2 {
		font-size: 10.8px;
	}

	.team-copy p {
		font-size: 8px;
	}

	.chip {
		min-height: 11px;
		padding: 1px 3px;
		font-size: 7px;
	}

	.points-stack {
		font-size: 7px;
	}

	.event-points strong {
		font-size: 12.5px;
	}

	.total-points strong {
		font-size: 10.5px;
	}

	.pitch-shell {
		padding: 0 2px 2px;
	}

	.pitch {
		height: 238px;
		padding: 4px 2px;
	}

	.pitch-line {
		width: min(100%, calc(var(--count) * 39px));
	}

	.pick {
		grid-template-rows: 11px 43px;
		max-width: 39px;
	}

	.pick-marker {
		height: 11px;
		font-size: 10px;
		line-height: 1;
	}

	.captain-badge {
		width: 11px;
		height: 11px;
		font-size: 7.5px;
		transform: translateY(6px);
	}

	.shirt {
		height: 43px;
		grid-template-rows: minmax(0, 1fr) 12px;
	}

	.player-name {
		font-size: 6.8px;
		line-height: 7px;
	}

	.pick-points {
		min-width: 16px;
		height: 12px;
		font-size: 9px;
		line-height: 12px;
	}

	.bench .pick {
		grid-template-rows: 7px 37px;
		max-width: 35px;
	}

	.bench .shirt {
		height: 37px;
	}

	.bench .player-name {
		font-size: 6.1px;
		line-height: 6.3px;
	}
}
