:root {
	color-scheme: light;
	font-family:
		system-ui,
		-apple-system,
		"Segoe UI",
		sans-serif;
	color: #142440;
	background: #f3f7ff;
	font-synthesis: none;
	--blue: #2459d7;
	--purple: #793ac6;
}
* {
	box-sizing: border-box;
}
html {
	max-width: 100%;
	overflow-x: clip;
	scroll-padding-top: 16px;
}
body {
	margin: 0;
	min-width: 0;
}
button,
input,
select {
	font: inherit;
}
button,
a,
input,
select,
summary {
	touch-action: manipulation;
}
button,
select,
input {
	min-height: 44px;
	border: 1px solid #c5d6ed;
	border-radius: 10px;
	background: #fff;
	color: inherit;
	padding: 8px 12px;
}
button {
	cursor: pointer;
	font-weight: 750;
}
button:hover {
	filter: brightness(0.97);
}
button:disabled {
	opacity: 0.45;
	cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 3px solid #1d65e8;
	outline-offset: 3px;
}
a {
	color: #2459d7;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
[hidden] {
	display: none !important;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.vs-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	padding: 14px max(20px, calc((100% - 1320px) / 2));
	background: #ffffff;
	border-bottom: 1px solid #dbe5f4;
}
.brand {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 750;
	white-space: nowrap;
	color: #142440;
}
.brand strong {
	color: #2459d7;
}
.brand img {
	border-radius: 8px;
}
.vs-header nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.vs-header nav a {
	padding: 10px 12px;
	border: 1px solid #dbe5f4;
	border-radius: 9px;
	font-size: 12px;
	font-weight: 700;
}
.vs-page {
	width: min(1320px, 100%);
	margin: auto;
	padding: 20px clamp(12px, 2vw, 24px) 32px;
}
.title-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.title-row h1 {
	font-size: 20px;
	margin: 0;
}
.mode-tag {
	font-size: 11px;
	letter-spacing: 0.15em;
	color: #42618d;
	font-weight: 800;
}
.vs-ad {
	margin: 48px auto 64px;
	width: min(728px, 100%);
	text-align: center;
	color: #64748b;
	font-size: 10px;
	letter-spacing: 0.12em;
}
.ad-space {
	height: 90px;
	background: #eaf0f8;
	border: 1px solid #e1e8f1;
	margin-top: 8px;
	border-radius: 4px;
	contain: layout paint;
}
.match {
	scroll-margin-top: 16px;
}
.match-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.match-toolbar > strong {
	margin-right: auto;
	font-size: 13px;
}
.match-toolbar select {
	font-size: 12px;
}
.match-toolbar details {
	font-size: 13px;
}
.match-toolbar summary,
.history summary {
	cursor: pointer;
	padding: 12px;
	border: 1px solid #c5d6ed;
	background: #fff;
	border-radius: 10px;
}
.settings-content {
	padding: 16px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	background: #fff;
	border: 1px solid #cfddf0;
	border-radius: 12px;
	margin-top: 10px;
}
.match-toolbar:has(details[open]) {
	align-items: start;
}
.match-toolbar details[open] {
	flex-basis: 100%;
}
.settings-content label {
	display: grid;
	gap: 6px;
	font-size: 12px;
}
.settings-content input,
.settings-content select {
	width: 100%;
	min-width: 0;
}
.settings-content p {
	grid-column: 1/-1;
	font-size: 12px;
	margin: 0;
}
.settings-content button {
	grid-column: 1/-1;
}
.storage-message {
	font-size: 12px;
	color: #445b7c;
	margin: 0 0 8px;
}
.storage-message:empty {
	display: none;
}
.match-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(340px, 1.55fr) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}
.player-card {
	--player: #2459d7;
	--tint: #eaf1ff;
	border: 2px solid #d4e0f2;
	border-radius: 20px;
	background: #fff;
	padding: 18px;
	min-width: 0;
	box-shadow: 0 5px 18px #17375e06;
}
.player-two {
	--player: #793ac6;
	--tint: #f4edff;
}
.player-card.is-active {
	border-color: var(--player);
	box-shadow: 0 0 0 3px var(--tint);
}
.player-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 4px;
}
.player-id {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: var(--player);
}
.turn-badge {
	font-size: 10px;
	font-weight: 800;
	background: var(--tint);
	color: var(--player);
	padding: 5px 7px;
	border-radius: 6px;
	min-height: 24px;
}
.turn-badge:empty {
	visibility: hidden;
}
.player-card h2 {
	font-size: 21px;
	margin: 14px 0 4px;
	overflow-wrap: anywhere;
}
.win-count {
	font-size: 13px;
	margin: 0 0 20px;
	color: var(--player);
	font-weight: 750;
}
.round-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	font-size: 10px;
	font-weight: 700;
	color: #566b88;
}
.round-row strong {
	font-size: 27px;
	color: var(--player);
}
.round-row small {
	font-size: 12px;
}
.vs-score {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(54px, 6.7vw, 96px);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.05;
	letter-spacing: -0.035em;
	text-align: center;
	margin: 18px 0;
	color: #182d4f;
}
.player-stats {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 11px;
	gap: 6px;
}
.player-stats strong {
	font-family: Georgia, serif;
	font-size: 23px;
}
.turn-darts {
	list-style: none;
	padding: 0;
	margin: 16px 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 5px;
}
.turn-darts li {
	padding: 8px 2px;
	text-align: center;
	border: 1px solid #dce5f2;
	background: #f7faff;
	font-size: 12px;
	font-weight: 700;
	border-radius: 7px;
	overflow-wrap: anywhere;
}
.turn-darts small {
	display: block;
	font-size: 9px;
	color: #74849a;
	margin-bottom: 5px;
	font-weight: 500;
}
.player-arrangements {
	border-top: 1px solid #e2eaf6;
	padding-top: 12px;
	font-size: 12px;
}
.route-option {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px;
	margin-top: 7px;
	border: 1px solid #dce5f2;
	background: #fbfdff;
	border-radius: 8px;
}
.route-option.selected {
	border-color: var(--player);
	background: var(--tint);
}
.route-option small {
	display: block;
	font-size: 10px;
	font-weight: 500;
	color: #596d89;
}
.route-option strong {
	display: block;
	font-size: 13px;
	margin: 5px 0;
	overflow-wrap: anywhere;
}
.route-note {
	font-size: 10px;
	line-height: 1.6;
	color: #526b8a;
	margin: 7px 0 0;
}
.input-card {
	--active: #2459d7;
	--active-tint: #eaf1ff;
	min-width: 0;
	padding: 14px;
	border: 2px solid var(--active);
	border-radius: 20px;
	background: linear-gradient(160deg, var(--active-tint), #fff 50%);
}
.input-card[data-active="1"] {
	--active: #793ac6;
	--active-tint: #f4edff;
}
.active-player-line {
	display: flex;
	gap: 10px;
	align-items: baseline;
	color: var(--active);
	overflow-wrap: anywhere;
}
.active-player-line span {
	font-size: 10px;
	font-weight: 800;
	white-space: nowrap;
}
.active-player-line strong {
	font-size: 19px;
}
.input-card #turn-message {
	font-size: 12px;
	margin: 6px 0 12px;
	color: #576984;
	min-height: 18px;
}
.multiplier-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}
.multiplier-row button {
	font-size: 11px;
	padding: 7px 3px;
}
.multiplier-row button:nth-child(1) {
	color: #b32256;
	background: #fff1f6;
	border-color: #f1bed1;
}
.multiplier-row button:nth-child(2) {
	color: #116196;
	background: #edf8ff;
	border-color: #b4d7f0;
}
.multiplier-row button:nth-child(3) {
	color: #0d7355;
	background: #eefff8;
	border-color: #b2decf;
}
.multiplier-row button[aria-pressed="true"] {
	box-shadow: inset 0 0 0 2px currentColor;
}
.number-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	margin: 8px 0;
}
.number-grid button {
	font-size: 24px;
	line-height: 1;
	padding: 11px 3px;
	min-height: 48px;
	box-shadow: inset 0 -3px #e3eaf7;
}
.number-grid button[aria-pressed="true"] {
	background: var(--active);
	color: #fff;
	box-shadow: none;
}
.extra-row {
	display: flex;
	gap: 6px;
}
.extra-row button {
	flex: 1;
	min-width: 0;
	font-size: 11px;
	padding: 9px 2px;
}
.extra-row #vs-bull50 {
	background: #fff0f3;
	color: #b4214b;
	border-color: #edbaca;
}
.extra-row #vs-bull25 {
	background: #effff8;
	color: #0e775b;
	border-color: #b5ddce;
}
.extra-row #vs-confirm {
	background: var(--active);
	color: #fff;
	border-color: var(--active);
}
.pending-label {
	font-size: 10px;
	color: #576984;
	min-height: 16px;
	margin: 8px 0;
}
#manual-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
}
#manual-form input {
	width: 100%;
	min-width: 0;
	font-size: 13px;
}
#manual-form button {
	font-size: 12px;
}
.recovery-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 12px;
}
.recovery-row button {
	font-size: 12px;
	background: #f8fafc;
}
.recovery-row #reset-leg {
	color: #685c70;
}
.primary {
	background: var(--active);
	color: #fff;
	border-color: var(--active);
	width: 100%;
	padding: 18px 12px;
}
#handoff,
#game-result {
	padding: 32px 8px 36px;
	text-align: center;
	min-height: 330px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
}
#last-turn-summary,
#result-detail {
	line-height: 1.7;
	font-size: 14px;
}
#result-title {
	font-size: 27px;
	color: var(--active);
}
.match-footer {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 18px;
	font-size: 12px;
}
.match-footer > p:first-child {
	font-weight: 800;
}
.match-footer label {
	display: flex;
	align-items: center;
	gap: 9px;
}
.match-footer select {
	max-width: 220px;
}
.small-note {
	color: #60728e;
	line-height: 1.7;
	margin: 0;
}
.history {
	margin-top: 18px;
}
.history-scroll {
	overflow-x: auto;
}
table {
	border-collapse: collapse;
	width: 100%;
	background: #fff;
	font-size: 12px;
	margin-top: 8px;
}
th,
td {
	border-bottom: 1px solid #dee7f5;
	padding: 12px;
	text-align: left;
	overflow-wrap: anywhere;
}
th {
	color: #566b88;
}
.vs-guide {
	margin-top: 38px;
	padding: 20px;
	border: 1px solid #d9e5f5;
	border-radius: 12px;
	background: #f8fbff;
	line-height: 1.85;
	font-size: 13px;
	color: #526986;
}
.vs-guide h2 {
	font-size: 16px;
	color: #223a60;
}
.legal {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	font-size: 11px;
	margin-top: 28px;
	color: #75859b;
}
@media (max-width: 1000px) {
	.match-grid {
		gap: 10px;
		grid-template-columns: minmax(0, 1fr) minmax(320px, 1.7fr) minmax(0, 1fr);
	}
	.player-card {
		padding: 12px;
	}
	.player-card h2 {
		font-size: 18px;
	}
	.vs-score {
		font-size: 62px;
	}
	.turn-darts {
		gap: 3px;
	}
	.route-option strong {
		font-size: 12px;
	}
}
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
	.match-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	.player-one {
		grid-column: 1;
		grid-row: 1;
	}
	.player-two {
		grid-column: 2;
		grid-row: 1;
	}
	.input-card {
		grid-column: 1/-1;
		grid-row: 2;
		width: 100%;
		max-width: 580px;
		justify-self: center;
	}
	.player-card h2 {
		font-size: 17px;
		margin-top: 8px;
	}
	.win-count {
		margin-bottom: 10px;
	}
	.vs-score {
		font-size: clamp(48px, 9vw, 78px);
		margin: 10px 0;
	}
	.turn-darts {
		margin: 10px 0;
	}
	.player-arrangements {
		font-size: 11px;
	}
	.route-option {
		padding: 6px;
	}
	.route-option strong {
		font-size: 12px;
	}
	.settings-content {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.vs-header {
		padding: 12px;
		gap: 10px;
	}
	.vs-header nav a {
		font-size: 11px;
		padding: 9px;
	}
	.title-row h1 {
		font-size: 18px;
	}
	.match-toolbar > strong {
		font-size: 11px;
	}
	.vs-ad {
		margin: 48px auto 64px;
	}
	.player-stats strong {
		font-size: 20px;
	}
	.player-stats {
		flex-wrap: wrap;
	}
	.round-row {
		flex-wrap: wrap;
	}
	.match-footer {
		gap: 10px;
	}
	.match-footer .small-note {
		flex-basis: 100%;
	}
}
@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
	}
}
