*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
}

body {
	background: #f5f6f2;
	color: #1f2a24;
	font-family: Arial, Helvetica, sans-serif;
	margin: 0;
	overflow-x: hidden;
	overflow-wrap: anywhere;
}

h1 {
	font-size: 1.75rem;
	line-height: 1.15;
	margin: 0 0 18px;
}

h2 {
	font-size: 1.15rem;
	line-height: 1.25;
	margin: 22px 0 10px;
}

main {
	margin: 0 auto;
	max-width: 960px;
	padding: 18px 14px 32px;
	width: 100%;
}

section {
	margin: 0 0 22px;
}

label {
	display: block;
	font-weight: 700;
	margin: 12px 0 6px;
}

input,
select,
button,
.button {
	font: inherit;
	min-height: 40px;
	padding: 8px 10px;
}

input,
select {
	max-width: 100%;
	width: 100%;
}

button,
.button {
	background: #28644f;
	border: 1px solid #1e4b3b;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	margin-top: 12px;
	max-width: 100%;
	text-decoration: none;
	width: 100%;
}

table {
	border-collapse: collapse;
	min-width: 320px;
	width: 100%;
}

td,
th {
	border-bottom: 1px solid #c9d2ca;
	padding: 8px;
	text-align: left;
}

.table-scroll {
	max-width: 100%;
	overflow-x: auto;
}

.topbar {
	align-items: center;
	background: #10251d;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 10px 14px;
	width: 100%;
}

.topbar a {
	color: #fff;
	line-height: 1.2;
	text-decoration: none;
}

.topbar form {
	flex-basis: 100%;
	margin: 0;
}

.topbar button {
	margin-top: 0;
	min-height: 32px;
	width: 100%;
}

.login-page {
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 14px;
}

.login-panel {
	background: #fff;
	border: 1px solid #c9d2ca;
	max-width: 360px;
	padding: 18px;
	width: 100%;
}

.error {
	color: #9f1d20;
	font-weight: 700;
}

.score-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: 1fr;
}

.score-grid button {
	grid-column: 1 / -1;
}

.page-title {
	margin: 0 0 18px;
	text-align: center;
}

.page-title p {
	color: #526159;
	font-weight: 700;
	margin: 0 0 6px;
}

.hole-nav {
	align-items: center;
	display: grid;
	gap: 10px;
	grid-template-columns: 48px 1fr 48px;
	margin: 0 auto 14px;
	max-width: 360px;
}

.hole-nav .button {
	margin: 0;
	width: 48px;
}

.hole-pill {
	background: #fff;
	border: 1px solid #c9d2ca;
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	min-height: 48px;
	padding: 12px;
	text-align: center;
}

.icon-button {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.hole-summary {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 auto 16px;
	max-width: 360px;
}

.hole-summary div {
	background: #fff;
	border: 1px solid #c9d2ca;
	padding: 10px;
	text-align: center;
}

.hole-summary span,
.score-player-name span,
.score-value-label span {
	color: #526159;
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
}

.score-entry-list {
	display: grid;
	gap: 10px;
}

.selected-player-list {
	display: grid;
	gap: 8px;
	list-style: none;
	padding: 0;
}

.selected-player-list li {
	align-items: center;
	background: #fff;
	border: 1px solid #c9d2ca;
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: 10px;
}

.selected-player-list form {
	margin: 0;
}

.compact-button {
	margin: 0;
	min-height: 36px;
	padding: 8px 10px;
}

.locked-note {
	color: #526159;
	font-size: 0.85rem;
	font-weight: 700;
}

.score-entry-row {
	align-items: center;
	background: #fff;
	border: 1px solid #c9d2ca;
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) 48px 72px 48px;
	margin: 0;
	padding: 10px;
}

.score-entry-row .greenie-option {
	align-items: center;
	display: flex;
	font-weight: 700;
	gap: 8px;
	grid-column: 1 / -1;
	margin: 0;
}

.score-entry-row .greenie-option input {
	margin: 0;
	width: auto;
}

.score-player-name {
	min-width: 0;
}

.score-player-name strong {
	display: block;
	line-height: 1.2;
}

.score-step {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0;
	min-height: 48px;
	padding: 4px;
	width: 48px;
}

.score-value-label {
	margin: 0;
	text-align: center;
}

.score-value {
	font-size: 1.2rem;
	font-weight: 700;
	margin-top: 3px;
	min-height: 48px;
	padding: 4px;
	text-align: center;
}

.action-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 16px;
}

.secondary-button {
	background: #fff;
	color: #28644f;
}

.modal {
	align-items: center;
	background: rgba(16, 37, 29, 0.65);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 18px;
	position: fixed;
	z-index: 10;
}

.modal.hidden {
	display: none;
}

.modal-panel {
	background: #fff;
	border: 1px solid #c9d2ca;
	box-shadow: 0 16px 40px rgba(16, 37, 29, 0.25);
	max-width: 360px;
	padding: 18px;
	text-align: center;
	width: 100%;
}

.modal-panel p {
	margin: 0 0 12px;
}

.modal-close {
	margin-top: 0;
}

.scorecard-nine,
.scorecard-summary {
	margin-bottom: 18px;
}

.scorecard-nine h2 {
	margin-top: 0;
}

.scorecard-scroll {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.scorecard-table {
	background: #fff;
	min-width: 640px;
}

.scorecard-table th,
.scorecard-table td {
	padding: 8px 6px;
	vertical-align: middle;
}

.scorecard-table .center {
	text-align: center;
}

.scorecard-table a {
	color: #28644f;
	display: block;
	font-weight: 700;
	min-height: 28px;
	text-decoration: none;
}

.player-cell {
	font-weight: 700;
	min-width: 120px;
}

.sixes-card {
	margin-bottom: 24px;
}

.sixes-card h3 {
	font-size: 1rem;
	margin: 12px 0 8px;
}

.sixes-results-table {
	min-width: 600px;
}

.sixes-standings-table {
	margin-bottom: 1rem;
	min-width: 420px;
}

.sixes-results-table td {
	position: relative;
}

.net-scorecard-table td {
	position: relative;
}

.net-score-row {
	background: #eef4f1;
}

.sixes-net-score {
	display: inline-block;
	min-width: 1.2em;
}

.handicap-dots {
	line-height: 1;
	position: absolute;
	right: 3px;
	top: 2px;
	white-space: nowrap;
}

.handicap-dots sup {
	color: #10251d;
	font-size: 0.46rem;
	line-height: 1;
	margin-left: 1px;
}

.plus-stroke {
	color: #10251d;
	font-size: 0.62rem;
	font-weight: 700;
}

.team-best-ball-row {
	background: #eef4f1;
	font-weight: 700;
}

.sixes-results-table .skin-won {
	background: #f4d35e;
	color: #1f2a24;
	font-weight: 700;
}

.sixes-results-table .greenie-won {
	background: #d9f4df;
	color: #173b24;
	font-weight: 700;
}

.birdie-score {
	align-items: center;
	border: 2px solid #1f2a24;
	border-radius: 50%;
	box-sizing: border-box;
	display: inline-flex;
	height: 1.8em;
	justify-content: center;
	line-height: 1;
	min-width: 1.8em;
	padding: 0;
	width: 1.8em;
}

.sixes-results-table small {
	color: #4a3512;
	display: block;
	font-size: 0.7rem;
	line-height: 1.1;
}

@media (min-width: 520px) {
	main {
		padding: 24px;
	}

	button,
	.button {
		width: auto;
	}

	.topbar {
		gap: 14px;
		padding: 12px 24px;
	}

	.topbar form {
		flex-basis: auto;
		margin-left: auto;
	}

	.topbar button {
		width: auto;
	}

	.score-grid {
		grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	}

	.action-row {
		align-items: center;
		flex-direction: row;
		justify-content: center;
	}

	.score-entry-list {
		margin: 0 auto;
		max-width: 720px;
	}
}
