/* Phone-first styles on top of Pico.css. */

/* --- Brand (SPEC 8, "Look and feel") ------------------------------------------------------------
	Harbour ink and spray green, after a gig's oars in the water. Pico's own colour variables are
	set from these, so its buttons, links and forms follow without extra rules. */
:root {
	--gp-ink: #0f2a3a; /* the header, and selected things in light mode */
	--gp-ink-2: #1d4659; /* sea: the disc in the mark, hover on the header */
	--gp-green: #6bd69b; /* spray green: main buttons, the mark, accents on dark */
	--gp-green-hover: #57c788;
	--gp-green-text: #137a4c; /* green that passes contrast on white, for links and text */
	--gp-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
	--gp-body: "Barlow", system-ui, "Segoe UI", Roboto, sans-serif;
	--gp-radius: 10px;
	--gp-tab-bar: 4.25rem;
}

:root:not([data-theme="dark"]),
[data-theme="light"] {
	--gp-page: #f3f7f5;
	--gp-surface: #ffffff;
	--gp-surface-2: #e9f1ed;
	--gp-line: #d4e0da;
	--gp-text: #15232c;
	--gp-muted: #52646d;
	--gp-link: var(--gp-green-text);
	--gp-select: var(--gp-ink); /* chosen day, chosen tab and the like */
	--gp-on-select: #ffffff;
	--gp-tint: #e1f5ea; /* your own seat, today */
	--gp-hull: var(--gp-ink); /* the outline of the seat diagram */
	--pico-background-color: var(--gp-page);
	--pico-color: var(--gp-text);
	--pico-h1-color: var(--gp-ink);
	--pico-h2-color: var(--gp-ink);
	--pico-h3-color: var(--gp-ink);
	--pico-h4-color: var(--gp-ink);
	--pico-muted-color: var(--gp-muted);
	--pico-muted-border-color: var(--gp-line);
	--pico-primary: var(--gp-green-text);
	--pico-primary-background: var(--gp-green);
	--pico-primary-border: var(--gp-green);
	--pico-primary-underline: rgb(19 122 76 / 0.45);
	--pico-primary-hover: #0d5c39;
	--pico-primary-hover-background: var(--gp-green-hover);
	--pico-primary-hover-border: var(--gp-green-hover);
	--pico-primary-hover-underline: #0d5c39;
	--pico-primary-focus: rgb(107 214 155 / 0.5);
	--pico-primary-inverse: var(--gp-ink);
	--pico-secondary: #52646d;
	--pico-secondary-background: #52646d;
	--pico-secondary-border: #52646d;
	--pico-secondary-inverse: #ffffff;
	--pico-secondary-hover: var(--gp-ink);
	--pico-secondary-hover-border: var(--gp-ink);
	--pico-contrast: var(--gp-ink);
	--pico-contrast-border: var(--gp-ink);
	--pico-card-background-color: var(--gp-surface);
	--pico-card-sectioning-background-color: var(--gp-surface-2);
	--pico-card-box-shadow: 0 1px 2px rgb(15 42 58 / 0.06), 0 0 0 1px var(--gp-line);
	--pico-form-element-background-color: var(--gp-surface);
	--pico-form-element-border-color: #b9c9c1;
	--pico-form-element-focus-color: var(--gp-green-text);
	--pico-switch-checked-background-color: var(--gp-green-text);
	--pico-table-border-color: var(--gp-line);
}

@media only screen and (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--gp-page: #0b1f2b;
		--gp-surface: #11293a;
		--gp-surface-2: #163345;
		--gp-line: #26465a;
		--gp-text: #e4eeea;
		--gp-muted: #9db3bc;
		--gp-link: var(--gp-green);
		--gp-select: var(--gp-green);
		--gp-on-select: var(--gp-ink);
		--gp-tint: #173f39;
		--gp-hull: #5e7d8f;
		--pico-background-color: var(--gp-page);
		--pico-color: var(--gp-text);
		--pico-h1-color: #f1f7f4;
		--pico-h2-color: #f1f7f4;
		--pico-h3-color: #f1f7f4;
		--pico-h4-color: #f1f7f4;
		--pico-muted-color: var(--gp-muted);
		--pico-muted-border-color: var(--gp-line);
		--pico-primary: var(--gp-green);
		--pico-primary-background: var(--gp-green);
		--pico-primary-border: var(--gp-green);
		--pico-primary-underline: rgb(107 214 155 / 0.5);
		--pico-primary-hover: #9be6bd;
		--pico-primary-hover-background: #8ee0b3;
		--pico-primary-hover-border: #8ee0b3;
		--pico-primary-hover-underline: #9be6bd;
		--pico-primary-focus: rgb(107 214 155 / 0.45);
		--pico-primary-inverse: var(--gp-ink);
		--pico-contrast: #f1f7f4;
		--pico-contrast-border: #f1f7f4;
		--pico-secondary: #a9bec6;
		--pico-secondary-background: #3c5a6b;
		--pico-secondary-border: #a9bec6;
		--pico-secondary-inverse: #ffffff;
		--pico-secondary-hover: #ffffff;
		--pico-secondary-hover-border: #ffffff;
		--pico-card-background-color: var(--gp-surface);
		--pico-card-sectioning-background-color: var(--gp-surface-2);
		--pico-card-box-shadow: 0 0 0 1px var(--gp-line);
		--pico-form-element-background-color: #0e2433;
		--pico-form-element-border-color: #34566b;
		--pico-form-element-focus-color: var(--gp-green);
		--pico-switch-checked-background-color: var(--gp-green);
		--pico-table-border-color: var(--gp-line);
	}
}

:root {
	--pico-font-family: var(--gp-body);
	--pico-font-family-sans-serif: var(--gp-body);
	--pico-border-radius: var(--gp-radius);
	--pico-font-weight: 400;
}

body {
	background: var(--gp-page);
}

h1,
h2,
h3,
h4 {
	font-family: var(--gp-display);
	font-weight: 700;
	letter-spacing: 0.005em;
	line-height: 1.1;
}

h1 {
	font-size: 2rem;
}

h2 {
	font-size: 1.5rem;
}

h3 {
	font-size: 1.25rem;
}

a {
	--pico-color: var(--gp-link);
}

:where(a, button, [role="button"], summary):focus-visible {
	outline: 3px solid var(--gp-green);
	outline-offset: 2px;
}

/* --- Header ----------------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--gp-ink);
	color: #ffffff;
	margin-bottom: 1.25rem;
	padding: env(safe-area-inset-top) 0 0;
}

.header-bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 3.5rem;
	padding-block: 0.25rem;
}

/* Pico spaces every nav <ul>; the header lays its own lists out. */
.site-header .header-bar ul {
	margin: 0;
	padding: 0;
}

.site-header .header-bar li {
	padding: 0;
	list-style: none;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-right: auto;
	min-width: 0;
}

.brand-home {
	display: flex;
	flex: none;
	border-radius: 8px;
}

.brand-mark {
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
}

.brand-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	line-height: 1.1;
}

.site-header a.brand-club {
	max-width: 100%;
	color: #ffffff;
	font-family: var(--gp-display);
	font-weight: 700;
	font-size: 1.3rem;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-header a.brand-app {
	color: var(--gp-green);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
}

.site-header a.brand-club:hover,
.site-header a.brand-app:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.main-nav {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.site-header .header-actions a,
.site-header .header-actions summary,
.site-header .link-button {
	color: #ffffff;
}

.header-new {
	display: none;
}

.site-header .header-new [role="button"] {
	margin: 0 0.5rem 0 0;
	padding: 0.45rem 1rem;
	color: var(--gp-ink);
	font-weight: 700;
	white-space: nowrap;
}

.club-stripe {
	height: 4px;
	background: linear-gradient(to right, var(--club-primary) 0 70%, var(--club-secondary) 70% 100%);
}

@media (min-width: 60rem) {
	.main-nav {
		display: flex;
		align-items: stretch;
		align-self: stretch;
		gap: 0.25rem;
	}

	.main-nav li {
		display: flex;
	}

	.site-header .main-nav a {
		display: flex;
		align-items: center;
		padding: 0 0.85rem;
		margin: 0;
		border-radius: 0;
		color: #c9d8df;
		text-decoration: none;
		font-weight: 700;
		box-shadow: inset 0 -3px 0 transparent;
	}

	.site-header .main-nav a:hover {
		color: #ffffff;
	}

	.site-header .main-nav a[aria-current="page"] {
		color: #ffffff;
		box-shadow: inset 0 -3px 0 var(--gp-green);
	}

	.header-new {
		display: block;
	}
}

/* --- Tab bar (phones and small tablets) ------------------------------------------------------- */

.tab-bar {
	position: fixed;
	inset: auto 0 0;
	z-index: 20;
	display: flex;
	justify-content: space-around;
	padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom));
	background: var(--gp-surface);
	border-top: 1px solid var(--gp-line);
	box-shadow: 0 -4px 16px rgb(15 42 58 / 0.06);
}

.tab-bar a {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	min-height: 3.5rem;
	padding: 0.25rem 0;
	border-radius: var(--gp-radius);
	color: var(--gp-muted);
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 700;
}

.tab-bar a[aria-current="page"] {
	color: var(--gp-link);
}

.tab-bar a[aria-current="page"] svg {
	stroke-width: 2.5;
}

.tab-book-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2rem;
	border-radius: 999px;
	background: var(--gp-green);
	color: var(--gp-ink);
}

.tab-bar a.tab-book {
	color: var(--gp-text);
}

main.has-tab-bar {
	padding-bottom: calc(var(--gp-tab-bar) + 1.5rem + env(safe-area-inset-bottom));
}

@media (min-width: 60rem) {
	.tab-bar {
		display: none;
	}

	main.has-tab-bar {
		padding-bottom: 2rem;
	}
}

.inline-form {
	margin: 0;
}

.link-button {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	width: auto;
	text-decoration: underline;
	cursor: pointer;
}

.narrow {
	max-width: 28rem;
	margin-inline: auto;
}

.club-logo {
	max-height: 4rem;
}

.login-mark {
	display: block;
	width: 4rem;
	height: 4rem;
	margin-bottom: 0.75rem;
}

button,
[role="button"],
input[type="submit"] {
	font-weight: 700;
}

.notice {
	padding: 0.75rem 1rem;
	border-radius: var(--pico-border-radius);
}

.notice-ok {
	background: #e6f4ea;
	color: #0d5323;
}

.notice-error {
	background: #fde8e8;
	color: #8a1c1c;
}

.badge {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	margin-right: 0.25rem;
	border-radius: 1rem;
	font-size: 0.8rem;
	background: var(--pico-secondary-background);
	color: var(--pico-secondary-inverse);
}

.badge-warn {
	background: #f9d65c;
	color: #000;
}

.status-pending {
	background: #f9d65c;
	color: #000;
}

.member-row {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	margin-bottom: 0.75rem;
}

.member-row small {
	display: block;
}

.row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.row-actions button {
	width: auto;
	margin: 0;
	min-height: 44px;
}

.site-footer {
	display: flex;
	gap: 1rem;
	padding-block: 2rem;
}

@media (min-width: 48rem) {
	.member-row {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

/* --- Admin ------------------------------------------------------------------------------ */

/* Members page: tabs, filters and the two-step confirm in a row. */
/* "nav.tabs" outranks Pico's nav rules, whose negative margins made the strip overflow. The
	underline is an inset shadow rather than a border, so nothing pokes out of the strip. It
	scrolls sideways only if the tabs ever outgrow a phone, without showing a scrollbar. */
nav.tabs ul {
	display: flex;
	gap: 0.25rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	box-shadow: inset 0 -2px 0 var(--pico-muted-border-color);
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
}

nav.tabs ul::-webkit-scrollbar {
	display: none;
}

nav.tabs li {
	margin: 0;
	padding: 0;
	list-style: none;
}

nav.tabs li a {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0.6rem 0.75rem;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: var(--pico-muted-color);
	text-decoration: none;
	white-space: nowrap;
}

nav.tabs li a[aria-current="page"] {
	border-bottom-color: var(--pico-primary);
	color: var(--pico-color);
	font-weight: 600;
}

.tab-count {
	padding: 0 0.45rem;
	border-radius: 1rem;
	font-size: 0.75rem;
	line-height: 1.3rem;
	background: var(--pico-secondary-background);
	color: var(--pico-secondary-inverse);
}

.tab-count-alert {
	background: #f9d65c;
	color: #000;
}

.member-filters {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 0.75rem;
}

.member-filters .filter-search {
	grid-column: 1 / -1;
}

.member-filters label {
	margin: 0;
}

.member-filters .filter-buttons {
	display: flex;
	gap: 0.5rem;
	grid-column: 1 / -1;
}

.member-filters .filter-buttons > * {
	width: auto;
}

/* With HTMX the list updates as you type, so the Filter button isn't needed. */
.htmx-ready .member-filters button[type="submit"] {
	display: none;
}

@media (min-width: 768px) {
	.member-filters {
		grid-template-columns: minmax(12rem, 1.5fr) repeat(4, minmax(9.5rem, 1fr));
		align-items: start;
	}

	.member-filters .filter-search {
		grid-column: auto;
	}
}

.result-count {
	margin-bottom: 0.5rem;
}

.member-row.is-confirming {
	border-left: 4px solid #b3261e;
}

.confirm-step {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	max-width: 30rem;
	margin: 0;
}

.confirm-step p {
	margin: 0;
}

.confirm-step label {
	margin: 0.25rem 0 0;
}

.confirm-step .row-actions {
	margin-top: 0.5rem;
}

.confirm-step [role="button"] {
	display: inline-flex;
	align-items: center;
	width: auto;
	min-height: 44px;
	margin: 0;
}

button.danger {
	background: #b3261e;
	border-color: #b3261e;
	color: #fff;
}

.row-manage {
	margin: 0;
}

.row-manage summary {
	min-height: 44px;
	display: flex;
	align-items: center;
	color: var(--pico-primary);
}

.row-manage[open] summary {
	margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
	.row-buttons {
		justify-content: flex-end;
		max-width: 60%;
	}

	.row-manage[open] .row-actions {
		justify-content: flex-end;
	}
}

.level-change {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
}

.level-change select {
	width: auto;
	margin: 0;
	min-height: 44px;
}

.badge-cox,
.tag-level {
	background: transparent;
	color: var(--gp-select);
	box-shadow: inset 0 0 0 1px var(--gp-select);
}

.hub {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.hub-card {
	display: flex;
	flex-direction: column;
	padding: 1rem;
	border: 1px solid var(--pico-muted-border-color);
	border-radius: var(--pico-border-radius);
	text-decoration: none;
}

.hub-card span {
	color: var(--pico-muted-color);
	font-size: 0.9rem;
}

.page-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.page-head [role="button"] {
	width: auto;
}

.resource-list {
	list-style: none;
	padding: 0;
}

.resource-item {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--pico-muted-border-color);
}

.resource-item small {
	display: block;
	color: var(--pico-muted-color);
}

.resource-item .inline-form {
	margin-left: auto;
}

.resource-text {
	flex: 1;
	text-decoration: none;
	color: inherit;
	min-height: 44px;
}

.resource-name {
	font-weight: 600;
	color: var(--pico-primary);
}

.retired .resource-name {
	text-decoration: line-through;
	color: var(--pico-muted-color);
}

.tile-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
}

.tile-list li {
	list-style: none;
}

.tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3rem;
	min-height: 3rem;
	padding: 0 0.75rem;
	border: 1px solid var(--pico-primary-border);
	border-radius: var(--pico-border-radius);
	font-weight: 700;
	text-decoration: none;
}

.tile.retired {
	border-style: dashed;
	color: var(--pico-muted-color);
	text-decoration: line-through;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.danger-zone {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--pico-muted-border-color);
}

button.small {
	padding: 0.25rem 0.75rem;
	font-size: 0.85rem;
	width: auto;
	margin: 0;
	min-height: 44px;
}

/* Two-colour stripe that identifies a boat; the name is always shown beside it. */
.boat-stripe {
	display: inline-flex;
	flex: none; /* never squeezed by a long boat name */
	flex-direction: column;
	width: 0.6rem;
	height: 1.6rem;
	border: 1px solid var(--pico-muted-border-color);
	border-radius: 3px;
	overflow: hidden;
}

.boat-stripe span {
	flex: 1;
}

.boat-stripe.large {
	width: 1rem;
	height: 2.5rem;
}

.boat-preview {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	font-weight: 600;
}

.with-unit {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.with-unit input {
	max-width: 8rem;
	margin: 0;
}

.temp-password {
	font-size: 1.1rem;
	user-select: all;
}

/* Saved note appears when the page URL ends in #saved after a redirect. */
.saved-note {
	display: none;
}

.saved-note:target {
	display: block;
}

.setup-bar {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: var(--pico-border-radius);
	background: var(--pico-card-sectioning-background-color);
}

.setup-bar p {
	margin-bottom: 0.5rem;
}

.setup-bar ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding-left: 1.25rem;
	font-size: 0.9rem;
}

.setup-bar li {
	list-style: decimal;
}

.setup-bar li[aria-current="step"] {
	font-weight: 700;
}

.setup-bar li.done {
	color: var(--pico-muted-color);
}

.setup-next {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--pico-muted-border-color);
}

.setup-next [role="button"],
.setup-next button {
	width: auto;
}

/* --- Tags and small text --------------------------------------------------------------------- */

.tag {
	display: inline-block;
	padding: 0 0.4rem;
	border-radius: 0.6rem;
	font-size: 0.75rem;
	line-height: 1.4rem;
	background: var(--pico-secondary-background);
	color: var(--pico-secondary-inverse);
	white-space: nowrap;
}

.tag-warn {
	background: #f9d65c;
	color: #000;
}

.tag-bad {
	background: #b3261e;
	color: #fff;
}

.tag-you {
	background: var(--gp-select);
	color: var(--gp-on-select);
}

.muted {
	color: var(--pico-muted-color);
}

/* --- Calendar ---------------------------------------------------------------------------------- */

.cal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.cal-head h1 {
	font-size: 1.75rem;
	margin: 0;
}

.cal-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0.75rem 0 1rem;
}

.cal-nav {
	display: flex;
	gap: 0.35rem;
}

.cal-nav a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.85rem;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-radius);
	background: var(--gp-surface);
	color: var(--gp-text);
	text-decoration: none;
	font-weight: 600;
}

.cal-nav a.nav-arrow {
	padding: 0;
}

.cal-nav a:hover {
	border-color: var(--gp-green-text);
	color: var(--gp-text);
}

.cal-nav a.nav-today[aria-current="date"] {
	color: var(--gp-muted);
}

.lane-filter {
	margin: 0 0 0 auto;
	flex: 1 1 12rem;
	max-width: 16rem;
}

.lane-filter select {
	margin: 0;
	height: 44px;
	padding-block: 0;
}

@media (max-width: 30rem) {
	.lane-filter {
		flex-basis: 100%;
		max-width: none;
		margin-left: 0;
	}
}

.week-strip {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.week-strip a {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.4rem 0;
	border-radius: var(--pico-border-radius);
	text-decoration: none;
	font-size: 0.8rem;
	min-height: 44px;
}

.week-strip a strong {
	font-size: 1.1rem;
}

.week-strip a[aria-current="date"] {
	background: var(--gp-select);
	color: var(--gp-on-select);
}

.week-strip a.is-today:not([aria-current]) {
	outline: 2px solid var(--gp-select);
}

.day-lane {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--pico-muted-border-color);
}

.lane-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	margin: 0 0 0.4rem;
	white-space: nowrap;
}

.lane-free {
	display: inline-block;
	font-size: 0.85rem;
	color: var(--pico-muted-color);
	padding: 0.25rem 0;
}

.ev {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.6rem 0.85rem;
	margin-bottom: 0.5rem;
	border: 1px solid var(--gp-line);
	border-left: 5px solid var(--gp-select);
	border-radius: var(--gp-radius);
	background: var(--gp-surface);
	color: var(--pico-color);
	text-decoration: none;
	font-size: 0.9rem;
}

.ev-time {
	font-family: var(--gp-display);
	font-size: 1.15rem;
	color: var(--gp-text);
}

.ev-name {
	font-weight: 700;
	color: var(--gp-text);
}

a.ev,
a.ev:hover {
	color: var(--pico-color);
}

a.ev:hover {
	border-color: var(--gp-green-text);
}

.ev-erg {
	border-left-color: #2e7d32;
}

.ev-oar_booking {
	border-left-color: #8a6d00;
}

.ev-mine {
	box-shadow: inset 0 0 0 2px var(--gp-select);
}



.ev-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	align-items: center;
	color: var(--pico-muted-color);
}

.week-grid-wrap {
	display: none;
	overflow-x: auto;
}

.week-grid {
	table-layout: fixed;
	min-width: 60rem;
}

.week-grid th,
.week-grid td {
	vertical-align: top;
	padding: 0.4rem;
	border: 1px solid var(--pico-muted-border-color);
}

.week-grid thead th {
	font-size: 0.85rem;
	text-align: center;
}

.week-grid tbody th {
	width: 9rem;
}

.week-grid .lane-title {
	font-weight: 600;
}

.week-grid .is-today {
	background: color-mix(in srgb, var(--gp-select) 8%, transparent);
}

.cell-add {
	display: block;
	text-align: center;
	color: var(--pico-muted-color);
	text-decoration: none;
	opacity: 0.4;
}

.week-grid td:hover .cell-add {
	opacity: 1;
}

@media (min-width: 64rem) {
	.week-grid-wrap {
		display: block;
	}

	.day-view {
		display: none;
	}
}

/* --- Event page -------------------------------------------------------------------------------- */

.event-head h1 {
	margin-bottom: 0.25rem;
}

.event-kind {
	margin: 0;
	color: var(--pico-muted-color);
	font-size: 0.9rem;
}

.event-when {
	font-weight: 600;
}

.event-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.event-head [role="button"] {
	width: auto;
}

.event-facts {
	/* Also used for the details on a member's page. */
	display: grid;
	gap: 0.25rem 1rem;
	grid-template-columns: max-content 1fr;
}

.event-facts div {
	display: contents;
}

.event-facts dt {
	font-weight: 600;
}

.event-facts dd {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

/* The seat diagram: a gig drawn bow (top) to stern (bottom), outlined in one plain colour. The pointed
	bow is drawn above the list: an ogive in the boat colour with a slightly smaller one in the
	surface colour on top, which leaves an outline. */
.gig {
	--boat: var(--gp-hull);
	--hull: 3px;
	--bow: 6rem;
	position: relative;
	list-style: none;
	padding: 0.25rem 0.75rem 1rem;
	margin: var(--bow) 0 1.5rem;
	background: var(--gp-surface);
	border: var(--hull) solid var(--boat);
	border-top: none;
	border-radius: 0 0 2.5rem 2.5rem / 0 0 2rem 2rem;
}

.gig:not(.erg-list)::before,
.gig:not(.erg-list)::after {
	content: "";
	position: absolute;
	bottom: 100%;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C0 55 28 22 50 0C72 22 100 55 100 100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100C0 55 28 22 50 0C72 22 100 55 100 100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* The bow's height follows the boat's width, so the point keeps its shape on any screen. */
.event-crew {
	container-type: inline-size;
}

@supports (width: 1cqw) {
	.event-crew .gig {
		--bow: min(44cqw, 12rem);
	}
}

.gig:not(.erg-list)::before {
	left: calc(-1 * var(--hull));
	right: calc(-1 * var(--hull));
	height: var(--bow);
	background: var(--boat);
}

.gig:not(.erg-list)::after {
	left: 0;
	right: 0;
	height: calc(var(--bow) - var(--hull) * 2);
	background: var(--gp-surface);
}

.gig.erg-list {
	margin-top: 0;
	border-top: var(--hull) solid var(--boat);
	border-radius: var(--pico-border-radius);
	padding-top: 0.75rem;
}

.seat {
	list-style: none;
	display: grid;
	grid-template-columns: 4.75rem minmax(0, 1fr) auto;
	grid-template-areas: "label person actions";
	gap: 0.25rem 0.5rem;
	align-items: center;
	min-height: 3.25rem;
	padding: 0.35rem 0.5rem;
	border-bottom: 1px solid var(--gp-line);
}

.seat:last-child {
	border-bottom: none;
}

.seat-label {
	grid-area: label;
	font-size: 0.85rem;
	color: var(--pico-muted-color);
}

.seat-person {
	grid-area: person;
	font-weight: 600;
}

.seat-empty {
	font-weight: 400;
	color: var(--pico-muted-color);
	font-style: italic;
}

.seat-actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.4rem;
	align-items: center;
}

.seat-label {
	font-variant-numeric: tabular-nums;
}

.seat-actions:empty {
	display: none;
}

.seat.is-me {
	background: var(--gp-tint);
	border-radius: 8px;
}

.seat-cox {
	border-top: 2px solid var(--pico-muted-border-color);
}

.promote select {
	margin: 0;
	min-width: 10rem;
}

.reserves {
	padding-left: 1.25rem;
}

.reserves li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem;
	padding: 0.4rem 0;
}

.promote {
	display: flex;
	gap: 0.4rem;
	margin: 0;
}

.reserve-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

@media (min-width: 48rem) {
	.seat {
		grid-template-columns: 6rem minmax(0, 1fr) auto;
	}
}

/* --- Event form -------------------------------------------------------------------------------- */

.type-choice {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.type-choice legend {
	width: 100%;
}

.oar-only {
	display: none;
}

/* On a phone: the date across the top, then start and end side by side. Oar bookings
	pair each date with its time instead. */
@media (max-width: 767px) {
	.event-form .grid.when {
		grid-template-columns: 1fr 1fr;
		column-gap: 1rem;
		row-gap: 0;
	}

	.event-form .grid.when > label:first-child {
		grid-column: 1 / -1;
	}

	.event-form.type-oar_booking .grid.when > label:first-child,
	.event-form:has(input[name="type"][value="oar_booking"]:checked) .grid.when > label:first-child {
		grid-column: auto;
	}
}

.event-form.type-oar_booking .oar-only,
.event-form:has(input[name="type"][value="oar_booking"]:checked) .oar-only {
	display: block;
}

.event-form.type-oar_booking .not-oar,
.event-form:has(input[name="type"][value="oar_booking"]:checked) .not-oar,
.event-form:not(.type-row) .row-only,
.event-form:has(input[name="type"]:not([value="row"]):checked) .row-only {
	display: none;
}

.event-form:has(input[name="type"][value="row"]:checked) .row-only {
	display: block;
}

.tile-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.tile-actions {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.tile-actions button {
	width: auto;
	margin: 0;
	padding: 0.3rem 0.75rem;
	font-size: 0.85rem;
}

.tile-check {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-width: 3.5rem;
	min-height: 44px;
	padding: 0 0.75rem;
	border: 1px solid var(--pico-primary-border);
	border-radius: var(--pico-border-radius);
	font-weight: 700;
}

.tile-check input {
	margin: 0;
}

.tile-check.busy {
	opacity: 0.45;
	border-style: dashed;
}

.tile-group-label {
	margin: 0.5rem 0 0.25rem;
	font-size: 0.85rem;
	color: var(--pico-muted-color);
}

/* --- Notifications ----------------------------------------------------------------------------- */

.bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

.bell-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 1.2rem;
	padding: 0 0.3rem;
	border-radius: 0.6rem;
	background: #f9d65c;
	color: #000;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2rem;
	text-align: center;
}

.notes {
	list-style: none;
	padding: 0;
}

.note {
	list-style: none;
	border-bottom: 1px solid var(--pico-muted-border-color);
}

.note a {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.75rem 0.5rem;
	color: var(--pico-color);
	text-decoration: none;
}

.note.unread {
	background: color-mix(in srgb, var(--gp-select) 7%, transparent);
	border-left: 4px solid var(--gp-select);
}

.note.unread .note-message {
	font-weight: 600;
}

/* --- Series ---------------------------------------------------------------------------------- */

.event-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: var(--pico-spacing);
}

.event-buttons [role="button"] {
	width: auto;
}

.series-weeks {
	display: grid;
	gap: 0.25rem;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.ev-date {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--pico-muted-color);
}

/* --- Cancelled ------------------------------------------------------------------------------ */

.ev-cancelled {
	opacity: 0.7;
	border-left-color: #b3261e;
}

.ev-cancelled .ev-name,
.ev-cancelled .ev-time {
	text-decoration: line-through;
}

.event-head.is-cancelled h1 {
	text-decoration: line-through;
}

.cancelled-banner {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.75rem 1rem;
	margin: 0.75rem 0;
	border-left: 4px solid #b3261e;
	border-radius: 4px;
	background: #fde8e8;
	color: #5c1010;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.chips .chip {
	width: auto;
	margin: 0;
	min-height: 44px;
	padding: 0.25rem 0.9rem;
	border-radius: 1.5rem;
}

/* --- Header menu ------------------------------------------------------------------------------ */

.site-header nav .site-menu {
	position: relative;
	margin: 0;
}

.site-header nav .site-menu summary {
	color: #ffffff;
	list-style: none;
	cursor: pointer;
	min-height: 44px;
	display: flex;
	align-items: center;
	padding: 0 0.25rem;
	font-weight: 600;
}

.site-header nav .site-menu summary::-webkit-details-marker {
	display: none;
}

.site-header nav .site-menu summary::after {
	content: "▾";
	margin-left: 0.3rem;
	background: none;
	transform: none;
	width: auto;
	height: auto;
	float: none;
}

.site-header nav .site-menu > ul {
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 10;
	display: block;
	min-width: 13rem;
	margin: 0.25rem 0 0;
	padding: 0.5rem 0;
	border-radius: var(--pico-border-radius);
	background: var(--gp-surface);
	border: 1px solid var(--gp-line);
	box-shadow: 0 10px 30px rgb(15 42 58 / 0.18);
}

.site-header nav .site-menu > ul .menu-who {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.25rem;
	padding-right: 1rem;
	border-bottom: 1px solid var(--gp-line);
}

.site-header nav .site-menu > ul .menu-who a {
	width: auto;
	text-decoration: none;
	flex: 1;
	min-width: 0;
	color: var(--gp-text);
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.site-header nav .site-menu > ul .menu-who a:hover,
.site-header nav .site-menu > ul .menu-who a:focus-visible {
	color: var(--gp-link);
	background: var(--gp-surface-2);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.menu-role {
	flex: none;
	padding: 0.05rem 0.5rem;
	border-radius: 999px;
	background: var(--gp-ink);
	color: var(--gp-green);
	font-size: 0.75rem;
	font-weight: 700;
}

.site-header nav .site-menu > ul li {
	display: block;
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--pico-primary);
}

.site-header nav .site-menu > ul a,
.site-header nav .site-menu > ul .link-button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.65rem 1rem;
	border-radius: 0;
	color: inherit;
	text-align: left;
	text-decoration: none;
	font-size: 1rem;
}

.site-header nav .site-menu > ul a:hover,
.site-header nav .site-menu > ul .link-button:hover {
	background: var(--pico-card-sectioning-background-color);
}

/* --- My rows, history, needs a cox ------------------------------------------------------------ */

.my-day h2 {
	font-size: 1rem;
	margin: 1.25rem 0 0.5rem;
}

.past {
	margin-top: 2rem;
}

.history-filters {
	margin-bottom: 1rem;
}

.filter-buttons {
	display: flex;
	gap: 0.5rem;
}

.filter-buttons button,
.filter-buttons [role="button"] {
	width: auto;
}

.history-entry {
	padding: 0.75rem 1rem;
	margin-bottom: 0.75rem;
}

.history-entry header {
	margin: 0 0 0.4rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.history-title {
	font-weight: 700;
}

.history-entry.is-cancelled .history-title {
	text-decoration: line-through;
}

.history-reason {
	color: #8a1c1c;
	margin-bottom: 0.4rem;
}

.history-crew {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 0.1rem 1rem;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
}

.history-crew li {
	list-style: none;
}

.history-crew span {
	color: var(--pico-muted-color);
	display: inline-block;
	min-width: 4.5rem;
}

.pager {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 1.5rem 0;
}

.needs-cox-list {
	padding: 0;
}

.needs-cox-item {
	list-style: none;
	padding-bottom: 0.75rem;
	margin-bottom: 0.75rem;
	border-bottom: 1px solid var(--pico-muted-border-color);
}

.needs-cox-item form button {
	width: auto;
}

/* --- Event history -------------------------------------------------------------------------- */

.event-history {
	margin-top: 2rem;
}

.event-history summary h2 {
	display: inline;
	font-size: 1.25rem;
	margin: 0;
}

.history-list {
	margin: 0.75rem 0;
	padding: 0;
	list-style: none;
}

.history-list li {
	display: grid;
	grid-template-columns: 9.5rem 1fr;
	gap: 0 0.75rem;
	padding: 0.4rem 0;
	border-bottom: 1px dashed var(--pico-muted-border-color);
	list-style: none;
}

.history-list time {
	color: var(--pico-muted-color);
	font-size: 0.9rem;
}

@media (max-width: 480px) {
	.history-list li {
		grid-template-columns: 1fr;
	}
}

/* --- Installed app (SPEC 8) ---------------------------------------------------------------- */

/* Once installed, "Install app" isn't needed. */
@media (display-mode: standalone) {
	.install-link,
	.install-link-inline {
		display: none;
	}
}

.installed-note {
	display: none;
}

@media (display-mode: standalone) {
	.installed-note {
		display: block;
	}
}

.install-page header,
.offline-page {
	text-align: center;
}

.install-icon,
.offline-page img {
	border-radius: 22%;
	margin-bottom: 0.5rem;
}

.offline-page {
	padding-top: 4rem;
}

.install-page section {
	margin-top: 1.5rem;
}

#install-now {
	text-align: center;
	margin: 1rem 0;
}

#install-now button {
	width: auto;
}

/* --- Week / Day switch --------------------------------------------------------------------- */

.view-switch {
	display: inline-flex;
	background: var(--gp-surface);
	border: 1px solid var(--gp-line);
	border-radius: 999px;
	padding: 3px;
	gap: 2px;
}

.view-switch a {
	padding: 0.35rem 1.1rem;
	font-weight: 600;
	border-radius: 999px;
	text-decoration: none;
	color: var(--pico-muted-color);
	min-height: 36px;
	display: inline-flex;
	align-items: center;
}

.view-switch a[aria-current="page"] {
	background: var(--gp-select);
	color: var(--gp-on-select);
	font-weight: 700;
}

/* --- Day view (SPEC 8, screen 2a) ---------------------------------------------------------- */

.day-strip {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.strip-arrow {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--pico-muted-border-color);
	border-radius: 10px;
	color: inherit;
}

.strip-days {
	flex: 1;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.35rem;
}

.strip-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.35rem 0;
	border-radius: 10px;
	border: 1px solid var(--pico-muted-border-color);
	text-decoration: none;
	color: inherit; /* Pico turns --pico-color into the link colour inside links */
	line-height: 1.15;
}

.strip-dow {
	font-size: 0.8rem;
	font-weight: 600;
}

.strip-num {
	font-size: 1.35rem;
}

.strip-count {
	font-size: 0.75rem;
	color: var(--pico-muted-color);
}

.strip-day.is-today {
	border-color: var(--pico-primary);
}

.strip-day[aria-current="date"] {
	background: var(--gp-select);
	border-color: var(--gp-select);
	color: var(--gp-on-select);
}

.strip-day[aria-current="date"] .strip-count {
	color: inherit;
}

.day-summary {
	color: var(--pico-muted-color);
	margin-bottom: 1rem;
}

.day-empty {
	text-align: center;
	padding: 2.5rem 1rem;
	border: 1px dashed var(--pico-muted-border-color);
	border-radius: 14px;
	color: var(--pico-muted-color);
}

.day-empty [role="button"] {
	width: auto;
}

/* Timeline: computers and tablets. Hour-by-hour list: phones. */
.timeline,
.day-cards {
	display: none;
}

@media (min-width: 48rem) {
	.timeline {
		display: block;
	}

	.day-cards {
		display: grid;
	}

	.day-hours {
		display: none;
	}
}

.timeline {
	border: 1px solid var(--pico-muted-border-color);
	border-radius: 14px;
	padding: 1rem 1rem 0.75rem;
	margin-bottom: 1.5rem;
	background: var(--pico-card-background-color);
}

.timeline-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 0.75rem;
}

.timeline-head h2 {
	margin: 0;
	font-size: 1.25rem;
}

.timeline-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	font-size: 0.8rem;
	color: var(--pico-muted-color);
}

.timeline-legend > span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.key {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 4px;
}

.key-full {
	background: #137a4c;
}

.key-open {
	background: #fbe9db;
	border: 1.5px solid #d98a3d;
}

.timeline-scroll {
	overflow-x: auto;
}

.timeline-inner {
	min-width: 760px;
}

.tl-row {
	display: flex;
	border-top: 1px solid var(--pico-muted-border-color);
}

.tl-row.tl-axis {
	border-top: none;
}

.tl-label {
	flex: 0 0 9rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.4rem 0.75rem 0.4rem 0;
	min-width: 0;
}

.tl-lane-name {
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tl-lane-count {
	font-size: 0.75rem;
	color: var(--pico-muted-color);
}

.tl-book {
	font-size: 0.75rem;
	align-self: flex-start;
}

.tl-ticks {
	flex: 1;
	position: relative;
	height: 1.6rem;
	margin-right: 0.5rem;
}

.tl-tick,
.tl-now-label {
	position: absolute;
	top: 0;
	font-size: 0.75rem;
	color: var(--pico-muted-color);
	white-space: nowrap;
	transform: translateX(-50%);
}

.tl-tick-start {
	transform: none;
}

.tl-tick-end {
	transform: translateX(-100%);
}

.tl-now-label {
	top: auto;
	bottom: -0.15rem;
	color: #b3261e;
	font-weight: 600;
	background: var(--pico-card-background-color);
	padding: 0 0.25rem;
	z-index: 2;
}

.tl-track {
	flex: 1;
	position: relative;
	margin-right: 0.5rem;
	background-image: repeating-linear-gradient(
		to right,
		var(--pico-muted-border-color) 0,
		var(--pico-muted-border-color) 1px,
		transparent 1px,
		transparent var(--hour)
	);
}

.tl-block {
	position: absolute;
	height: 64px;
	box-sizing: border-box;
	border-radius: 10px;
	padding: 0.35rem 0.6rem;
	display: flex;
	flex-direction: column;
	gap: 1px;
	overflow: hidden;
	text-decoration: none;
	z-index: 1;
	min-width: 1.5rem;
	/* Pixel sizes: the block is a fixed 64px tall, and Pico's root font grows to 131% on wide
	   screens, which squeezed the three lines on top of each other. */
	line-height: 1.25;
}

.tl-block > * {
	flex-shrink: 0;
}

.tl-block:hover {
	filter: brightness(0.95);
}

.tl-title {
	font-weight: 700;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tl-meta {
	font-size: 11.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tl-dots {
	display: flex;
	gap: 3px;
	margin-top: 2px;
}

.tl-full {
	background: #137a4c;
	color: #ffffff;
}

.tl-open {
	background: #fbe9db;
	color: #6e2f0c;
	border: 1.5px solid #d98a3d;
}

.tl-oars {
	background: #e3eef6;
	color: #1f3b57;
	border: 1.5px solid #6c9bc2;
}

.tl-cancelled {
	background: transparent;
	color: var(--pico-muted-color);
	border: 1.5px dashed var(--pico-muted-border-color);
}

.tl-cancelled .tl-title {
	text-decoration: line-through;
}

.tl-mine {
	box-shadow: 0 0 0 2px var(--gp-select);
}

.tl-now {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #b3261e;
	z-index: 2;
	pointer-events: none;
}

.dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	box-sizing: border-box;
}

.dot-cox-on,
.dot-cox-off {
	border-radius: 2px;
	margin-left: 4px;
}

.timeline-legend .dot {
	background: var(--pico-muted-color);
}

.tl-full .dot-on,
.tl-full .dot-cox-on {
	background: #ffffff;
}

.tl-open .dot-on,
.tl-open .dot-cox-on {
	background: #a3470f;
}

.tl-open .dot-off,
.tl-open .dot-cox-off {
	border: 1.5px solid #d98a3d;
}

.tl-cancelled .dot-on,
.tl-cancelled .dot-cox-on {
	background: var(--pico-muted-color);
}

.tl-cancelled .dot-off,
.tl-cancelled .dot-cox-off {
	border: 1.5px solid var(--pico-muted-border-color);
}

/* Booking cards: a grid under the timeline, and the items of the phone's hourly list. */
.day-cards {
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1rem;
}

.day-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--pico-muted-border-color);
	border-radius: 14px;
	background: var(--pico-card-background-color);
	color: inherit; /* Pico turns --pico-color into the link colour inside links */
	text-decoration: none;
}

.day-card:hover {
	border-color: var(--pico-primary);
}

.day-card.is-mine {
	border-color: var(--gp-select);
	box-shadow: inset 4px 0 0 var(--gp-select);
}

.day-card-top,
.day-card-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}

.day-card-time {
	font-size: 1.25rem;
	font-weight: 700;
}

.day-card-duration {
	flex: none;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background: var(--pico-secondary-background);
	color: var(--pico-secondary-inverse);
	font-size: 0.8rem;
	font-weight: 600;
}

.day-card-name {
	font-weight: 600;
	font-size: 1.05rem;
}

.day-card-where,
.day-card-cox {
	color: var(--pico-muted-color);
	font-size: 0.9rem;
}

.day-card-cox.is-missing {
	color: #a3470f;
	font-weight: 600;
}

.day-card-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--pico-muted-border-color);
	overflow: hidden;
}

.day-card-bar span {
	display: block;
	height: 100%;
	background: #137a4c;
}

.day-card-open .day-card-bar span {
	background: #d98a3d;
}

.day-card-status {
	font-size: 0.9rem;
	font-weight: 600;
}

.day-card-open .day-card-status {
	color: #a3470f;
}

.day-card-full .day-card-status {
	color: #137a4c;
}

.day-card-cancelled {
	opacity: 0.7;
}

.day-card-cancelled .day-card-name {
	text-decoration: line-through;
}

/* Phone: the day hour by hour. Empty hours stay slim so the busy ones stand out. */
.day-hours {
	border-top: 1px solid var(--pico-muted-border-color);
}

.hour-slot {
	display: grid;
	grid-template-columns: 3.75rem 1fr;
	gap: 0.75rem;
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--pico-muted-border-color);
	min-height: 2.25rem;
}

.hour-slot.has-items {
	padding: 0.6rem 0;
}

.hour-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pico-muted-color);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	align-items: flex-start;
}

.hour-slot.has-items .hour-label {
	color: var(--pico-color);
}

.hour-slot.is-now {
	box-shadow: inset 3px 0 0 #b3261e;
	padding-left: 0.5rem;
}

.hour-items {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	min-width: 0;
}

/* Dark mode: keep the coloured blocks readable on a dark page. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tl-oars {
		background: #1f3b57;
		color: #e3eef6;
	}

	:root:not([data-theme="light"]) .day-card-open .day-card-status,
	:root:not([data-theme="light"]) .day-card-cox.is-missing {
		color: #f0a868;
	}

	:root:not([data-theme="light"]) .day-card-full .day-card-status {
		color: #5fc4b5;
	}
}

/* On water / Off water / Oars on the Week and Day views */
nav.view-tabs ul {
	margin: 0.25rem 0 1rem;
}

/* Compact week pills, in the Day view's colours (.tl-full, .tl-open, ...). Pixel sizes so a
   busy day stays tidy whatever Pico does to the root font on wide screens. */
.wk-pill {
	display: flex;
	flex-direction: column;
	gap: 3px;
	box-sizing: border-box;
	margin-bottom: 4px;
	padding: 4px 6px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.25;
	text-decoration: none;
	overflow: hidden;
}

.wk-pill:hover {
	filter: brightness(0.95);
	text-decoration: none;
}

.wk-pill.tl-full,
.wk-pill.tl-full:hover {
	color: #ffffff;
}

.wk-pill.tl-open,
.wk-pill.tl-open:hover {
	color: #6e2f0c;
}

.wk-pill.tl-oars,
.wk-pill.tl-oars:hover {
	color: #1f3b57;
}

.wk-pill.tl-cancelled,
.wk-pill.tl-cancelled:hover {
	color: var(--pico-muted-color);
}

.wk-line {
	display: flex;
	gap: 4px;
	min-width: 0;
	white-space: nowrap;
}

.wk-time {
	font-weight: 700;
	flex-shrink: 0;
}

.wk-name {
	overflow: hidden;
	text-overflow: ellipsis;
}

.tl-cancelled .wk-name {
	text-decoration: line-through;
}

.wk-sub {
	font-size: 11px;
	opacity: 0.8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wk-pill .tl-dots {
	flex-wrap: wrap;
	margin-top: 0;
}

/* The pop-up card: the Day view's card with tags and buttons, in the middle of the screen. */
.wk-pop {
	width: min(22rem, calc(100vw - 2rem));
	padding: 0.75rem;
	border: 1px solid var(--pico-muted-border-color);
	border-radius: 14px;
	background: var(--pico-background-color);
	color: var(--pico-color);
	box-shadow: 0 12px 32px rgb(0 0 0 / 0.35);
}

.wk-pop::backdrop {
	background: rgb(0 0 0 / 0.35);
}

.wk-pop .day-card {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
}

.week-legend {
	justify-content: flex-end;
	margin-bottom: 0.5rem;
}

.wk-pop-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0.5rem 0 0;
}

.wk-pop-desc {
	flex-basis: 100%;
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	color: var(--pico-muted-color);
}

.wk-pop-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.wk-pop-actions > * {
	width: auto;
	margin: 0;
	padding: 0.4rem 1rem;
}

/* --- Sun and tides on the Day view ------------------------------------------------------------ */

.day-conditions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 1rem;
}

.cond {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3rem;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.85rem;
	background: var(--pico-card-sectioning-background-color);
	border: 1px solid var(--pico-muted-border-color);
	white-space: nowrap;
}

.cond-sun {
	border-color: #e0a33a;
}

.cond-high {
	border-color: #2f7fbf;
}

.cond-low {
	border-color: #8fb4d4;
	border-style: dashed;
}

.cond-light {
	color: var(--pico-muted-color);
}

.cond-source {
	flex-basis: 100%;
	font-size: 0.75rem;
	color: var(--pico-muted-color);
}

.day-conditions-hint {
	font-size: 0.85rem;
}

/* Darkness and twilight behind the bookings, and high/low water lines. */
.tl-shade {
	position: absolute;
	top: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 0;
}

.tl-shade-night {
	background: rgb(20 30 60 / 0.16);
}

.tl-shade-twilight {
	background: rgb(20 30 60 / 0.07);
}

.tl-tide {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 2px dashed #2f7fbf;
	opacity: 0.7;
	pointer-events: none;
	z-index: 0;
}

.tl-tide-low {
	border-left-color: #8fb4d4;
}

.tl-ticks.has-marks {
	height: 2.9rem;
}

.tl-tide-label {
	position: absolute;
	bottom: 0;
	transform: translateX(-50%);
	font-size: 11px;
	line-height: 1.3;
	padding: 0 4px;
	border-radius: 4px;
	white-space: nowrap;
	background: #2f7fbf;
	color: #ffffff;
}

.tl-tide-label.tl-tide-low {
	background: #dceaf6;
	color: #1f3b57;
}

.key-night,
.key-twilight {
	border: 1px solid var(--pico-muted-border-color);
}

.key-night {
	background: rgb(20 30 60 / 0.3);
}

.key-twilight {
	background: rgb(20 30 60 / 0.12);
}

.tl-dots {
	overflow: hidden;
}

.tl-dots .dot {
	flex-shrink: 0;
}

.key-tide {
	width: 0;
	border-left: 2px dashed #2f7fbf;
	border-radius: 0;
}

.hour-note {
	margin: 0;
	font-size: 0.8rem;
	color: var(--pico-muted-color);
}

.hour-slot.is-dark {
	background: rgb(20 30 60 / 0.08);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tl-shade-night {
		background: rgb(0 0 0 / 0.35);
	}

	:root:not([data-theme="light"]) .tl-shade-twilight {
		background: rgb(0 0 0 / 0.18);
	}

	:root:not([data-theme="light"]) .hour-slot.is-dark {
		background: rgb(0 0 0 / 0.25);
	}

	:root:not([data-theme="light"]) .key-night {
		background: rgb(0 0 0 / 0.6);
	}

	:root:not([data-theme="light"]) .key-twilight {
		background: rgb(0 0 0 / 0.3);
	}
}

/* Club profile: position and place lookup */
.notice-warn {
	background: #fff4d6;
	color: #6b4e00;
}

.club-position .place-lookup {
	width: auto;
	padding: 0.35rem 0.9rem;
	font-size: 0.85rem;
}

.place-list {
	padding: 0;
	margin: 0.75rem 0;
}

.place-list li {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
}

.place-list button {
	width: auto;
	margin: 0;
	padding: 0.25rem 0.75rem;
	font-size: 0.85rem;
}

/* --- Week agenda (phones) ---------------------------------------------------------------------- */

.agenda {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.agenda-date {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
}

.agenda-date > a:first-child {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	min-height: 44px;
	align-items: center;
	color: var(--gp-text);
	text-decoration: none;
}

.agenda-num {
	font-size: 1.5rem;
}

.agenda-dow {
	color: var(--gp-muted);
}

.agenda-day.is-today .agenda-dow,
.agenda-day.is-today .agenda-num {
	color: var(--gp-link);
}

.agenda-day.is-past {
	opacity: 0.6;
}

.tag-today {
	background: var(--gp-green);
	color: var(--gp-ink);
	font-family: var(--gp-body);
	font-weight: 700;
}

.agenda-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--gp-radius);
	color: var(--gp-link);
}

.agenda-add:hover {
	background: var(--gp-surface-2);
}

.agenda-empty {
	margin: 0;
	padding: 0.6rem 0.9rem;
	border: 1px dashed var(--gp-line);
	border-radius: var(--gp-radius);
	color: var(--gp-muted);
	font-size: 0.9rem;
}

.agenda-item {
	display: grid;
	grid-template-columns: 3.5rem 1fr;
	gap: 0.75rem;
	padding: 0.75rem 0.9rem;
	margin-bottom: 0.5rem;
	border: 1px solid var(--gp-line);
	border-left-width: 5px;
	border-radius: var(--gp-radius);
	background: var(--gp-surface);
	color: var(--gp-text);
	text-decoration: none;
}

a.agenda-item:hover {
	color: var(--gp-text);
	border-color: var(--gp-green-text);
}

.agenda-item.tl-full {
	border-left-color: #137a4c;
}

.agenda-item.tl-open {
	border-left-color: #d98a3d;
}

.agenda-item.tl-oars {
	border-left-color: #2f7fbf;
}

.agenda-item.tl-cancelled {
	border-left-style: dashed;
	opacity: 0.75;
}

.agenda-item.tl-cancelled .agenda-name {
	text-decoration: line-through;
}

.agenda-item.is-mine {
	background: var(--gp-tint);
}

.agenda-time {
	display: flex;
	flex-direction: column;
	font-family: var(--gp-display);
	line-height: 1.1;
}

.agenda-time strong {
	font-size: 1.3rem;
}

.agenda-time span {
	color: var(--gp-muted);
	font-weight: 600;
}

.agenda-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.agenda-name {
	font-weight: 700;
	font-size: 1.05rem;
}

.agenda-where {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--gp-muted);
	font-size: 0.9rem;
}

.agenda-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem 0.5rem;
	margin-top: 0.2rem;
	font-size: 0.85rem;
}

.agenda-meta .tl-dots {
	display: inline-flex;
	gap: 3px;
}

.agenda-item.tl-full .dot-on,
.agenda-item.tl-full .dot-cox-on {
	background: #137a4c;
}

.agenda-status {
	font-weight: 700;
}

.agenda-item.tl-full .agenda-status {
	color: #137a4c;
}

.agenda-item.tl-open .agenda-status {
	color: #a3470f;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .agenda-item.tl-full .agenda-status {
		color: var(--gp-green);
	}

	:root:not([data-theme="light"]) .agenda-item.tl-full .dot-on,
	:root:not([data-theme="light"]) .agenda-item.tl-full .dot-cox-on {
		background: var(--gp-green);
	}

	:root:not([data-theme="light"]) .agenda-item.tl-open .agenda-status {
		color: #f0a868;
	}
}

@media (min-width: 64rem) {
	.agenda {
		display: none;
	}
}

/* --- Event page layout ------------------------------------------------------------------------- */

.event-layout {
	display: flex;
	flex-direction: column;
}

.event-back {
	margin-bottom: 0.75rem;
}

.event-back a {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.event-head h1 {
	font-size: 2.25rem;
	margin: 0.15rem 0 0.35rem;
}

.event-head .event-kind {
	margin: 0;
}

.event-head {
	margin-bottom: 1rem;
}

.event-when {
	font-size: 1.1rem;
}

.event-info {
	margin-bottom: 1.5rem;
}

.event-facts {
	padding: 1rem 1.1rem;
	gap: 0.5rem 1.25rem;
	border-radius: var(--gp-radius);
	background: var(--gp-surface);
	border: 1px solid var(--gp-line);
}

.event-facts dt {
	color: var(--gp-muted);
	font-weight: 600;
}

.event-description {
	margin-top: 1rem;
	white-space: pre-line;
}

.event-manage {
	margin: 0 0 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--gp-line);
}

.event-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.event-buttons [role="button"],
.event-buttons button {
	width: auto;
	margin: 0;
	padding: 0.5rem 1rem;
	font-size: 0.95rem;
}

.crew h2 small {
	color: var(--gp-muted);
	font-family: var(--gp-body);
	font-weight: 600;
	font-size: 1rem;
	margin-left: 0.25rem;
}

/* Small buttons on seats: solid green to take a seat, quiet outlines for the rest. */
.seat-actions button.small,
.reserves button.small {
	min-height: 40px;
	padding: 0.3rem 0.85rem;
	font-weight: 700;
	white-space: nowrap;
}

@media (min-width: 64rem) {
	.event-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
		grid-template-areas:
			"back crew"
			"head crew"
			"info crew"
			"manage crew"
			"log crew"
			". crew";
		grid-template-rows: auto auto auto auto auto 1fr;
		column-gap: 3rem;
		align-items: start;
	}

	.event-back {
		grid-area: back;
	}

	.event-head {
		grid-area: head;
	}

	.event-info {
		grid-area: info;
	}

	.event-crew {
		grid-area: crew;
		position: sticky;
		top: 5rem;
	}

	.event-manage {
		grid-area: manage;
	}

	.event-log {
		grid-area: log;
	}

	/* Notices sit with the details on the left. */
	.event-layout > .notice {
		grid-column: 1;
	}
}

/* --- Seats on alternating sides ------------------------------------------------------------------
	A gig is narrow: the diagram is at most 20rem wide, centred. Each rower sits to one side,
	opposite their oar (the stroke's oar is to starboard, then they alternate), as in Rowter's
	diagram; the oars aren't drawn. The seat's label and name sit on the rower's side; its buttons
	are on the other side and only appear on hover, or when the seat is tapped or focused. */
.gig:not(.erg-list) {
	--gig-width: 20rem;
	--side: 1.6rem; /* how far a thwart sits off the centre line */
	width: min(var(--gig-width), 100%);
	margin-inline: auto;
}

@supports (width: 1cqw) {
	.event-crew .gig:not(.erg-list) {
		/* A pointed bow, a little taller than half the boat's width. */
		--bow: calc(min(var(--gig-width), 100cqw) * 0.62);
	}
}

.gig:not(.erg-list) .seat {
	position: relative;
	z-index: 1; /* above the bow's drawing */
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas: "label person";
	gap: 0 0.5rem;
	min-height: 3rem;
	margin: 0 0 0.4rem;
	padding: 0.3rem 0.6rem;
	border: 1.5px dashed var(--gp-line);
	border-radius: 8px;
	outline-offset: 2px;
}

.gig:not(.erg-list) .seat.is-filled {
	border-style: solid;
	background: var(--gp-surface-2);
}

.gig:not(.erg-list) .seat.is-me {
	border-color: var(--gp-green-text);
	background: var(--gp-tint);
}

/* Sitting to the left (even seats): label first, buttons on the right. */
.gig .seat.sits-left {
	margin-right: var(--side);
}

/* Sitting to the right (odd seats): mirrored, so the label is against the right-hand gunwale. */
.gig .seat.sits-right {
	margin-left: var(--side);
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "person label";
	text-align: right;
}

.gig .seat.sits-right .seat-person {
	justify-self: end;
}

/* The buttons float over the seat, on the side away from the rower, when it's hovered or tapped. */
.gig:not(.erg-list) .seat-actions {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	z-index: 2;
	flex-wrap: nowrap;
	padding: 0 0.35rem 0 1.5rem;
	border-radius: 0 8px 8px 0;
	background: linear-gradient(to right, transparent, var(--seat-bg, var(--gp-surface)) 1.25rem);
	opacity: 0;
	transition: opacity 0.12s ease-out;
}

.gig:not(.erg-list) .seat.is-filled {
	--seat-bg: var(--gp-surface-2);
}

.gig:not(.erg-list) .seat.is-me {
	--seat-bg: var(--gp-tint);
}

.gig .seat.sits-right .seat-actions {
	right: auto;
	left: 0;
	justify-content: flex-start;
	padding: 0 1.5rem 0 0.35rem;
	border-radius: 8px 0 0 8px;
	background: linear-gradient(to left, transparent, var(--seat-bg, var(--gp-surface)) 1.25rem);
}

.gig:not(.erg-list) .seat:hover .seat-actions,
.gig:not(.erg-list) .seat:focus-within .seat-actions,
.gig:not(.erg-list) .seat:focus .seat-actions {
	opacity: 1;
}

.gig:not(.erg-list) .seat:focus:not(:focus-visible) {
	outline: none;
}

.gig:not(.erg-list) .seat:has(.seat-actions:not(:empty)) {
	cursor: pointer;
}

.gig .seat.seat-cox {
	margin-top: 0.75rem;
	border-top-width: 1.5px;
}

.gig:not(.erg-list) .seat-pilot,
.gig:not(.erg-list) .seat-cox {
	margin-inline: calc(var(--side) / 2);
}

/* The pilot rides up in the bow, on the centre line. */
.gig:not(.erg-list) .seat-pilot {
	margin: calc(var(--bow) * -0.3) 12% 0.6rem;
}

.seat-empty {
	white-space: nowrap;
}

.gig:not(.erg-list) .seat-person a {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- Join this row ----------------------------------------------------------------------------- */

.join-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	padding-bottom: 1rem; /* padding, not margin: the bow is drawn in the margin below */
}

.join-row form {
	flex: none;
}

.join-row .join-button {
	width: auto;
	margin: 0;
	padding: 0.7rem 1.5rem;
	font-size: 1.1rem;
	font-weight: 700;
}

.join-row p {
	flex: 1 1 12rem;
	margin: 0;
	font-size: 0.9rem;
}

/* --- Calendar feed (profile) and event links ------------------------------------------------- */

.calendar-feed {
	margin: 2.5rem 0;
	padding: 1.25rem;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-radius);
	background: var(--gp-surface);
}

.calendar-feed h2 {
	margin-top: 0;
}

.feed-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.feed-buttons [role="button"] {
	width: auto;
	margin: 0;
}

.calendar-feed input[readonly] {
	font-size: 0.85rem;
	color: var(--gp-muted);
}

.event-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 1rem 0 0;
}

.event-links a,
.event-links .link-like {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.event-links a:hover,
.event-links .link-like:hover {
	text-decoration: underline;
}

.event-links .link-like {
	width: auto;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	color: var(--gp-link);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.event-links .link-like[hidden] {
	display: none;
}

.share-card {
	text-align: left;
}

/* --- People picker ----------------------------------------------------------------------------- */

a.add-person {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-height: 40px;
	padding: 0 0.6rem;
	border-radius: var(--gp-radius);
	color: var(--gp-link);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

a.add-person:hover {
	background: var(--gp-surface-2);
	color: var(--gp-link);
}

/* On phones the seat's Add shows just its icon, so a row never wraps. */
@media (max-width: 30rem) {
	.seat a.add-person span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
}

/* Pico draws <dialog> as a full-screen overlay; the card inside it is #picker-body. */
.picker-dialog {
	--pico-modal-overlay-background-color: rgb(15 42 58 / 0.5);
	--pico-modal-overlay-backdrop-filter: none;
	padding: 1rem;
}

#picker-body {
	display: flex;
	flex-direction: column;
	width: min(32rem, 100%);
	max-height: min(42rem, calc(100dvh - 2rem));
	border-radius: 14px;
	background: var(--gp-surface);
	color: var(--gp-text);
	box-shadow: 0 20px 60px rgb(15 42 58 / 0.35);
	overflow: hidden;
}

#picker-body > .picker {
	flex: 1 1 auto;
	min-height: 0;
}

/* Phones: a sheet from the bottom edge, within thumb reach. */
@media (max-width: 40rem) {
	.picker-dialog {
		align-items: flex-end;
		padding: 0;
	}

	#picker-body {
		width: 100%;
		max-height: 88dvh;
		border-radius: 16px 16px 0 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
}

.picker {
	display: flex;
	flex-direction: column;
}

.picker-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1rem 0.5rem 1.25rem;
}

.picker-head h2 {
	margin: 0;
	font-size: 1.4rem;
}

.picker-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--gp-muted);
}

.picker-close:hover {
	background: var(--gp-surface-2);
	color: var(--gp-text);
}

.picker-search {
	margin: 0;
	padding: 0 1.25rem 0.5rem;
}

.picker-search input {
	margin: 0;
}

.picker-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 0.75rem 1rem;
}

.picker-list ul {
	margin: 0;
	padding: 0;
}

.picker-list li {
	list-style: none;
	margin: 0;
}

.picker-list form {
	margin: 0;
}

.picker-note {
	margin: 0.25rem 0.5rem 0.5rem;
	color: var(--gp-muted);
	font-size: 0.85rem;
}

.picker-person {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 3.5rem;
	margin: 0;
	padding: 0.4rem 0.5rem;
	border: none;
	border-radius: var(--gp-radius);
	background: transparent;
	color: var(--gp-text);
	text-align: left;
	font-weight: 400;
}

.picker-person:hover:not(:disabled),
.picker-person:focus-visible {
	background: var(--gp-surface-2);
}

.picker-person:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.picker-initials {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--gp-ink);
	color: var(--gp-green);
	font-family: var(--gp-display);
	font-weight: 700;
}

.picker-name {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.picker-name small {
	color: var(--gp-muted);
}

.picker-add {
	flex: none;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: var(--gp-green);
	color: var(--gp-ink);
	font-size: 0.85rem;
	font-weight: 700;
}

.picker-empty {
	padding: 1rem 0.5rem;
	color: var(--gp-muted);
}

.picker-search input[type="search"] {
	border-radius: var(--gp-radius);
}

/* Live checks under form fields (email, phone) */
.field-check-error {
	color: var(--pico-del-color);
}

.field-check-ok {
	color: var(--pico-ins-color);
}

/* --- Sex and category on the crew list ------------------------------------------------------------
	Names are blue (#4a90e2) for men and pink (#e05c8a) for women, the same in dark mode; a small tag before the name gives the racing
	category on the day in Rowter's letters (O Open, V Vets, SV Super Vets...). */
.crew a.sex-male,
.chip-legend .sex-male {
	--pico-color: #4a90e2;
	color: #4a90e2;
}

.crew a.sex-male,
.crew a.sex-female {
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.crew a.sex-female,
.chip-legend .sex-female {
	--pico-color: #e05c8a;
	color: #e05c8a;
}


abbr.cat-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.25rem;
	margin-right: 0.35rem;
	padding: 0 0.25rem;
	border-radius: 4px;
	background: var(--gp-surface);
	box-shadow: inset 0 0 0 1px var(--gp-line);
	color: var(--gp-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-decoration: none;
	border-bottom: none;
	vertical-align: 0.12em;
	cursor: help;
}

.chip-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 0.9rem;
	margin: -0.75rem auto 1.25rem;
	max-width: 22rem;
	font-size: 0.8rem;
	color: var(--gp-muted);
}

.chip-legend > span {
	display: inline-flex;
	align-items: center;
}

.chip-legend .sex-male,
.chip-legend .sex-female {
	font-weight: 700;
}

/* Notifications & email: bookings with change emails on */
.watch-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
}

.watch-list .inline-form {
	margin-left: auto;
}
