:root {
	--bg: #000;
	--panel: #101416;
	--panel-2: #181d20;
	--line: #2a3135;
	--ink: #f3f6ef;
	--ink-2: #b3bcb5;
	--ink-3: #87918a;
	--optic: #d9f20a;
	--optic-ink: #141a00;
	--court: #1f62ad;
	--court-deep: #184f8e;
	--court-line: rgb(255 255 255 / 78%);
	--clay: #a9532c;
	--clay-deep: #8d4322;
	--good: #58d36a;
	--warn: #fab219;
	--neutral: #2c3235;
	--neutral-hi: #394145;
	--cool-1: #27507f;
	--cool-2: #3472b5;
	--cool-3: #8dc1f0;
	--warm-1: #84372f;
	--warm-2: #bd5040;
	--warm-3: #f4a48f;
	--head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--body: 'Barlow', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 16px/1.45 var(--body);
}

h1, h2, h3 { font-family: var(--head); margin: 0; font-weight: 700; letter-spacing: 0.01em; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--optic); outline-offset: 2px; }

input[type=text], input[type=password], input[type=number], input[type=date], select {
	width: 100%;
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 9px 11px;
	min-width: 0;
}
input::placeholder { color: var(--ink-3); }
input[type=date] { color-scheme: dark; }
input:focus, select:focus { border-color: var(--optic); outline: none; }


/* the ball */

.ball {
	--size: 26px;
	display: inline-block;
	flex: none;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #f3ff84, #afc406 55%, #8c9d02);
	position: relative;
	overflow: hidden;
}
.ball::before, .ball::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	border: calc(var(--size) * 0.07) solid rgb(255 255 255 / 92%);
	border-radius: 50%;
}
.ball::before { right: 68%; }
.ball::after { left: 68%; }
.ball.small { --size: 20px; box-shadow: 0 4px 6px black, 0 0 4px black; }
.ball.big { --size: 54px; }
.ball.tiny { --size: 11px; }


/* buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 9px 16px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s, transform 0.15s, opacity 0.15s;
}
.btn.ghost { color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); }
.btn.ghost:disabled { opacity: 0.4; }
.btn.primary { background: var(--optic); color: var(--optic-ink); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); background: #e8ff33; }

.link {
	color: var(--ink-2);
	font-size: 14px;
	text-decoration: underline;
	text-decoration-color: var(--ink-3);
	text-underline-offset: 3px;
}
.link:hover { color: var(--optic); }


/* top bar */

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 12px 24px;
	background: rgb(0 0 0 / 88%);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font: 700 26px/1 var(--head); letter-spacing: 0.02em; }
.league-name {
	max-width: 240px;
	background: transparent !important;
	border-color: transparent !important;
	border-bottom-color: var(--line) !important;
	border-radius: 0 !important;
	padding: 6px 2px !important;
}
.league-name:focus { border-bottom-color: var(--optic) !important; }
.tabs { display: flex; gap: 4px; margin: 0 auto; background: var(--panel); border-radius: 999px; padding: 4px; }
.tab { padding: 6px 20px; border-radius: 999px; font: 600 18px/1.2 var(--head); letter-spacing: 0.03em; color: var(--ink-2); }
.tab.active { background: var(--optic); color: var(--optic-ink); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.btn.icon { width: 40px; height: 40px; padding: 0; position: relative; }
.btn.icon::before {
	content: "";
	width: 14px;
	height: 11px;
	margin-top: 6px;
	border-radius: 2px;
	background: var(--ink-2);
}
.btn.icon::after {
	content: "";
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	width: 9px;
	height: 9px;
	border: 2px solid var(--ink-2);
	border-bottom: 0;
	border-radius: 5px 5px 0 0;
}
.btn.icon.unlocked::before { background: var(--optic); }
.btn.icon.unlocked::after { border-color: var(--optic); transform: translateX(-2px) rotate(-14deg); }

.menu-wrap { position: relative; }
.menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 230px;
	max-height: 60vh;
	overflow: auto;
	padding: 6px;
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: 0 20px 40px rgb(0 0 0 / 60%);
}
.menu.on { display: block; }
.menu-item { display: block; width: 100%; text-align: left; padding: 8px 11px; border-radius: 7px; font-size: 15px; }
.menu-item:hover { background: var(--line); }
.menu-item small { color: var(--ink-3); margin-left: 4px; }
.menu-sep { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 11px 4px; }
.menu-note { color: var(--ink-3); padding: 6px 11px; font-size: 14px; }


/* views */

main { max-width: 1680px; margin: 0 auto; padding: 0 24px 96px; }
.view { display: none; }
.view.on { display: block; }

.hero { padding: 54px 0 34px; }
.hero h1 { font-size: clamp(50px, 8vw, 104px); line-height: 0.94; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--optic); }
.hero p { margin: 18px 0 0; color: var(--ink-2); max-width: 620px; font-size: 18px; }


/* setup */

.setup-grid { display: grid; grid-template-columns: 1.3fr 1.1fr 0.9fr; gap: 16px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h2 { font-size: 28px; margin-bottom: 6px; }
.hint { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }

.roster { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.roster-col h3 { font-size: 20px; color: var(--ink-2); margin-bottom: 8px; }
.roster-col .count { color: var(--optic); margin-left: 4px; }
.row { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.row input { flex: 1; padding: 7px 10px; }
.mini { width: 28px; height: 32px; border-radius: 6px; color: var(--ink-3); flex: none; font-size: 16px; }
.mini:hover { color: var(--ink); background: var(--panel-2); }
.add-player { border-style: dashed !important; margin-top: 2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.card-head h2 { margin-bottom: 0; }
.btn.small { padding: 5px 13px; font-size: 14px; }
.roster-card .switch { margin: 10px 0 6px; }
.roster-open { display: none; grid-column: 1 / -1; }
.roster.open .roster-open { display: block; }
.roster.open .roster-col { display: none; }
.open-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; align-items: center; }
.open-grid .rows { display: contents; }
.open-grid .row { margin-bottom: 0; }
.open-grid .add-player { margin-top: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.field input, .field select { color: var(--ink); font-size: 16px; }

.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.date {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 6px 2px;
	background: var(--panel-2);
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}
.date small { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.date:hover { border-color: var(--ink-3); }
.date.bye {
	color: var(--ink-3);
	background: repeating-linear-gradient(135deg, #171b1e 0 5px, #0d1012 5px 10px);
}
.date.bye small { color: var(--optic); }
.cal-sum { margin: 14px 0 0; font: 600 20px/1.2 var(--head); }

.switch { display: flex; align-items: center; gap: 12px; margin: 14px 0; cursor: pointer; font-size: 15px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.track { flex: none; width: 40px; height: 23px; border-radius: 12px; background: var(--neutral-hi); position: relative; transition: background 0.15s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--optic); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--optic-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--optic); outline-offset: 2px; }

.court-list.on { margin-bottom: 14px; }
.court-row { display: flex; gap: 6px; margin-bottom: 6px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; font-size: 14px; color: var(--ink-2); flex: none; }
.chip.on { background: var(--clay); border-color: var(--clay); color: #fff; }

.seg { display: flex; background: var(--panel-2); border-radius: 9px; padding: 3px; margin-top: 2px; }
.seg button { flex: 1; padding: 7px 4px; border-radius: 7px; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--neutral-hi); color: var(--ink); }

.gen-bar {
	position: sticky;
	bottom: 16px;
	margin-top: 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 14px 12px 24px;
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	box-shadow: 0 16px 40px rgb(0 0 0 / 70%);
}
.gen-sum { font: 500 20px/1.2 var(--head); color: var(--ink-2); }
.gen-sum b { color: var(--ink); font-weight: 700; }
.gen-sum i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); margin: 0 8px; vertical-align: middle; }
.gen-sum .need { color: var(--warn); }
.generate { padding: 13px 26px; font: 700 22px/1 var(--head); letter-spacing: 0.03em; text-transform: uppercase; }
.generate.off { opacity: 0.35; }


/* season */

.season-empty { text-align: center; padding: 120px 20px; color: var(--ink-2); }
.season-empty h2 { font-size: 44px; color: var(--ink); margin-top: 18px; }
.season-empty p { margin: 8px 0 22px; }

.verdict { display: flex; align-items: center; gap: 18px; padding: 26px 0 16px; flex-wrap: wrap; }
.verdict h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1; }
.verdict p { margin: 5px 0 0; color: var(--ink-2); }
.verdict.perfect h2 { color: var(--optic); }
.flag { width: 46px; height: 46px; border-radius: 50%; background: var(--warn); color: #201500; display: grid; place-items: center; font: 700 30px/1 var(--head); flex: none; }
.stale { color: var(--warn); font-size: 14px; border: 1px solid var(--warn); padding: 3px 11px; border-radius: 999px; margin-left: auto; }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.focus { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; margin-left: 8px; }
.focus select { width: 150px; padding: 7px 9px; color: var(--ink); }
.lit-note { display: flex; align-items: center; gap: 12px; margin-left: 8px; font-size: 15px; }
.lit-note b { color: var(--optic); }

.season-grid { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 18px; align-items: start; }
.rail { position: sticky; top: 76px; max-height: calc(100vh - 88px); overflow-y: auto; padding-right: 4px; }

.wk {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 4px 14px;
	padding: 12px 14px 10px;
	margin-bottom: 8px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
}
.wk-date { display: flex; flex-direction: column; justify-content: center; }
.wk-date small { color: var(--ink-3); font-size: 13px; }
.wk-date b { font: 700 25px/1.05 var(--head); }
.wk.off {
	grid-template-columns: 76px minmax(0, 1fr) auto;
	align-items: center;
	background: repeating-linear-gradient(135deg, #101416 0 8px, #0b0e0f 8px 16px);
}
.wk.off .off-label { font: 600 22px/1 var(--head); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.wk-tools { grid-column: 2; display: flex; gap: 16px; opacity: 0; transition: opacity 0.15s; margin-top: 2px; }
.wk:hover .wk-tools, .wk:focus-within .wk-tools { opacity: 1; }
.wk-tools .link { font-size: 13px; }

.courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 10px; }
.ct-wrap { transition: opacity 0.15s; }
.ct-wrap.dim { opacity: 0.22; }
.ct-wrap.lit .ct { box-shadow: 0 0 0 3px var(--optic); }
.ct-name { color: var(--ink-3); font-size: 12px; margin: 0 0 3px 2px; }
.ct-name em { font-style: normal; color: #eda27f; }

/* A real doubles court, seen from above, with the net down the middle */
.ct {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 104px;
	background: linear-gradient(160deg, var(--court), var(--court-deep));
	border: 2px solid var(--court-line);
	border-radius: 3px;
}
.ct.rough { background: linear-gradient(160deg, var(--clay), var(--clay-deep)); }
.ct::before {
	content: "";
	position: absolute;
	inset: 11% 22%;
	border: 1.5px solid var(--court-line);
	border-width: 1.5px;
	background: linear-gradient(0deg, transparent calc(50% - 0.75px), var(--court-line) calc(50% - 0.75px), var(--court-line) calc(50% + 0.75px), transparent calc(50% + 0.75px));
}
.ct::after {
	content: "";
	position: absolute;
	top: -5px;
	bottom: -5px;
	left: calc(50% - 1.5px);
	width: 3px;
	background: #fff;
	box-shadow: 0 0 5px rgb(0 0 0 / 55%);
}
.side { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 6px 8px; min-width: 0; }

.chip-p {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgb(3 18 38 / 72%);
	border: 1.5px solid transparent;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.25;
	transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.chip-p .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-p.g-f { color: #ffd7c5; }
.chip-p:hover, .chip-p.same { border-color: rgb(255 255 255 / 75%); }
.chip-p.sel { background: var(--optic); color: var(--optic-ink); }
.chip-p.target { border: 1.5px dashed var(--optic); }
.chip-p.subbed { font-style: italic; }
.chip-p .tag { font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; color: var(--optic); }
.chip-p.sel .tag { color: var(--optic-ink); }

.sit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.sit .chip-p { background: var(--panel-2); font-size: 14px; }
.tray {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 8px 12px;
	margin-top: 8px;
	background: var(--panel-2);
	border-radius: 8px;
	font-size: 14px;
	color: var(--ink-2);
}
.tray b { color: var(--ink); }


/* rail: fairness */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; display: flex; flex-direction: column; }
.t-label { font-size: 13px; color: var(--ink-2); }
.tile b { font: 700 34px/1.1 var(--head); }
.t-state { font-size: 13px; font-weight: 600; }
.t-state.good { color: var(--good); }
.t-state.warn { color: var(--warn); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.panel h3 { font-size: 22px; }
.cap { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; }

.line { display: block; width: 100%; height: auto; }
.line .g { stroke: var(--line); stroke-width: 1; }
.line text { fill: var(--ink-3); font: 500 11px var(--body); }
.line path { fill: none; stroke: var(--optic); stroke-width: 2; stroke-linejoin: round; }
.line .col rect { fill: transparent; }
.line .col:hover rect { fill: rgb(255 255 255 / 6%); }
.line .col circle { fill: var(--optic); stroke: var(--panel); stroke-width: 2; opacity: 0; }
.line .col:hover circle { opacity: 1; }

.legend { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--ink-2); padding: 8px 0 10px; }
.legend span { margin: 0 6px; }
.legend i { width: 26px; height: 12px; border-radius: 2px; }

.heat-scroll { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; table-layout: fixed; font-size: 14px; }
.heat th { font-weight: 500; color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.heat thead th:first-child { width: 58px; }
.heat tbody th { text-align: right; padding-right: 6px; }
.heat td { height: 32px; text-align: center; border-radius: 4px; font-weight: 600; cursor: pointer; border: 2px solid transparent; }
.heat td.plain { cursor: default; }
.heat td:not(.self):not(.plain):hover { border-color: var(--ink); }
.heat td.on { border-color: var(--optic); }
.heat td.self { cursor: default; background: repeating-linear-gradient(135deg, transparent 0 3px, #20262a 3px 5px); }

.in { background: var(--neutral); color: var(--ink); }
.in.hi { background: var(--neutral-hi); }
.cool-1 { background: var(--cool-1); color: #fff; }
.cool-2 { background: var(--cool-2); color: #fff; }
.cool-3 { background: var(--cool-3); color: #06233f; }
.warm-1 { background: var(--warm-1); color: #fff; }
.warm-2 { background: var(--warm-2); color: #fff; }
.warm-3 { background: var(--warm-3); color: #3d0e06; }

.dots { display: grid; grid-template-columns: 58px minmax(0, 1fr) 22px; gap: 3px 6px; align-items: center; font-size: 12px; }
.d-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.d-count { font-weight: 600; text-align: right; color: var(--ink); font-size: 14px; }
.d-row { display: grid; grid-template-columns: repeat(var(--weeks), 1fr); align-items: center; justify-items: center; height: 18px; }
.d-row i { display: block; width: 100%; height: 18px; position: relative; }
.d-row i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: var(--neutral-hi); }
.d-row i.on::after { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--optic); }

.tip {
	position: fixed;
	z-index: 60;
	max-width: 260px;
	padding: 6px 10px;
	background: #fff;
	color: #111;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.1s;
}
.tip.on { opacity: 1; }

.toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 70;
	transform: translate(-50%, 20px);
	padding: 11px 20px;
	max-width: calc(100vw - 32px);
	background: var(--optic);
	color: var(--optic-ink);
	font-weight: 600;
	border-radius: 999px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }


/* overlays */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgb(0 0 0 / 80%);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.overlay.on { display: flex; }

.gen-card, .modal {
	width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 20px;
}
.gen-card { max-width: 540px; padding: 26px; text-align: center; }
.gen-title { font-size: 32px; margin-top: 18px; }

.rally {
	position: relative;
	height: 130px;
	background: linear-gradient(160deg, var(--court), var(--court-deep));
	border: 2px solid var(--court-line);
	border-radius: 4px;
	overflow: hidden;
}
.rally .net { position: absolute; top: 0; bottom: 0; left: calc(50% - 1.5px); width: 3px; background: #fff; }
.rally .fly { position: absolute; left: 18px; top: 100px; animation: rally-x 0.9s linear infinite alternate; }
.rally .ball { display: block; animation: rally-y 0.45s ease-out infinite alternate; }
@keyframes rally-x { to { left: calc(100% - 44px); } }
@keyframes rally-y { to { transform: translateY(-84px); } }

.gen-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 12px; }
.gen-stats b { display: block; font: 700 40px/1 var(--head); font-variant-numeric: tabular-nums; }
.gen-stats span { font-size: 13px; color: var(--ink-2); }
.gen-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 44px; margin-bottom: 18px; }
.gen-bars i { width: 8px; background: var(--optic); border-radius: 2px 2px 0 0; }

.modal { max-width: 500px; padding: 24px; }
.modal h2 { font-size: 32px; margin-bottom: 10px; }
.modal-body p { color: var(--ink-2); margin: 0 0 12px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.form-error { color: var(--warn) !important; min-height: 1.4em; }
.keep-field { margin-top: 12px; }

.radio-card { display: flex; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-card:hover { background: var(--panel-2); }
.radio-card:has(input:checked) { border-color: var(--optic); }
.radio-card input { accent-color: var(--optic); margin-top: 4px; flex: none; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { color: var(--ink-2); font-size: 14px; }


/* smaller screens */

@media (max-width: 1320px) {
	.season-grid { grid-template-columns: minmax(0, 1fr); }
	.rail { position: static; max-height: none; overflow: visible; padding-right: 0; }
	.tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
	.setup-grid { grid-template-columns: 1fr 1fr; }
	.courts-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
	main { padding: 0 16px 88px; }
	.topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
	.league-name { order: 3; flex: 1 1 130px; max-width: none; }
	.tabs { order: 4; margin: 0; }
	.top-actions { margin-left: auto; }
	.top-actions .btn:not(.icon) { padding: 7px 11px; font-size: 14px; }
	.brand .wordmark { font-size: 22px; }
	.menu { position: fixed; top: auto; left: 16px; right: 16px; margin-top: 8px; }
	.hero { padding: 34px 0 22px; }
	.setup-grid { grid-template-columns: minmax(0, 1fr); }
	.card { padding: 16px; }
	.gen-bar { border-radius: 18px; flex-direction: column; align-items: stretch; padding: 12px; text-align: center; }
	.wk { grid-template-columns: minmax(0, 1fr); }
	.wk-date { flex-direction: row; align-items: baseline; gap: 8px; }
	.wk-tools { grid-column: 1; opacity: 1; }
	.wk.off { grid-template-columns: minmax(0, 1fr) auto; }
	.courts { grid-template-columns: minmax(0, 1fr); }
}

@media (hover: none) {
	.wk-tools { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.rally .fly, .rally .ball { animation: none; }
	.rally .fly { left: calc(50% - 40px); top: 40px; }
}


/* printing: a plain schedule on white */

@media print {
	body { background: #fff; color: #000; }
	.topbar, .tools, .rail, .wk-tools, .tray, .toast, .tip, .overlay { display: none !important; }
	main { max-width: none; padding: 0; }
	.season-grid { display: block; }
	.verdict { padding: 0 0 10px; }
	.verdict .ball, .verdict .flag, .verdict p, .stale { display: none; }
	.verdict h2, .verdict.perfect h2 { color: #000; font-size: 22px; }
	.wk { break-inside: avoid; background: #fff !important; border: 1px solid #999; padding: 6px 8px; margin-bottom: 5px; }
	.wk-date small, .ct-name { color: #333; }
	.ct, .ct.rough { background: #fff; border: 1px solid #333; min-height: 64px; }
	.ct::before { display: none; }
	.ct::after { background: #333; box-shadow: none; top: 0; bottom: 0; width: 1px; }
	.chip-p, .chip-p.g-f, .sit .chip-p { background: none; color: #000; padding: 0 3px; }
	.chip-p .ball {
		background: #000;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	.ct-wrap.dim { opacity: 1; }
	.ct-wrap.lit .ct { box-shadow: none; }
}
