body{
	display: flex;
	flex-direction: column;
	font-size: 14px;}
	
:focus-visible {
	  outline: none;
		box-shadow: 1px 1px 5px rgba(1, 1, 0, .0);
	}
	  
	/* Focusing the button with a mouse, touch, or stylus will show a subtle drop shadow. */
	:focus:not(:focus-visible) {
	  outline: none;
	  box-shadow: 1px 1px 5px rgba(1, 1, 0, .0);
	}

.col-logo{
	-ms-flex: 0 0 54px;
	flex: 0 0 54px;
	max-width: 54px;}
	
/* Not sure what effect this will have by commenting out - must review - 10-09-2026
	.container-fluid{	
	flex: 1 0 auto;} */

.container-fullwidth{
	padding-left: 0;
	padding-right: 0;
	width: 100%;}

.loadingDiv {
	position: fixed;
	width:100%;
	height: 100%;
	background-color: rgba(0,0,0,0.8);
	z-index: 10000;
	color: #fff;}
.loadingDiv p{
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin-bottom: 0;
	}
.p-relative{
	position: relative;}

/* Bootstrap's own classes (lh-sm, mh-100, container-lg,
   table-responsive-lg, table-sm, text-center) are no longer redefined
   here, so they behave exactly as the Bootstrap docs describe. */

/* .btn-link on its own (without .btn) is used across the platform as a
   bare, unstyled button — e.g. the date numbers on the events calendar.
   Without this, the browser's default button border and padding show. */
.btn-link{
	padding: 0;
	border: 0;}

.lh-md{
	line-height: 2rem!important;}
		


.border-reset {
	border-color: inherit !important;}
	
.jumbotron-start-line{
	background: #ccc; 
	margin-bottom: 0;
	color: #f1f1f1;
	border-radius: 0;
	text-align: center;
	padding: 1rem 0 0 0;}
.jumbotron-start-line h1{
	font-size: 3rem;}
.jumbotron-start-line .logo{
	max-width: 10rem;
	margin-top: 2rem;
	margin-bottom: 0rem;}
.jumbotron-overlay{
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#cccccc+1,666666+100 */
background: rgb(204,204,204); /* Old browsers */
background: -moz-linear-gradient(top, rgba(204,204,204,.5) 1%, rgba(102,102,102,.5) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgba(204,204,204,.5) 1%,rgba(102,102,102,.5) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(204,204,204,.5) 1%,rgba(102,102,102,.5) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#666666',GradientType=0 ); /* IE6-9 */
	box-shadow: 0 1px 1px rgba(0, 0, 0, .5);
	padding: 0.7rem 2rem 2rem 2rem;}

.jumbotron-data-protection{
	background: #ffc107;
	color: #000;
}

.footerpadding{
	height: 120px;}

.modal-dialog-bottom {
	  position: fixed !important;
	  bottom: 0 !important;
	  left: 0% !important;
	  right: 0% !important;}
	  
	.bg-cloud{
		background-color: #f1c537 !important;}
	  
#primary{
	margin-top: -1rem;
	background: #e84b3c;
	overflow: hidden;
	position: relative;
	width: 100%;}
#primary a{
	color:#ffc107;
	text-decoration: underline;}

.section:before{
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 10rem;
	height: 40rem;
	background: #e14031;
	transform: skew(0, -12deg);}
	
.fs-tiny{
	font-size: .75em !important;}
.fs-counter{
	font-size: 10px !important;}


	
.terms{
	font-size: 0.8rem;
	max-height: 280px;
	overflow-y: scroll;}
.terms-agree{
	background: #888;
	color: #fff;
	padding: 1rem;
	border-radius: 0 0 3px 3px;
}

.select-mode .member-item { cursor: pointer; }

.table-membership td{
	vertical-align: middle;
}

.calc-card, .calc-card .card-footer{
	background: transparent;
}
.calc-card .card-header{
	color: #373a3c;
	background: white;
}

/* (Was ".calc-card .table td, .table th", which styled every table header on the site) */
.calc-card .table td, .calc-card .table th{
	border-top: 1px solid rgba(255,255,255,0.05);}

.btn-relative{
	position: relative;} 
	
.progress-btn-current, .progress-btn-current:hover, .progress-btn-current:active, .progress-btn-current:focus {
	background-color: rgb(108, 117, 125);
	border-color: #0dcaf0 !important;
	color: #0dcaf0 !important;
	border-width: 2px;
	font-weight: bold;}
.progress-track-dashed {
	background-color: transparent !important;
	border-top: 2px dashed rgba(255, 255, 255, 0.4);
	height: 0 !important;}

.custom-file-control{
	text-align: left;}
.text-shadow{
	text-shadow: 0px 0px 15px rgba(0,0,0,.3);
}
form .yesnoswitch{
	margin-top: 2px;}
.card-header legend{
	margin-bottom: 0;}


	
/*	MODULES */
.fullwidth-hero{
	height: 300px;
	width: 100%;}
	
.img-fit {
	height: 100%;
	width: 100%;
	-o-object-fit: cover!important;
	object-fit: cover!important;
	object-position: center center;}
.chat-img{
	height: 100vh;
	object-position: center center;}


.chat-img-btn {
	display: block;
	width: 100%;
}

.chat-img-frame {
	/* Fluid with the bubble — full width on phones, capped on desktop
	   so the 1:1 square doesn't balloon inside wide bubbles (a 600px
	   bubble would otherwise mean a 600px-tall image). Raise or drop
	   the 420px cap to taste. */
	width: 100%;
	max-width: 420px;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.06);
	cursor: pointer;
}
.chat-img-frame img {
	object-fit: cover;
	object-position: center center;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity .2s ease;
}
.chat-img-frame img.chat-img-loaded {
	opacity: 1;
}

/* ── Skeleton pulse while an image is lazy-loading. A gentle breathe on
   the frame's grey fill signals "in flight" (a static box can read as
   broken). Once the image has faded in it fully covers the frame, and
   the :has() rule stops the animation outright — on older browsers
   without :has() support the pulse just continues invisibly behind the
   loaded image, which is harmless. Disabled entirely for users who've
   asked for reduced motion. */
@keyframes chat-img-skeleton-pulse {
	0%, 100% { background-color: rgba(0, 0, 0, 0.06); }
	50%      { background-color: rgba(0, 0, 0, 0.13); }
}
.chat-img-frame,
.chat-link-img-frame {
	animation: chat-img-skeleton-pulse 1.6s ease-in-out infinite;
}
.chat-img-frame:has(img.chat-img-loaded),
.chat-link-img-frame:has(img.chat-img-loaded) {
	animation: none;
}
@media (prefers-reduced-motion: reduce) {
	.chat-img-frame,
	.chat-link-img-frame {
		animation: none;
	}
}

#chat-skeleton {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;   /* matches the column-reverse chat: newest at the bottom */
	padding-block: 1rem;
	overflow: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

#chat-skeleton.chat-skeleton-out { opacity: 0; }

/* Row layout and widths come from Bootstrap's grid now — these only
   need to describe the bubble itself. */
.chat-skeleton-bubble {
	border-radius: 1rem;
	animation: chat-img-skeleton-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.chat-skeleton-bubble { animation: none; background-color: rgba(0, 0, 0, 0.08); }
}

.chat-skeleton-avatar {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 50%;
	animation: chat-img-skeleton-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.chat-skeleton-avatar { animation: none; background-color: rgba(0, 0, 0, 0.08); }
}

/* Scraped link-preview images inside comment link cards — 16:9 rather
   than square. The parent .card already clips with overflow-hidden and
   sets its own border-radius, so this frame doesn't duplicate that. */
.chat-link-img-frame {
	background-color: rgba(0, 0, 0, 0.06);
}
.chat-link-img-frame img {
	object-fit: cover;
	object-position: center center;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity .2s ease;
}
.chat-link-img-frame img.chat-img-loaded {
	opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   END CHAT IMAGE FRAMES
   ═══════════════════════════════════════════════════════════════ */

/* NOTE: earlier iterations of the lazy-load fix disabled native CSS
   scroll anchoring here (overflow-anchor: none), on the theory that it
   was double-correcting against chat.js's own manual scrollTop math.
   Real-device testing showed the opposite problem: chat.js's manual
   correction was fighting the browser's native momentum/inertial scroll
   animation (which runs on the compositor thread, outside JS's control),
   producing a visible tug-of-war rather than a clean settle. Native
   scroll anchoring is specifically built to update scroll position from
   inside the browser's own scroll pipeline, so it doesn't have that
   conflict — chat.js no longer does manual scrollTop correction for
   lazy-loaded history (see reanchorScroll's removal in chat.js), so
   there's nothing left to double up with anymore. */

/* Scroll anchoring picks the first eligible element near the top of the
   viewport as its "anchor" and keeps *that* element visually still when
   content shifts around it. #top-sentinel sits permanently as the first
   child of #chat — new history is always inserted after it — so its own
   position in the document never changes no matter how much loads above
   it (there's nothing above it to move it). If the browser picks the
   sentinel as its anchor, "keeping it still" requires zero scroll
   correction, which means a freshly-loaded batch can land with no
   compensation at all: the user ends up looking at the top of the new
   batch instead of back where they were reading. overflow-anchor: none
   is meant for exactly this — excluding non-content "furniture" elements
   (spinners, dividers, placeholders) from anchor eligibility, so the
   browser is forced to pick real message content instead. Same reasoning
   applies to the batch divider inserted between old and new content on
   every lazy load (see chat.js) — it's fresh each time and not something
   the user is actually reading, so it shouldn't be a candidate either. */
.scroll-anchor-skip {
	overflow-anchor: none;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT COLUMN-REVERSE SCROLLER
   The structural fix for the lazy-load viewport jump (the WhatsApp
   approach). The DOM order of messages is reversed by chat.js — the
   newest message is the FIRST child (rendered at the visual bottom
   because of flex-direction: column-reverse), the oldest is the LAST.
   Loading older history therefore APPENDS to the DOM end, and content
   appended beyond the current scroll position never displaces the
   viewport — in any browser, mid-touch or not. No JS scroll correction
   exists anymore because none is needed. Bonuses that fall out for
   free: scrollTop 0 is the visual bottom (so "open at latest" needs no
   scrolling at all), and a user sitting at the bottom stays pinned
   there when new messages arrive.

   NOTE: --chat-vertical-offset is the combined height of everything
   above and below the chat scroller (navbar, page heading, composer,
   etc.) and WILL need tuning against the real page — 260px is a
   starting guess. If the chat is cut off or leaves a gap, this is the
   dial.

   WIDTH / "container" NOTE: do NOT wrap the comment rows in a real
   .container div inside #chat — the bottom-anchored, jump-free scroll
   behaviour depends on the SCROLLING element itself being the
   column-reverse flex parent of the messages. A wrapper in between
   turns the scroller's content back into one normal block child, the
   scroll re-anchors to the top, and the lazy-load jump comes straight
   back. Instead, the padding below gives #chat the container's
   geometry directly: content is centred and capped at
   --chat-content-max wide, while the scroll area (and scrollbar) stays
   the full width of #chat. The max() floor guarantees at least a
   half-gutter of padding at narrow widths, which is exactly what
   Bootstrap .row's negative margins expect a container to provide —
   fixing the horizontal overflow unwrapped rows otherwise cause.
   Tune --chat-content-max to whatever container width the rest of the
   page uses. */
/* Content width cap — set on the SHELL so both #chat and the pin bar
   (siblings inside it) inherit the same value and stay aligned. */
#chat-shell {
	--chat-content-max: 960px;
}

/* Attachment editor/picker mount inside the composer (see initialise in
   chat.js). Capped so a tall poll editor on a phone scrolls internally
   rather than pushing the composer's input off-screen. The editor's own
   border (styled for the light page background) reads as a stray white
   outline against the dark composer — stripped here. */
#chat-tools-holder {
	   max-height: min(60dvh, calc(100dvh - var(--kb-inset, 0px) - 8rem));
	   overflow-y: auto;
   }

#chat-edit {
	bottom: var(--kb-inset, 0px);
	padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 576px) {
	#chat-edit {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}

/* While an editor is open (body.chat-editor-open, toggled by the
   tools-holder observer in initialise — see there for why it's
   observer-driven), hide the composer's own rows so the editor takes
   over the bar entirely, and hide the floating chat widgets, which
   would otherwise hover over the editor once the chat shrinks.
   Validation feedback is surfaced as a toast (see the #chat-feedback
   observer) since the inline div is hidden while this is active. */
body.chat-editor-open #chat-edit > div:not(#chat-tools-holder) {
	display: none !important;
}
body.chat-editor-open #scroll-bottom-btn,
body.chat-editor-open #chat-search-toggle,
body.chat-editor-open #chat-search {
	display: none !important;
}

#chat {
	display: flex;
	flex-direction: column-reverse;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Fallback only — sizeChatScroller() in chat.js measures the real
	   available space (top of #chat down to the composer) and sets an
	   inline height, re-measured on resize. A fixed offset guess can't
	   be right across devices whose chrome heights differ. */
	height: calc(100dvh - var(--chat-vertical-offset, 260px));
}

.chat-content-box {
	padding-inline: max(var(--chat-gutter, 0.75rem), calc((100% - var(--chat-content-max, 1140px)) / 2));
}


/* Groups list — WhatsApp-style single column.
   Uses Bootstrap 5.3 CSS variables so it follows light/dark mode.
   Each row sets --gl-colour (group colour) and --gl-on-colour (contrast text). */

.gl {
	max-width: 44rem;
	margin: 0 auto;
	isolation: isolate; /* keeps the list's z-indexes (search bar, links, star)
						   inside the list, so they can't cover toasts or modals */
}

/* ---------- Search ---------- */

.gl-toolbar {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: .75rem 0;
	background: var(--bs-body-bg);
}

.gl-search {
	position: relative;
}

.gl-search-icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bs-secondary-color);
	pointer-events: none;
}

.gl-search-input.form-control {
	height: 2.75rem;
	padding-left: 2.6rem;
	border-radius: 999px;
	border-color: transparent;
	background: var(--bs-tertiary-bg);
}

.gl-search-input.form-control:focus {
	background: var(--bs-body-bg);
	border-color: var(--bs-primary);
	box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

/* ---------- Row ---------- */

/* Grid, not flex: avatar on the left spanning both lines; name + star/menu
   on the first line; the links get the whole second line, under the
   star and menu too, so Chat / Notices / Email fit side by side on a phone. */
.gl-row {
	/* --gl-pad: space between the row's edge and its content.
	   --gl-bleed: how far the row reaches out past the list into the page's
	   own side padding, so the tap/hover tint and the dividers run to the
	   edge instead of stopping short. .75rem = Bootstrap's container padding
	   on groups.php; the home favourites card sets it to 0. */
	--gl-pad: .5rem;
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas:
		"avatar body    controls"
		"avatar actions actions";
	column-gap: .9rem;
	align-items: start;
	margin-inline: calc(-1 * var(--gl-bleed, .75rem));
	padding: .85rem calc(var(--gl-pad) + var(--gl-bleed, .75rem));
	border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* Join / Private in the groups list: a rounded button in the group's own
   colour, rather than the round icon chip, which text squashed into an oval. */
.gl-row .gl-join-btn {
	position: relative;
	z-index: 2;                          /* above the row's stretched-link */
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	align-self: center;
	width: auto;
	height: auto;
	padding: .55rem 1rem;
	border-radius: .5rem;
	font-weight: 600;
	white-space: nowrap;
	background-color: var(--gl-colour);
	border: 1px solid var(--gl-colour);
	color: var(--gl-on-colour);
}
.gl-row .gl-join-btn:hover,
.gl-row .gl-join-btn:focus-visible,
.gl-row .gl-join-btn:active {
	background-color: var(--gl-colour);
	border-color: var(--gl-colour);
	color: var(--gl-on-colour);
	filter: brightness(.9);
}
/* Private: same shape, but clearly not something to press. */
.gl-row .gl-join-btn-static {
	opacity: .6;
	cursor: default;
	pointer-events: none;
}

/* Tint on hover only where there's a real mouse — on phones a tap would
   otherwise leave the tint stuck on after you come back. Tapping gets a
   brief tint while your finger is down instead. */
@media (hover: hover) {
	.gl-row:hover {
		background: var(--bs-tertiary-bg);
	}
}

.gl-row:active {
	background: var(--bs-tertiary-bg);
}

/* The one bold thing: every group wears its own colour as a ring. */
.gl-avatar {
	grid-area: avatar;
	align-self: center; /* centred against the name and links, not pinned to the top */
	width: 3.75rem;
	height: 3.75rem;
	margin: 3px;
	border-radius: 50%;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: var(--gl-colour);
	color: var(--gl-on-colour);
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: .02em;
	outline: 2px solid var(--gl-colour);
	outline-offset: 2px;
}

.gl-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-has-unread .gl-avatar {
	outline-width: 3px;
}

.gl-body {
	grid-area: body;
	min-width: 0; /* lets the name/description truncate */
	align-self: center;
}

.gl-name {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--bs-body-color);
	text-decoration: none;
}

.gl-name:focus-visible {
	outline: none;
}

.gl-name:focus-visible::after {
	outline: 2px solid var(--bs-primary);
	outline-offset: -2px;
	border-radius: .375rem;
}

/* Size comes from your fs-tiny utility on the element. */
/* Which club a group belongs to — home page favourites from other clubs */
.gl-club {
	display: flex;
	align-items: center;
	gap: .35rem;
	margin: .1rem 0 0;
	overflow: hidden;
	white-space: nowrap;
	color: var(--bs-secondary-color);
}

.gl-club img {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	object-fit: cover;
}

.gl-club span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.gl-desc,
.gl-note {
	margin: .1rem 0 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--bs-secondary-color);
}

.gl-note {
	font-size: .875rem;
	color: var(--bs-warning-text-emphasis);
}

/* ---------- Links (chips) ---------- */

.gl-actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	margin-top: .25rem;
}

.gl-chip {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: 1rem 1rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 999px;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	font-size: 1rem;
	line-height: 1.5;
	text-decoration: none;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	width: 3.1rem;
}

a.gl-chip:hover,
button.gl-chip:hover {
	border-color: var(--gl-colour);
	color: var(--bs-body-color);
}

.gl-chip:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
}

.gl-chip-join {
	border-color: var(--gl-colour);
	background: var(--gl-colour);
	color: var(--gl-on-colour);
	font-weight: 600;
}

button.gl-chip-join:hover {
	color: var(--gl-on-colour);
	filter: brightness(.92);
}

.gl-chip-static {
	color: var(--bs-secondary-color);
}

.gl-count {
	min-width: 1rem;
	padding: 0 .3rem;
	border-radius: 999px;
	background: var(--bs-danger);
	color: #fff;
	font-size: .625rem;
	font-weight: 700;
	line-height: 1rem;
	text-align: center;
	position: absolute;
	top: 0;
	right: 0;
}

/* ---------- Star + menu ---------- */

.gl-controls {
	grid-area: controls;
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: .1rem;
	margin-right: -.25rem; /* line the menu dots up with the chips' right edge */
}

/* Lift the row whose ⋯ menu is open above the rows below it */
.gl-controls:has(.dropdown-menu.show) {
	z-index: 3;
}

.gl-icon-btn {
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bs-secondary-color);
	font-size: 1.1rem;
}

.gl-icon-btn:hover {
	background: var(--bs-secondary-bg);
	color: var(--bs-body-color);
}

.gl-icon-btn:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 1px;
}

.gl-fav-btn[aria-pressed="true"] {
	color: #e5a800;
}

.gl-busy {
	opacity: .5;
	pointer-events: none;
}

/* ---------- Section headings: Your / Other / Hidden groups ---------- */

.gl-section-heading {
	margin: 2rem calc(-1 * var(--gl-bleed, .75rem)) 0;
	padding: 0 calc(.5rem + var(--gl-bleed, .75rem)) .5rem;
	border-bottom: 1px solid var(--bs-border-color-translucent);
	font-size: .9375rem;
	font-weight: 600;
	color: var(--bs-secondary-color);
}

/* The first section on screen sits just under the search bar */
.gl-section-first > .gl-section-heading {
	margin-top: .5rem;
}

.gl-section-count {
	font-weight: 400;
}

/* ---------- Hidden groups ---------- */

.gl-is-hidden .gl-avatar,
.gl-is-hidden .gl-body,
.gl-is-hidden .gl-actions {
	opacity: .5;
	filter: grayscale(1);
}

.gl-is-hidden:hover .gl-avatar,
.gl-is-hidden:hover .gl-body,
.gl-is-hidden:hover .gl-actions,
.gl-is-hidden:focus-within .gl-avatar,
.gl-is-hidden:focus-within .gl-body,
.gl-is-hidden:focus-within .gl-actions {
	opacity: .85;
}

/* Hidden groups: no Chat / Notices / Email / Join line. Join moves into
   the ⋯ menu instead, and the menu item is only shown for hidden groups. */
.gl-is-hidden .gl-actions {
	display: none;
}

.gl-row:not(.gl-is-hidden) .gl-join-item {
	display: none;
}

/* ---------- Groups you're not in: faded, still in colour ---------- */

.gl-row[data-member="0"] .gl-avatar,
.gl-row[data-member="0"] .gl-body,
.gl-row[data-member="0"] .gl-actions {
	opacity: .5;
}

.gl-row[data-member="0"]:hover .gl-avatar,
.gl-row[data-member="0"]:hover .gl-body,
.gl-row[data-member="0"]:hover .gl-actions,
.gl-row[data-member="0"]:focus-within .gl-avatar,
.gl-row[data-member="0"]:focus-within .gl-body,
.gl-row[data-member="0"]:focus-within .gl-actions {
	opacity: .85;
}

/* ---------- Home page favourites card ---------- */

/* Rows run edge to edge inside the card, with content lined up with the
   card header's text (1rem). */
#home-favourites-list {
	--gl-bleed: 0rem;
}

#home-favourites-list .gl-row {
	--gl-pad: 1rem;
}

#home-favourites .gl-favourites {
	max-width: none;
}

/* The card's edge does the job of the last divider */
#home-favourites-list .gl-list > .gl-row:last-child {
	border-bottom: 0;
}

/* Wide screens: two columns, so the card can be full width like the cards
   around it without the rows stretching. A hairline splits the columns; the
   bottom row of each column drops its divider. */
@media (min-width: 992px) {
	#home-favourites-list .gl-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#home-favourites-list .gl-list > .gl-row:nth-child(even) {
		border-left: 1px solid var(--bs-border-color-translucent);
	}

	#home-favourites-list .gl-list > .gl-row:nth-last-child(2):nth-child(odd) {
		border-bottom: 0;
	}
}

/* ---------- Empty states ---------- */

.gl-empty {
	padding: 2rem .5rem;
	text-align: center;
	color: var(--bs-secondary-color);
}

/* ---------- Feedback when a row moves ---------- */

.gl-moved {
	animation: gl-moved 1s ease-out;
}

@keyframes gl-moved {
	from { background: rgba(var(--bs-primary-rgb), .14); }
	to   { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.gl-moved { animation: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 575.98px) {
	.gl-row { --gl-pad: .25rem; column-gap: .75rem; padding-block: .75rem; }
	.gl-avatar { width: 3.25rem; height: 3.25rem; font-size: 1.05rem; }
	.gl-name { font-size: 1.125rem; }
	.gl-icon-btn { width: 2.25rem; height: 2.25rem; }
}

/* Hidden groups: avatar at half size. Kept last so it wins over the
   base .gl-avatar size and the small-screen size above. */
.gl-is-hidden .gl-avatar {
	width: 1.875rem;
	height: 1.875rem;
	font-size: .6rem;
	outline-width: 1px;
}

@media (max-width: 575.98px) {
	.gl-is-hidden .gl-avatar {
		width: 1.625rem;
		height: 1.625rem;
		font-size: .525rem;
	}
}

/* =====================================================================
   group-home.php header card
   The card sets --gh-fg / --gh-bg (text and group colour) and
   --gh-tint / --gh-tint-hover / --gh-line, worked out in PHP to be dark
   on light group colours and light on dark ones.
   ===================================================================== */

.gh-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .75rem;
	margin-top: 1.75rem;
}

.gh-action {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-width: 7rem;
	padding: 1rem 1rem .8rem;
	border: 1px solid var(--gh-line);
	border-radius: .75rem;
	background: var(--gh-tint);
	color: inherit;
	font: inherit;
	text-decoration: none;
	transition: background-color .15s ease, transform .15s ease;
}

.gh-action:hover,
.gh-action:focus-visible {
	background: var(--gh-tint-hover);
	color: inherit;
}

.gh-action:active {
	transform: scale(.97);
}

.gh-action:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.gh-action i {
	font-size: 2rem;
	line-height: 1;
}

.gh-action-label {
	font-size: .8125rem;
	font-weight: 600;
}

.gh-badge {
	position: absolute;
	top: -.45rem;
	right: -.45rem;
	min-width: 1.35rem;
	padding: 0 .35rem;
	border-radius: 999px;
	background: var(--bs-danger);
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	line-height: 1.35rem;
	text-align: center;
	box-shadow: 0 0 0 2px var(--gh-bg); /* cut-out ring in the group colour */
}

/* Leave / Private: outline in the readable colour for this group */
.gh-btn {
	border: 1px solid var(--gh-line);
	background: transparent;
	color: inherit;
}

.gh-btn:hover,
.gh-btn:focus-visible {
	border-color: var(--gh-line);
	background: var(--gh-tint);
	color: inherit;
}

.gh-btn:disabled {
	border-color: var(--gh-line);
	color: inherit;
	opacity: .6;
}

/* Join: solid, text colour as the fill and group colour as the text */
.gh-btn-solid,
.gh-btn-solid:hover,
.gh-btn-solid:focus-visible {
	border-color: var(--gh-fg);
	background: var(--gh-fg);
	color: var(--gh-bg);
	font-weight: 600;
}

.gh-btn-solid:hover {
	opacity: .9;
}

/* Buttons that sit on top of the group image (camera, bin, and the star
   when there's an image): a dark see-through circle with a white icon, so
   they read on any photo — busy, dark or light. */
.gh-overlay-btn {
	display: inline-grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	transition: background-color .15s ease;
}

.gh-overlay-btn:hover,
.gh-overlay-btn:focus-visible {
	background: rgba(0, 0, 0, .7);
	color: #fff;
}

.gh-overlay-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.gh-overlay-btn:disabled {
	opacity: .6;
}

.gh-overlay-btn-lg {
	width: 3rem;
	height: 3rem;
	font-size: 1.35rem;
}

/* Share / Copy link (from share-buttons.php) inside the header: same
   outline + tint as Leave Group, so they follow the dark/light choice for
   each group. Scoped here, so the share buttons elsewhere don't change. */
.gh-card .gh-share .btn {
	border: 1px solid var(--gh-line);
	background: var(--gh-tint);
	color: inherit;
}

.gh-card .gh-share .btn:hover,
.gh-card .gh-share .btn:focus-visible {
	border-color: var(--gh-line);
	background: var(--gh-tint-hover);
	color: inherit;
}

/* Phones: equal-width tiles in a grid instead of wrapping, so there's never
   a tile left on its own. Four make a 2×2 square; three or fewer sit in
   one row. The class comes from group-home.php (gh-actions-1 … 4). */
@media (max-width: 575.98px) {
   .gh-actions {
	   display: grid;
	   grid-template-columns: repeat(3, minmax(0, 1fr)); /* default for any count */
	   gap: .5rem;
	   max-width: 22rem;
	   margin-left: auto;
	   margin-right: auto;
   }
   .gh-actions-1 { grid-template-columns: minmax(0, 8rem); justify-content: center; }
   .gh-actions-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .gh-actions-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
   .gh-actions-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

   /* Five: three on top, two centred underneath */
   .gh-actions-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
   .gh-actions-5 > * { grid-column: span 2; }
   .gh-actions-5 > :nth-child(4) { grid-column: 2 / span 2; }

   .gh-action { min-width: 0; padding: .85rem .5rem .7rem; }
   .gh-action i { font-size: 1.6rem; }
   .gh-action-label { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
	.gh-action { transition: none; }
	.gh-action:active { transform: none; }
}


/* Row separator. This replaces the <hr> that used to be emitted before
   each row: a separate element meant the filter JS had to find and hide
   each one alongside its row via previousElementSibling. A border goes
   wherever the row goes. */
.group-member-row {
	border-top: 1px solid rgba(108, 117, 125, 0.25);
	padding-top: 0.5rem;
}
 
.group-member-row:first-of-type {
	border-top: 0;
}

/* The member search has its own clear button (#groupMemberClear);
   hide the one WebKit/Blink add to type="search" so there's only one. */
#groupMemberSearch::-webkit-search-cancel-button,
#groupMemberSearch::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}
 
/* Filter buttons AND the per-member action buttons (admin/ban/age-
   override/remove — all share the group-action-btn class) manage their
   own appearance via JS-toggled classes. Bootstrap's own
   :focus/:active/:hover styling is a SEPARATE thing from that, and can
   visually stick around after a mobile tap ends — there's no "move the
   mouse away" event on a touchscreen the way there is on desktop, so the
   pressed/hovered look can persist even once the intended state has
   already been correctly applied. :hover specifically: touch devices
   commonly simulate a hover state on tap (for compatibility with sites
   never built for touch), and since there's no real mouse to move away
   afterward, that hover can stick indefinitely — this is likely the
   actual cause of a button appearing to "stay black" after being
   toggled/tapped. Wrapped in @media (hover: none) so this only applies
   on devices that don't have genuine hover at all (touchscreens),
   leaving desktop's real mouse-hover feedback completely untouched.
   Scoped to the OUTLINE variants only — the admin button's solid
   btn-dark state (shown when a member genuinely IS an admin) is a real,
   permanent status rather than a hover artifact, and should stay filled
   in regardless of touch vs. desktop. */
.filter-btn.btn-outline-dark:focus,
.filter-btn.btn-outline-dark:active,
.filter-btn.btn-outline-dark:focus:active,
.group-action-btn.btn-outline-dark:focus,
.group-action-btn.btn-outline-dark:active,
.group-action-btn.btn-outline-dark:focus:active {
	background-color: transparent !important;
	color: #212529 !important;
	border-color: #212529 !important;
	box-shadow: none !important;
}
 
.group-action-btn.btn-outline-danger:focus,
.group-action-btn.btn-outline-danger:active,
.group-action-btn.btn-outline-danger:focus:active {
	background-color: transparent !important;
	color: #dc3545 !important;
	border-color: #dc3545 !important;
	box-shadow: none !important;
}
 
@media (hover: none) {
	.filter-btn.btn-outline-dark:hover,
	.group-action-btn.btn-outline-dark:hover {
		background-color: transparent !important;
		color: #212529 !important;
		border-color: #212529 !important;
		box-shadow: none !important;
	}
 
	.group-action-btn.btn-outline-danger:hover {
		background-color: transparent !important;
		color: #dc3545 !important;
		border-color: #dc3545 !important;
		box-shadow: none !important;
	}
}

/* Window mode (jumped to an old message via reply/search — see
   enterWindowMode in chat.js) flips the scroller to NORMAL column flow.
   Each direction of a flex scroller is jump-proof on its far side only:
   column-reverse makes backward/older loads displacement-free (live
   mode's priority), normal column makes forward/newer loads
   displacement-free — and forward is window mode's dominant motion.
   The JS mirrors everything direction-dependent (DOM order, sentinel
   placement, grouping adjacency) off the in_window_mode flag. */
#chat.chat-forward {
	flex-direction: column;
}


#home-favourites-list .gl-row:last-child {
	border-bottom: 0;
}

/* =====================================================================
   Events list view — calendar list (/events-v2/) and users/group-events.php
   Spond-style: month headings, and a date block on each card.
   ===================================================================== */

.list-month + .list-month {
	margin-top: .5rem;
}

.list-month-heading {
	margin: 1.25rem 0 .6rem;
	padding: 0 .25rem;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--bs-secondary-color);
}

/* ── List view: a section per month (one-offs + "Regular in <month>") ──
   Months load one at a time as you scroll either way; event-calendar.js keeps your place
   when earlier months go in above, so the browser's own scroll anchoring is off here. */
#list-view { overflow-anchor: none; position: relative; z-index: 0; }   /* its own layer: sticky month headings stay under the calendar nav */
.list-load-status { min-height: 2.75rem; display: flex; align-items: center; justify-content: center; margin: .25rem 0 .5rem; }

/* Calendar list: the site nav comes back when you scroll up (and tucks away scrolling
   down), since scrolling up keeps loading earlier months - see watchPrimaryNav() */
#primary-nav.cal-nav-pinned {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1030;
	transition: top .2s ease-in-out;   /* slid in and out with top (set by the script) */
}

/* The branded loader in the middle of the calendar while it loads */
.calendar-loading { display: flex; justify-content: center; align-items: center; min-height: 40vh; color: var(--bs-secondary-color); }

/* The calendar's search has its own clear (x) button, so hide the browser's */
#cal-search-input::-webkit-search-cancel-button,
#cal-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

.list-month-none { color: var(--bs-secondary-color); font-size: .9rem; padding: .75rem .25rem; margin: 0; }
.list-month-earlier-link { display: block; padding: 0 .25rem .5rem; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--bs-secondary-color); }
.list-month-earlier-link:hover { color: var(--bs-emphasis-color); }

.list-regular {
	margin-bottom: .6rem;
}
.list-regular-title {
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bs-secondary-color);
	margin: 0 0 .4rem;
}
.list-regular-row {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .65rem 0;
	border-top: 1px solid #f0f2f5;
	cursor: pointer;
}
.list-regular-title + .list-regular-row { background-image: none; }
.list-regular-row {
	margin: 0 -.5rem;
	padding-left: .5rem;
	padding-right: .5rem;
	border-top: 0;
	border-radius: .6rem;
	/* the dividing line, inset so it lines up with the text rather than the hover edge */
	background: linear-gradient(#f0f2f5, #f0f2f5) center top / calc(100% - 1rem) 1px no-repeat;
	transition: background-color .12s;
}
.list-regular-row:hover { background: #f3f6fa; }
.list-regular-row:hover + .list-regular-row { background-image: none; }
/* Regular sessions grouped by day */
.list-regular-day {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin: .7rem 0 .1rem;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bs-secondary-color);
}
.list-regular-title + .list-regular-day, .list-regular > .list-regular-day:first-child { margin-top: .2rem; }
.list-regular-day.is-today { color: var(--bs-primary); }
.list-regular-day + .list-regular-row { background-image: none; }   /* no dividing line under a day heading */
.list-regular-row.is-today { background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), .07); }
.list-regular-row.is-today:hover { background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), .12); }
.list-regular-row.is-today + .list-regular-row.is-today { margin-top: 3px; }
.list-regular-row:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; border-radius: .4rem; }
.list-regular-dot { width: .55rem; height: .55rem; border-radius: 50%; flex-shrink: 0; }
.list-regular-text { min-width: 0; flex: 1; }
.list-regular-name { font-size: .92rem; line-height: 1.25; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .45rem; row-gap: 0; }
.list-regular-event { font-weight: 700; }
.list-regular-type { font-size: .85em; width: 1.1em; text-align: center; align-self: center; margin-right: -.15rem; }
img.list-regular-type { height: 1.1em; object-fit: contain; }
.list-event-when .list-regular-type { margin-right: .3rem; width: auto; vertical-align: -.05em; }   /* the same icon on one-off cards, before the time */
.list-regular-times { font-weight: 600; font-size: .82rem; color: #495057; white-space: nowrap; }
.list-regular-name .list-event-marker { align-self: center; }
.list-regular-pattern { font-size: .76rem; color: var(--bs-secondary-color); margin-top: .1rem; }
.list-regular-pattern .fa-repeat { font-size: .68rem; opacity: .7; }
.list-regular-row .group-avatar { width: 2rem; height: 2rem; font-size: .7rem; }


/* Search results (the whole calendar): a summary line beside the search box, then the matches */
.list-search-summary {
	min-height: 2.9rem;
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: 0 .25rem;
	font-weight: 700;
	font-size: .95rem;
}
.list-search-regular .list-regular { max-width: 40rem; padding-top: .45rem; }
.list-regular > .list-regular-row:first-child { background-image: none; }

/* The month heading stays put while you scroll through that month, then hands over to the
   next month's (a sticky element only sticks within its own .list-month section).
   --list-sticky-top is set by event-calendar.js to sit it just under the calendar toolbar. */
.list-month > .list-month-heading {
	position: sticky;
	top: calc(var(--list-sticky-top, 0px) + var(--list-toolbar-h, 0px));
	z-index: 6;
	margin: 1rem -.25rem .6rem;
	padding: .7rem .5rem;
	background: var(--bs-body-bg, #fff);
}

/* Right of a list card: group badge, then the organiser's avatar (events from another Cloud) */
.list-event-side {
	display: flex;
	align-items: center;
	gap: .4rem;
	flex-shrink: 0;
	margin-left: auto;
}
.list-organiser-avatar img { width: 100%; height: 100%; object-fit: cover; }
.list-organiser-avatar.list-group-badge { width: 4.5rem !important; height: 4.5rem !important; }
@media (max-width: 575.98px) {
	.list-organiser-avatar.list-group-badge { width: 3.5rem !important; height: 3.5rem !important; }
}
/* Phones held upright: the group badge and organiser avatar stack, leaving the title more room */
@media (max-width: 575.98px) and (orientation: portrait) {
	.list-event-side { flex-direction: column; gap: .35rem; }
}

/* ═════════════ Calendar list: everything added on 6 Nov ═════════════ */


/* A group's events page: one centred column, on the grey page background (its sticky month
   headings match it) */
.list-group-events .list-month-heading { background: var(--bs-secondary-bg-subtle, #e2e3e5) !important; }

/* List cards' date tile: weekday, then the day number, then the month (SAT / 05 / DEC).
   An event over several days shows both days on one line ("05–06"), smaller so they fit
   the same width as a single day; "Sat–Sun" above, and "Nov–Dec" when it crosses a month */
.list-date-tile .list-date-weekday {
	font-size: .68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
	white-space: nowrap;
}
.list-date-tile .list-date-day { margin: .12rem 0 .1rem; }
.list-date-tile .list-date-month {
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .06em;
	opacity: .6;
	white-space: nowrap;
}
.list-date-tile.is-range .list-date-weekday,
.list-date-tile.is-two-months .list-date-month { font-size: .55rem; letter-spacing: .02em; }
.list-date-tile.is-range .list-date-day {
	margin: .28rem 0 .22rem;
	font-size: 1.15rem;
	letter-spacing: -.05em;
	white-space: nowrap;
}
.list-date-tile .list-date-dash {
	font-weight: 800;
	opacity: .5;
	margin: 0 .08em;
}
/* Today: the tile is filled with the event colour, with even room all round */
.list-date-tile.is-today { padding: .4rem .3rem; }
.list-date-tile.is-today .list-date-weekday { font-size: .6rem; }
.list-date-tile.is-today .list-date-day { font-size: 1.6rem; }
.list-date-tile.is-today .list-date-month { opacity: .85; }
.list-date-tile.is-today.is-range .list-date-day { font-size: .9rem; }
@media (max-width: 575.98px) {
	.list-date-tile.is-range .list-date-day { font-size: .95rem; }
	.list-date-tile.is-range .list-date-weekday,
	.list-date-tile.is-two-months .list-date-month { font-size: .5rem; }
	.list-date-tile.is-today { padding: .35rem .25rem; }
	.list-date-tile.is-today .list-date-day { font-size: 1.35rem; }
	.list-date-tile.is-today.is-range .list-date-day { font-size: .72rem; }
	.list-date-tile.is-today .list-date-weekday { font-size: .55rem; }
}

/* Regular sessions: the left column says where you are with replying - the RSVP marker,
   a quiet "RSVP / in 3 days" when replies haven't opened yet, or the event's colour dot.
   Then the name; the times and repeat pattern; the venue. */
.list-regular-lead {
	flex: 0 0 2.7rem;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
}
.list-regular-lead .list-event-marker { margin: 0 !important; }
.list-regular-when {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: .6rem;
	margin-top: .1rem;
	font-size: .8rem;
	line-height: 1.3;
}
.list-regular-when .list-regular-times { font-size: inherit; }
.list-regular-repeat { color: var(--bs-secondary-color); font-size: .76rem; white-space: nowrap; }
.list-regular-repeat .fa-repeat { font-size: .68rem; opacity: .7; }
.list-regular-pattern .fa-location-dot { font-size: .7rem; opacity: .7; }
/* Replies not open yet */
.list-rsvp-opens {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	color: var(--bs-secondary-color);
}
.list-rsvp-opens-label {
	font-size: .6rem;
	font-weight: 800;
	letter-spacing: .04em;
	opacity: .75;
}
.list-rsvp-opens-date {
	margin-top: .2rem;
	font-size: .6rem;
	font-weight: 600;
	white-space: nowrap;
}

/* ═════════ Calendar list: Events | Timetable ═════════
   Wide screens: the events on the left, the weekly timetable beside them (kept in view).
   Phones: one or the other, by the switch in the bar. */
.list-timetable-col { min-width: 0; }
.list-layout.show-events .list-timetable-col { display: none; }
.list-layout.show-timetable .list-events-col { display: none; }

/* Phones showing the timetable: no "Earlier events" above it */
.is-timetable-mode > .list-load-status { display: none; }

/* The Events | Timetable switch, in the calendar's toolbar: in the list, on narrower screens
   (wider ones show the events and the timetable side by side) */
.cal-mode-holder { display: none; vertical-align: middle; margin-right: .5rem; }
.cal-view-list .cal-mode-holder { display: inline-flex; }
@media (max-width: 575.98px) {   /* phones: a little more compact, so it shares the row with Today, search and + */
	.list-mode-switch button { padding: .3rem .6rem !important; font-size: .8rem !important; }
	.list-mode-switch button i { margin-right: .25rem !important; }
	.cal-toolbar-row { --bs-gutter-x: .75rem; }
}
@media (max-width: 399.98px) {   /* the smallest phones: the words without their icons */
	.list-mode-switch button i { display: none; }
	.list-mode-switch button { padding: .3rem .55rem !important; }
}
.list-mode-switch { display: inline-flex; background: #e6e9ee; border-radius: 2rem; padding: 3px; flex-shrink: 0; transform: translateZ(0); }   /* its own layer, so Safari redraws it cleanly */
.list-mode-switch button {
	border: 0; background: none; border-radius: 2rem;
	padding: .32rem .85rem; font-size: .85rem; font-weight: 700; color: #495057; white-space: nowrap;
}
.list-mode-switch button i { margin-right: .35rem; font-size: .8em; opacity: .7; }
.list-mode-switch, .list-mode-switch * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.list-mode-switch button { -webkit-tap-highlight-color: transparent; outline: none; }
.list-mode-switch button:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.list-mode-switch button:not(.active) { background: none !important; box-shadow: none !important; }
.list-mode-switch button.active { background: var(--bs-body-bg, #fff) !important; color: var(--bs-emphasis-color); box-shadow: 0 1px 3px rgba(0,0,0,.12) !important; }
/* Two columns (events | timetable) from 700px wide */
@media (min-width: 700px), (orientation: landscape) and (max-height: 500px) and (min-width: 600px) {
	.list-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem; align-items: start; }
	.list-layout.show-events .list-timetable-col,
	.list-layout.show-timetable .list-events-col { display: block; }
	.list-timetable-col {
		position: sticky;
		top: calc(var(--list-sticky-top, 0px) + var(--list-toolbar-h, 0px) + .5rem);
		max-height: calc(100vh - var(--list-sticky-top, 0px) - var(--list-toolbar-h, 0px) - 1rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		margin-top: 1rem;
		padding-right: .25rem;
	}
	.cal-mode-holder { display: none !important; }
	.is-timetable-mode > .list-load-status { display: block; }
}

/* The timetable */
.list-tt-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin: .6rem 0 .5rem; }
.list-tt-head h2 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.list-tt-head { align-items: center; }
.list-tt-scope { font-size: .75rem; font-weight: 700; color: var(--bs-primary); }
.list-tt-chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: .6rem; scrollbar-width: none; }
.list-tt-chip {
	border: 1px solid #dfe3e9; border-radius: 2rem; background: var(--bs-body-bg, #fff);
	padding: .32rem .75rem; font-size: .8rem; font-weight: 700; color: #495057; white-space: nowrap;
}
.list-tt-chip small { font-weight: 500; color: var(--bs-secondary-color); margin-left: .3rem; }
.list-tt-chip.active { background: #212529; border-color: #212529; color: #fff; }
.list-tt-chip.active small { color: #ced4da; }
.list-tt-soon { border-radius: .9rem; background: #fff8e6; border: 1px solid #f5dfa3; padding: .6rem .8rem; margin-bottom: .75rem; font-size: .8rem; color: #6b4e00; }
.list-tt-soon h3 { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .3rem; color: #8a6500; }
.list-tt-soon-row { display: flex; gap: .5rem; padding: .1rem 0; }
.list-tt-soon-date { font-weight: 800; min-width: 3.4rem; flex-shrink: 0; }
.list-tt-panel { border: 1px solid #e3e7ee; border-radius: 1rem; padding: .3rem 1rem .5rem; }
.list-tt-empty { color: var(--bs-secondary-color); font-size: .9rem; padding: 1rem 0; }
.list-tt-tag { font-size: .66rem; font-weight: 800; padding: .08rem .4rem; border-radius: .4rem; white-space: nowrap; }
.list-tt-tag.is-ends { background: #fff1d6; color: #8a5a00; }
.list-tt-tag.is-starts { background: #e3f4e8; color: #17663a; }

/* A timetable change, on its date in the events list */
.list-tt-change {
	display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left;
	margin: 0 0 .6rem; padding: .6rem .8rem; border-radius: .9rem;
	background: #f1f6fd; border: 1px dashed #b9d0f0; color: #1d4f91; font-size: .82rem;
}
.list-tt-change:hover { background: #e8f0fb; }
.list-tt-change-date {
	width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: .6rem; background: #fff;
	display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.list-tt-change-date b { font-size: 1rem; }
.list-tt-change-date small { font-size: .55rem; font-weight: 800; text-transform: uppercase; }
.list-tt-change-text { flex: 1; min-width: 0; }
.list-tt-change-text strong { display: block; font-size: .9rem; color: #173f75; }
.list-tt-change-go { opacity: .5; font-size: .8rem; }

/* Search: repeating events that have finished, folded away under the running ones */
.list-search-finished { border: 1px solid #e3e7ee; border-radius: 1rem; margin-top: .25rem; }
.list-search-finished > summary {
	display: flex; align-items: center; list-style: none; cursor: pointer;
	padding: .65rem .9rem; font-size: .85rem; font-weight: 700; color: var(--bs-secondary-color);
}
.list-search-finished > summary::-webkit-details-marker { display: none; }
.list-search-finished[open] .list-search-finished-chev { transform: rotate(180deg); }
.list-search-finished-panel { border: 0 !important; padding: 0 .9rem .5rem !important; margin: 0 !important; }
.list-search-finished-panel .list-regular-row { opacity: .6; }
.list-tt-tag.is-ended { background: #eef0f3; color: #6c757d; }

.list-event-card {
	position: relative;
	margin-bottom: .6rem;
	border: 0;
	border-radius: .875rem;
	background: var(--bs-body-bg);
	box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .07);
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow .15s ease, transform .15s ease;
}

/* Red bar: only on events still waiting for your reply */
.list-event-card.needs-reply::before {
	content: "";
	position: absolute;
	top: .6rem;
	bottom: .6rem;
	left: 0;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--bs-danger);
}

@media (hover: hover) {
	.list-event-card:hover {
		box-shadow: 0 .35rem .9rem rgba(0, 0, 0, .1);
	}
}

.list-event-card:active {
	transform: scale(.995);
}

.list-event-card:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
}

.list-event-inner {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: .85rem 1rem .85rem .85rem;
}

/* The date block: month over a big day number */
.list-date-tile {
	flex: 0 0 auto;
	width: 3.5rem;
	padding: .35rem 0 .4rem;
	border-radius: .6rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	color: var(--bs-emphasis-color);
}

.list-date-month {
	font-size: .75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.list-date-day {
	margin-top: .15rem;
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -.03em;
}

/* Text */
.list-event-body {
	flex: 1 1 auto;
	min-width: 0;
}

.list-event-title {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0 0 .15rem;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--bs-emphasis-color);
}

.list-event-title-text {
	min-width: 0;
}

.list-event-marker {
	flex-shrink: 0;
}

.list-event-when {
	margin: 0;
	font-size: .875rem;
	font-weight: 600;
	color: var(--bs-body-color);
}

.list-event-details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem .75rem;
	margin-top: .25rem;
	font-size: .8125rem;
	color: var(--bs-secondary-color);
}

.list-repeat-pill {
	display: inline-flex;
	align-items: center;
	padding: .1rem .5rem;
	border-radius: 999px;
	background: var(--bs-tertiary-bg);
	border: 1px solid var(--bs-border-color-translucent);
	color: var(--bs-body-color);
	font-weight: 600;
	white-space: nowrap;
}

/* The "Results" pill on a list card: yellow, like the calendar's trophy badge */
.list-results-pill { background: #ffc107; border-color: #ffc107; color: #000; }
.list-results-pill:hover { background: #ffcd39; border-color: #ffcd39; color: #000; }

.list-group-badge {
	width: 2.75rem !important;
	height: 2.75rem !important;
	font-size: 1rem !important;
	font-weight: 900;
	line-height: 1;
}

@media (max-width: 575.98px) {
	.list-event-inner { gap: .75rem; padding: .65rem .75rem .65rem .6rem; }
	.list-date-tile { width: 3rem; }
	.list-date-day { font-size: 1.6rem; }
	.list-group-badge { width: 2.25rem !important; height: 2.25rem !important; font-size: .85rem !important; }
}

@media (prefers-reduced-motion: reduce) {
	.list-event-card { transition: none; }
	.list-event-card:active { transform: none; }
}



.group-card-btn:hover { background: rgba(127,127,127,0.25) !important; }

.nowrap{
	white-space: nowrap;}

[data-bs-toggle="collapse"] i {
	transition: transform 0.2s ease;
}

[data-bs-toggle="collapse"]:not(.collapsed) i {
	transform: rotate(180deg);
}

/* @mention highlighting in a posted message (see CommentContentText::
   highlightMentions in comment.php) */
.chat-mention {
	font-weight: 600;
	color: #7ec6ff;
	background: rgba(126, 198, 255, 0.15);
	padding: 0 0.2em;
	border-radius: 0.2em;
}

/* The @ autocomplete dropdown (see renderMentionDropdown in
   chat-client.js) — positioned via a live measurement of the composer,
   so no CSS anchoring assumptions about DOM nesting are needed. */
#mention-dropdown .list-group-item.active {
	background-color: #c93b70;
	border-color: #c93b70;
}


.person-pick { cursor: pointer; }
.person-pick .card {
	opacity: .55;
	transition: opacity .15s ease-in-out, transform .15s ease-in-out;}
.person-pick:hover .card { opacity: .85; transform: scale(1.03); }
.btn-check:checked + .person-pick .card { opacity: 1; }
.btn-check:focus-visible + .person-pick .card {
	outline: .25rem solid rgba(var(--bs-success-rgb), .3);
	outline-offset: 2px;}
@media (prefers-reduced-motion: reduce) {
	.person-pick .card { transition: none; }
	.person-pick:hover .card { transform: none; }
}


/* ═══════════════════════════════════════════════════════════════
   WEATHER & WATER MODALS
   Used by #weatherModal and #waterModal.
   All classes prefixed with .cm- (conditions modal) for isolation.
   Chart rendering and badge generation lives in event-safety-client.js
   ═══════════════════════════════════════════════════════════════ */

/* ── Modal shell ─────────────────────────────────────────── */

.cm-modal .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.cm-modal .modal-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cm-modal .modal-title small {
  font-weight: 400;
  color: #6b7280;
}
.cm-modal .modal-body {
  padding: 1.25rem;
  background: #fafafa;
}
.cm-modal .modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8125rem;
  color: #6b7280;
  background: #fff;
}

/* ── Section labels ──────────────────────────────────────── */
.cm-section { margin-bottom: 1.5rem; }
.cm-section:last-child { margin-bottom: 0; }
.cm-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 12px;
}

/* ── Headline strip (5 metric cards) ─────────────────────── */
.cm-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.cm-cards-grid > .cm-metric-card:nth-child(1),
.cm-cards-grid > .cm-metric-card:nth-child(2),
.cm-cards-grid > .cm-metric-card:nth-child(3) {
  grid-column: span 2;
}
.cm-cards-grid > .cm-metric-card:nth-child(4),
.cm-cards-grid > .cm-metric-card:nth-child(5) {
  grid-column: span 3;
}

@media (max-width: 1100px) {
  .cm-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-cards-grid > .cm-metric-card:nth-child(n) { grid-column: span 1; }
}
@media (max-width: 420px) {
  .cm-cards-grid { grid-template-columns: 1fr; }
}

/* ── Station map link ────────────────────────────────────── */
.cm-station-name-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.12s ease;
}
.cm-station-name-link:hover {
  color: #0e7c86;
  text-decoration: none;
}
.cm-station-card.is-active .cm-station-name-link:hover { color: #5a3415; }
.cm-station-card.is-recent .cm-station-name-link:hover { color: #92400e; }

.cm-station-link-icon {
  font-size: 9px;
  opacity: 0.5;
  transition: opacity 0.12s ease;
}
.cm-station-name-link:hover .cm-station-link-icon {
  opacity: 1;
}

.cm-metric-card {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.cm-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.cm-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 500;
}
.cm-metric-value {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #111827;
}
.cm-metric-value-sm { font-size: 24px; }
.cm-metric-unit {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  margin-left: 2px;
}
.cm-metric-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
}
.cm-metric-context {
  margin-top: auto;
  padding-top: 10px;
}

/* ── Context badges ──────────────────────────────────────── */
.cm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.cm-badge-temp-cold     { background: #ecfeff; color: #155e75; }
.cm-badge-temp-cool     { background: #f0fdfa; color: #115e59; }
.cm-badge-temp-mild     { background: #fefce8; color: #854d0e; }
.cm-badge-temp-warm     { background: #fef3c7; color: #92400e; }
.cm-badge-wind-low      { background: #dcfce7; color: #166534; }
.cm-badge-wind-mod      { background: #fef3c7; color: #854d0e; }
.cm-badge-wind-strong   { background: #fee2e2; color: #991b1b; }
.cm-badge-uv-low        { background: #dcfce7; color: #166534; }
.cm-badge-uv-mod        { background: #fef3c7; color: #854d0e; }
.cm-badge-uv-high       { background: #fed7aa; color: #9a3412; }
.cm-badge-uv-vhigh      { background: #fee2e2; color: #991b1b; }
.cm-badge-uv-extreme    { background: #ede9fe; color: #5b21b6; }
.cm-badge-cloud         { background: #f1f5f9; color: #475569; }
.cm-badge-seastate      { background: #ccfbf1; color: #115e59; }
.cm-badge-current       { background: #f1f5f9; color: #475569; }
.cm-badge-quality-good  { background: #dcfce7; color: #166534; }
.cm-badge-quality-mod   { background: #fef3c7; color: #854d0e; }
.cm-badge-quality-poor  { background: #fee2e2; color: #991b1b; }
.cm-badge-alert         { background: #fee2e2; color: #991b1b; }

/* ── Visual support elements ─────────────────────────────── */

/* Bar trend (Sea State card) */
.cm-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  margin-top: 8px;
}
.cm-bar { flex: 1; background: #0e7c86; border-radius: 1px; }

/* Gradient track (UV, water temp) */
.cm-track {
  height: 4px;
  border-radius: 2px;
  margin-top: 12px;
  position: relative;
}
.cm-track-uv {
  background: linear-gradient(to right,
	#22c55e 0%, #facc15 27%, #fb923c 55%, #ef4444 73%, #a855f7 100%);
}
.cm-track-temp {
  background: linear-gradient(to right,
	#1e3a8a 0%, #06b6d4 30%, #14b8a6 60%, #f59e0b 85%, #dc2626 100%);
}
.cm-track-marker {
  position: absolute;
  top: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111827;
  border: 2px solid #fff;
  transform: translateX(-50%);
}

/* ── Hourly strip ────────────────────────────────────────── */
.cm-hourly-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 700px) {
  .cm-hourly-strip {
	grid-template-columns: repeat(6, 80px);
	overflow-x: auto;
	padding-bottom: 6px;
  }
}

.cm-hour-card {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  position: relative;
}
.cm-hour-card.is-event { border-color: #0e7c86; background: #f0fdfa; }
.cm-hour-card.is-now   { border-color: #f59e0b; background: #fffbeb; }
.cm-hour-time {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 6px;
}
.cm-hour-icon {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  color: #6b7280;
}
.cm-hour-card.is-event .cm-hour-icon { color: #0e7c86; }
.cm-hour-card.is-now .cm-hour-icon   { color: #f59e0b; }
.cm-hour-primary {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
}
.cm-hour-secondary {
  font-size: 10px;
  color: #6b7280;
  margin-top: 4px;
}
.cm-hour-pill {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #0e7c86;
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.cm-hour-pill.now { background: #f59e0b; }

/* ── Chart card ──────────────────────────────────────────── */
.cm-chart-card {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
}
.cm-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.cm-chart-title { font-size: 13px; font-weight: 500; color: #111827; }
.cm-chart-legend { display: flex; gap: 14px; font-size: 11px; color: #6b7280; }
.cm-chart-legend-item { display: flex; align-items: center; gap: 5px; }
.cm-legend-swatch { width: 12px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.cm-chart-footnote {
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}

/* ── Detail rows ─────────────────────────────────────────── */
.cm-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  row-gap: 0;
}
@media (max-width: 600px) {
  .cm-details-grid { grid-template-columns: 1fr; }
}

.cm-detail-row-empty {
	/* Empty filler cell — invisible but holds the grid slot */
	border: none !important;
	background: transparent !important;
}
.cm-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
}
.cm-detail-row:nth-last-child(-n+2) { border-bottom: none; }
@media (max-width: 600px) {
  .cm-detail-row:not(:last-child) { border-bottom: 0.5px solid rgba(0, 0, 0, 0.06); }
}
.cm-detail-label { color: #6b7280; padding-right: 12px; }
.cm-detail-value { color: #111827; font-weight: 500; text-align: right; }

/* ── Empty state ─────────────────────────────────────────── */
.cm-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #6b7280;
  font-size: 13px;
}
.cm-empty-state strong { color: #111827; display: block; margin-bottom: 4px; }

/* ── Compass arrow helper ────────────────────────────────── */
.cm-compass-arrow {
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ── Sewage station cards ────────────────────────────────── */
.cm-station-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 600px) {
  .cm-station-grid { grid-template-columns: 1fr; }
}

.cm-station-card {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-station-card.is-active {
  border: 1px solid #b08968;
  background: #faf5ef;
}
.cm-station-card.is-recent {
  border: 1px solid #fcd34d;
  background: #fffbeb;
}

.cm-station-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cm-station-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #6b7280;
}
.cm-station-card.is-active .cm-station-icon {
  background: #e9dccd;
  color: #6b3e1f;
}
.cm-station-card.is-recent .cm-station-icon {
  background: #fef3c7;
  color: #b45309;
}

.cm-station-meta {
  flex: 1;
  min-width: 0;
}
.cm-station-name {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  line-height: 1.2;
}
.cm-station-card.is-active .cm-station-name { color: #5a3415; }
.cm-station-watercourse {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-station-distance {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.cm-station-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
  font-size: 12px;
}
.cm-station-card.is-active .cm-station-status-row {
  border-top-color: rgba(107, 62, 31, 0.2);
}
.cm-station-card.is-recent .cm-station-status-row {
  border-top-color: rgba(180, 83, 9, 0.2);
}

.cm-station-status-text { color: #6b7280; }
.cm-station-card.is-active .cm-station-status-text {
  color: #5a3415; font-weight: 500;
}
.cm-station-card.is-recent .cm-station-status-text {
  color: #92400e; font-weight: 500;
}

.cm-station-duration {
  font-weight: 500;
  color: #111827;
  font-size: 12px;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 999px;
}
.cm-station-card.is-active .cm-station-duration {
  background: #6b3e1f; color: #fff;
}
.cm-station-card.is-recent .cm-station-duration {
  background: #f59e0b; color: #fff;
}

.cm-station-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b3e1f;
  flex-shrink: 0;
  animation: cm-pulse 1.5s ease-in-out infinite;
}
@keyframes cm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ── Quality card discharge states ───────────────────────── */
.cm-metric-card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cm-metric-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
}

.cm-metric-card.is-active {
  background: #faf5ef;
  border: 1px solid #b08968;
}
.cm-metric-card.is-active:hover {
  box-shadow: 0 4px 12px rgba(107, 62, 31, 0.18);
}
.cm-metric-card.is-active .cm-metric-label { color: #6b3e1f; }
.cm-metric-card.is-active .cm-metric-value { color: #5a3415; }
.cm-metric-card.is-active .cm-metric-sub   { color: #6b3e1f; }

.cm-metric-card.is-recent {
  background: #fffbeb;
  border: 1px solid #fcd34d;
}
.cm-metric-card.is-recent:hover {
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.18);
}
.cm-metric-card.is-recent .cm-metric-label { color: #92400e; }
.cm-metric-card.is-recent .cm-metric-sub   { color: #92400e; }

/* Updated badges */
.cm-badge-quality-recent { background: #fef3c7; color: #92400e; }
.cm-badge-quality-active { background: #6b3e1f; color: #fff; }

/* Pulse dot for active state in badge */
.cm-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: cm-pulse 1.5s ease-in-out infinite;
}

/* Click affordance hint at the card bottom-right */
.cm-station-link-hint {
  font-size: 10px;
  color: #9ca3af;
}
.cm-metric-card.is-active .cm-station-link-hint { color: #8a5a35; }
.cm-metric-card.is-recent .cm-station-link-hint { color: #b45309; }

/* Adjust the existing context layout to space the badge and hint */
.cm-metric-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Smooth scroll inside the modal so the anchor click 
   glides rather than jumps */
.cm-modal .modal-body {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD STAT TILES — UNIFIED TYPOGRAPHY + STATUS-DRIVEN COLOUR
   Used by event-summary-v2.php dashboard stat cards.
   Coheres with the .cm- modal type system but with its own scale.
   ═══════════════════════════════════════════════════════════════ */

.stat-tile {
	position: relative;
	border-radius: 12px;
	padding: 16px;
	height: 100%;
	min-height: 220px;
	overflow: hidden;
	border: 0.5px solid rgba(0, 0, 0, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.stat-card-link:hover .stat-tile {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	border-color: rgba(0, 0, 0, 0.12);
}

.stat-tile-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.stat-tile-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}
.stat-tile-label i {
	font-size: 14px;
	width: 16px;
	text-align: center;
}

.stat-tile-value {
	font-size: 28px;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1;
	color: #111827;
	display: flex;
	align-items: baseline;
	gap: 4px;
}
.stat-tile-value.stat-tile-value-sm { font-size: 22px; }

.stat-tile-unit {
	font-size: 13px;
	font-weight: 400;
	color: rgba(0, 0, 0, 0.55);
	margin-left: 2px;
}

.stat-tile-sub {
	font-size: 12px;
	color: rgba(0, 0, 0, 0.6);
	margin-top: 8px;
	line-height: 1.4;
}

.stat-tile-footer {
	margin-top: auto;
	padding-top: 10px;
	font-size: 10px;
	color: rgba(0, 0, 0, 0.4);
	text-align: right;
}

.stat-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 500;
	margin-top: 8px;
}

.water-tile {
	overflow: hidden;
}
 
.water-tile .beach-strip {
	position: absolute;
	background: #fbbf24;
	z-index: 2;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transform-origin: center center;
}
 
/* ── Horizontal-anchored strips (top + bottom) ───────────────── */
.water-tile .beach-strip.strip--top,
.water-tile .beach-strip.strip--bottom {
	left: 70%;
	width: 200%;
	height: 75px;
}
.water-tile .beach-strip.strip--top    { top: 0; }
.water-tile .beach-strip.strip--bottom { bottom: 0; }
 
/* ── Vertical-anchored strips (left + right) ─────────────────── */
.water-tile .beach-strip.strip--left,
.water-tile .beach-strip.strip--right {
	top: 70%;
	width: 75px;
	height: 200%;
}
.water-tile .beach-strip.strip--left  { left: 0; }
.water-tile .beach-strip.strip--right { right: 0; }
 
.water-tile .stat-tile-content {
	position: relative;
	z-index: 3;
}
 
/* "No data yet" state — toned-down value text for the muted card */
.water-tile.is-unfetched .stat-tile-value {
	color: rgba(255, 255, 255, 0.95);
}
.water-tile.is-unfetched .stat-tile-sub {
	color: rgba(255, 255, 255, 0.80);
}
.water-tile.is-unfetched .stat-tile-sub > div {
	margin-top: 3px;
}
 
/* Pulse animation for the active-discharge badge */
.stat-badge.is-pulsing {
	animation: cm-pulse-soft 1.8s ease-in-out infinite;
}
@keyframes cm-pulse-soft {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.7; }
}

.cm-surf-quality-panel {
	border-radius: 12px;
	padding: 18px 20px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
}
.cm-surf-quality-pumping { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-color: #6ee7b7; }
.cm-surf-quality-good    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); border-color: #93c5fd; }
.cm-surf-quality-fair    { background: linear-gradient(135deg, #fef9c3, #fef08a); border-color: #fde047; }
.cm-surf-quality-poor    { background: linear-gradient(135deg, #fed7aa, #fdba74); border-color: #fb923c; }
.cm-surf-quality-junk    { background: linear-gradient(135deg, #fecaca, #fca5a5); border-color: #f87171; }

.cm-surf-quality-header { margin-bottom: 14px; }
.cm-surf-quality-label-row { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.cm-surf-quality-eyebrow {
	font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
	letter-spacing: 0.06em; color: #475569;
}
.cm-surf-quality-score {
	font-size: 0.85rem; font-weight: 600;
	padding: 1px 8px; border-radius: 999px;
	background: rgba(255,255,255,0.7); color: #1e293b;
}
.cm-surf-quality-title { font-size: 1.6rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.cm-surf-quality-detail { font-size: 0.875rem; color: #334155; margin-top: 4px; }
 
.cm-surf-quality-component-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #475569;
	font-weight: 600;
}
 
.cm-surf-quality-component-badge {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
	text-wrap: nowrap;
	background: rgba(255,255,255,0.8);
}
 
.cm-surf-quality-component-sentence {
	font-size: 0.85rem;
	color: #334155;
	line-height: 1.35;
}
 
/* Quality colour tokens — keep existing or add if missing */
.cm-quality-good { color: #166534; }
.cm-quality-fair { color: #854d0e; }
.cm-quality-poor { color: #991b1b; }

.stat-tile-surf-quality {
	margin-bottom: 6px;
}
 
.stat-tile-surf-quality-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
 
.stat-tile-surf-quality-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.1;
}
 
.stat-tile-surf-quality-score {
	font-size: 0.8rem;
	font-weight: 600;
	color: #1e293b;
	background: rgba(255,255,255,0.85);
	padding: 1px 8px;
	border-radius: 999px;
}
 
.stat-tile-surf-quality-detail {
	font-size: 0.85rem;
	color: rgba(255,255,255,0.85);
	margin-top: 2px;
}

.cm-quality-stars {
	display: inline-flex;
	align-items: center;
	gap: 6px;          /* space between stars block and score */
	font-size: 0.9rem;
	color: #707070;
	line-height: 1;
}
 
.cm-quality-stars-icons {
	display: inline-flex;
	gap: 2px;          /* space between individual stars */
}
 
.cm-quality-stars-value {
	font-size: 0.8rem;
	font-weight: 600;
	color: #475569;
}
 
/* Empty-star colour on light backgrounds */
.cm-quality-stars .fa-regular.fa-star {
	color: #707070;
}
 
/* Dark-gradient context (water card on dashboard) */
.cm-quality-stars.cm-quality-stars-on-dark {
	color: #fffbed;
}
.cm-quality-stars.cm-quality-stars-on-dark .fa-regular.fa-star {
	color: rgba(255,255,255,0.4);
}
.cm-quality-stars.cm-quality-stars-on-dark .cm-quality-stars-value {
	color: rgba(255,255,255,0.85);
}

/* ───── REGISTRATION ───── */
.reg-tile {
	background: linear-gradient(135deg, #f5acce 0%, #6cb1f8 100%);
}
.reg-tile .stat-tile-value { color: #1a1a2e; }

/* ───── ARA — outcome drives colour ───── */
.ara-tile { background: #e9ecef; }
.ara-tile.ara-proceed {
	background: conic-gradient(from 45deg, #198754 0deg, #198754 60deg, #1a9e62 calc(60deg + 0.1deg), #1a9e62 120deg, #1db573 calc(120deg + 0.1deg), #1db573 180deg, #20c980 calc(180deg + 0.1deg), #20c980 240deg, #4dd68f calc(240deg + 0.1deg), #4dd68f 300deg, #7de3a8 calc(300deg + 0.1deg) 360deg);
	color: #fff;
}
.ara-tile.ara-proceed .stat-tile-label,
.ara-tile.ara-proceed .stat-tile-sub,
.ara-tile.ara-proceed .stat-tile-footer { color: rgba(255,255,255,0.85); }
.ara-tile.ara-proceed .stat-tile-value { color: #fff; }

.ara-tile.ara-caution {
	background: conic-gradient(from 45deg, #ffa000 0deg, #ffa000 60deg, #ffad02 calc(60deg + 0.1deg), #ffad02 120deg, #ffbc20 calc(120deg + 0.1deg), #ffbc20 180deg, #ffcb50 calc(180deg + 0.1deg), #ffcb50 240deg, #ffda7f calc(240deg + 0.1deg), #ffda7f 300deg, #ffe99d calc(300deg + 0.1deg) 360deg);
}
.ara-tile.ara-caution .stat-tile-value { color: #4a2900; }

.ara-tile.ara-stop {
	background: conic-gradient(from 45deg, #8b0000 0deg, #8b0000 60deg, #a00010 calc(60deg + 0.1deg), #a00010 120deg, #b8001a calc(120deg + 0.1deg), #b8001a 180deg, #cc0033 calc(180deg + 0.1deg), #cc0033 240deg, #d4254a calc(240deg + 0.1deg), #d4254a 300deg, #dc4060 calc(300deg + 0.1deg) 360deg);
	color: #fff;
}
.ara-tile.ara-stop .stat-tile-label,
.ara-tile.ara-stop .stat-tile-sub,
.ara-tile.ara-stop .stat-tile-footer { color: rgba(255,255,255,0.85); }
.ara-tile.ara-stop .stat-tile-value { color: #fff; }

/* ───── WEATHER — temperature drives gradient ─────
	  Five temperature classes (.wx-cold → .wx-hot) set
	  the base "sky" colour. The .wx-tile::after pseudo-
	  element handles the cloud layer separately, with
	  opacity driven by the --cloud-cover CSS variable. */
   
   .wx-tile {
	   background: #94a3b8;
	   position: relative;
	   --cloud-cover: 0;
   }
   
   /* Temperature gradients — unchanged */
   .wx-tile.wx-cold { background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 50%, #bfdbfe 100%); }
   .wx-tile.wx-cool { background: linear-gradient(135deg, #5eead4 0%, #a7f3d0 50%, #d1fae5 100%); }
   .wx-tile.wx-mild { background: linear-gradient(135deg, #84cc16 0%, #fde68a 70%, #f59e0b 100%); }
   .wx-tile.wx-warm { background: linear-gradient(135deg, #f59e0b 0%, #fcd34d 50%, #fde68a 100%); }
   .wx-tile.wx-hot  { background: linear-gradient(135deg, #ea580c 0%, #f59e0b 50%, #fde68a 100%); }
   
   .wx-tile::after {
	   content: '';
	   position: absolute;
	   top: calc(-28% - var(--cloud-cover, 0) * 0.5%);
	   left: calc(0% - var(--cloud-cover, 0) * 0.5%);
	   /* Container grows with cloud cover to prevent clipping the bigger background image */
	   width: calc(130% + var(--cloud-cover, 0) * 1%);
	   height: calc(157% + var(--cloud-cover, 0) * 1%);
	   background: url('/template/images/clouds.png') no-repeat;
	   background-size: 100% auto;
	   background-position: center center;
	   pointer-events: none;
	   z-index: 1;
	   opacity: 1;
	   /* Adjusted position formula: stronger pull leftward at low cloud cover 
		  so the cloud arrives sooner */
	   transform: translateX(calc(75% - (var(--cloud-cover, 0) * 0.9%)));
   }
   
   /* Secondary cloud — flipped horizontally, smaller, offset vertically.
	  Fills the gaps the primary cloud leaves at high cloud cover. */
   .wx-tile::before {
	   content: '';
	   position: absolute;
	   top: 10%;
	   left: 0;
	   width: 110%;
	   height: 120%;
	   background: url('/template/images/clouds.png') no-repeat;
	   background-size: 100% auto;
	   background-position: center center;
	   pointer-events: none;
	   z-index: 1;
	   transform: translateX(calc(95% - (var(--cloud-cover, 0) * 1.50%))) scaleX(-1);
   }
   
   .wx-tile.is-unfetched::after,
   .wx-tile.is-unfetched::before {
	   display: none;
   }
   
   .wx-tile .stat-tile-content {
	   position: relative;
	   z-index: 2;
   }

/* ───── TIDE — preserves existing fill animation ───── */
.tide-tile {
	background: #ecfeff;
}
.tide-tile.is-high .stat-tile-value,
.tide-tile.is-high .stat-tile-sub,
.tide-tile.is-high .stat-tile-label,
.tide-tile.is-high .stat-tile-footer { color: #fff; }
.tide-tile.is-high .stat-tile-unit   { color: rgba(255,255,255,0.75); }

/* ───── WATER — striped gradient set inline by PHP ─────
   The actual gradient is set via inline `style="background: ..."`
   from EventWaterCardStyle::getGradient(). This block handles only
   the overlay scrim and text contrast. */
.water-tile {
	background: #94a3b8;  /* fallback if PHP doesn't set inline */
}
.water-tile .stat-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.0) 0%,
		rgba(0, 0, 0, 0.06) 60%,
		rgba(0, 0, 0, 0.10) 100%
	);
	pointer-events: none;
}

/* All text on water tile is white with subtle shadow */
.water-tile .stat-tile-label,
.water-tile .stat-tile-sub,
.water-tile .stat-tile-footer {
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.water-tile .stat-tile-sub strong { color: #fff; }
.water-tile .stat-tile-value { color: #fff; }

.water-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 4px;
}
.water-pill {
	background: rgba(255, 255, 255, 0.92);
	color: #111827;
	padding: 6px 11px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* ───── RSVP OPTIONS — neutral white, pills carry status ───── */
.rsvp-tile {
	background: #fff;
}
.rsvp-tile #rsvp-view-panel {
	flex: 1;
	overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   END WEATHER & WATER MODALS
   ═══════════════════════════════════════════════════════════════ */


/* Calendar Nav */



/* event bar base */
.event-bar {
	border-radius: .25rem 1rem 1rem .25rem;
	font-size: .85rem;
	pointer-events: auto;
	margin: .5rem 0;
	height: 25px;
	overflow: hidden;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;}
	
	.event-bar:hover {
		transform: translateY(-1px);
		box-shadow: 0 3px 6px rgba(0,0,0,0.15);}
	
	.event-bar:active {
		transform: translateY(1px);
		box-shadow: 0 1px 2px rgba(0,0,0,0.1);}
.event-logo {
	width: 34px!important;
	height: 34px!important;}
/* ───── CALENDAR RESULTS BADGE ─────
   A flat black trophy in a yellow circle before an event's title when it has results.
   A past event with results is faded with see-through colours (.cal-faded, set in
   event-calendar.js) rather than opacity-50, so the badge stays at full strength. */
.cal-results-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.35em;
	height: 1.35em;
	margin: 0 .2rem;
	border-radius: 50%;
	background: #ffc107;
	color: #000;
	box-shadow: 0 0 0 2px #fff;
	position: relative;
	z-index: 2;
	opacity: 1;
	vertical-align: middle;
}
.cal-results-icon i { font-size: .85em; line-height: 1; }
.event-bar.cal-has-results { overflow: visible; }   /* lets the badge sit over the bar's edge on shorter (mobile) bars */
.event-bar.cal-has-results .event-logo { max-height: 100%; object-fit: cover; }   /* still cropped to the bar */
.event-bar .cal-results-icon { width: 24px; height: 24px; margin: 0 .15rem 0 0; }
.event-bar .cal-results-icon i { font-size: 14px; }
.cal-faded img, .cal-faded .group-avatar, .cal-faded .rounded-circle:not(.cal-results-icon) { opacity: .5; }

.group-avatar{
	width:20px; height:20px; font-size:0.65rem; line-height:1; font-weight:900;}	


.message-bubble:before{
	content: '';
	position: absolute;
	left: 8px;
	bottom: 6px;
	width: 0;
	height: 0;
	border: 10px solid transparent;
	border-right-color: #cccdce;
	border-left: 0;
	margin-top: 13px;
	margin-left: -20px;}

.message-bubble-me{
	background-color: #2394fc !important;
	color: #fff !important;}


.message-bubble-me:before{
	content: '';
	position: absolute;
	right: 8px;
	bottom: 4px;
	width: 0;
	height: 0;
	border: 10px solid transparent;
	border-left-color: #3b78c9;
	border-right: 0;
	margin-top: 13px;
	margin-right: -20px;}
.message-bubble-me a{
	color: #fff;}
	
.message-bubble .reaction-count{
	bottom: -18px!important;
	right: 4%!important;
	z-index: 1;}

.message-bubble-me .reaction-count{
	bottom:-18px!important;
	right:4%!important;}
.message-bubble-me .btn-outline-secondary:not(:hover):not(:focus){
	border-color: #fff!important;
	color: #fff!important;}


.message-not-seen {
	border-color: #c93b70!important;}
	.message-not-seen:before{
	border-right-color: #c93b70;}

/* ── WhatsApp-style message grouping (see applyMessageGrouping in
   chat.js). .message-grouped = any message in a block that is NOT the
   block's most recent; .message-block-below = the newer partner sharing
   an edge with a grouped message above it. Only the most recent message
   of a block keeps its speech-bubble tail and avatar; grouped edges are
   tightened. The margin overrides need !important because Bootstrap's
   .my-3 (on the bubble) is itself !important. The avatar uses
   visibility (not display) so the bubble's left alignment within a
   block stays identical whether the avatar is shown or not. */
.message-grouped .message-bubble:before,
.message-grouped .message-bubble-me:before {
	display: none;
}
.message-grouped .chat-avatar {
	visibility: hidden;
}
.message-grouped .message-bubble,
.message-grouped .message-bubble-me {
	margin-bottom: 0.3rem !important;
}
.message-block-below .message-bubble,
.message-block-below .message-bubble-me {
	margin-top: 0.3rem !important;
}

/* ── Asymmetric bubble corners within a message block (classes set by
   applyMessageGrouping in chat.js). The two classes compose to give
   each position its shape:
	 block START  (.message-grouped only)      → big rounded-4 tops,
												  both bottoms 0.375rem
	 MIDDLES      (both classes)               → all four 0.375rem
	 block END    (.message-block-below only)  → both tops 0.375rem;
												  bottom: tail-side
												  0.375rem, away side
												  keeps rounded-4
	 SINGLE       (neither class)              → rounded-4 with just the
												  tail corner 0.375rem
   The tail side is bottom-right on own messages (.message-bubble-me),
   bottom-left on everyone else's. !important needed to outrank
   Bootstrap's .rounded-4 (itself !important). */
.comment-holder:not(.message-grouped) .message-bubble {
	border-bottom-left-radius: 0.375rem !important;
}
.comment-holder:not(.message-grouped) .message-bubble-me {
	border-bottom-right-radius: 0.375rem !important;
}
.message-grouped .message-bubble,
.message-grouped .message-bubble-me {
	border-bottom-left-radius: 0.375rem !important;
	border-bottom-right-radius: 0.375rem !important;
}
.message-block-below .message-bubble,
.message-block-below .message-bubble-me {
	border-top-left-radius: 0.375rem !important;
	border-top-right-radius: 0.375rem !important;
}

/* ── Floating scroll-to-bottom button (see ensureScrollBottomBtn in
   chat.js). #chat is wrapped in a position:relative shell by the JS,
   and the button is absolutely pinned to the shell's bottom-right
   corner — entirely OUTSIDE the scrolling content, so it cannot
   interact with scrolling at all. (An earlier sticky-inside-the-
   scroller version failed in Safari, which doesn't reliably honour
   position:sticky inside a column-reverse flex container.) */
#chat-shell {
	position: relative;
}
#scroll-bottom-btn {
	position: absolute;
	right: 1.5rem;
	bottom: 1rem;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #54656f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	opacity: 0;
	pointer-events: none;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 10;
}
#scroll-bottom-btn.visible {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}
.scroll-bottom-badge {
	position: absolute;
	top: -6px;
	right: -4px;
	background: #c93b70;
	color: #fff;
	border-radius: 999px;
	font-size: 0.65rem;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	padding: 0 4px;
}

/* ── WhatsApp-style day dividers + bubble timestamps (see
   applyDayMarkers / formatTimeHHMM in chat.js). The marker div is a
   flex item of the column-reverse #chat scroller like the message rows
   themselves. */
.day-marker-label {
	display: inline-block;
	background: rgba(0, 0, 0, 0.08);
	color: #54656f;
	font-size: 0.75rem;
	font-weight: 500;
	padding: 0.25rem 0.75rem;
	border-radius: 0.5rem;
}

.chat-time {
	font-size: 0.7rem;
	white-space: nowrap;
}

/* ── Jump-to-message highlight (see flashComment in chat.js): a brief
   pulse on the target bubble after jumping to it, so the eye lands on
   the right message — especially when arriving via a reply preview
   into a freshly-loaded window of old history. */
@keyframes comment-flash-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(201, 59, 112, 0.55); }
	60%  { box-shadow: 0 0 0 10px rgba(201, 59, 112, 0); }
	100% { box-shadow: 0 0 0 0 rgba(201, 59, 112, 0); }
}
.comment-flash {
	animation: comment-flash-pulse 0.8s ease-out 2;
}

/* ── Message search (see ensureChatSearch in chat.js). A circular
   magnifier button floats top-right of the chat shell (mirroring the
   scroll-to-bottom button); tapping it slides the input panel out to
   its left. Both are nudged down via the sibling rules below when the
   pin bar occupies the top of the shell. Results float over the chat
   rather than pushing it down, so opening/closing never reflows the
   scroller. */
#chat-search-toggle {
	position: absolute;
	top: 0.85rem;
	right: 1.5rem;
	width: 45px;
	height: 45px;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #54656f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	z-index: 31;
}
#chat-search {
	position: absolute;
	/* Toggle is 42px tall; a full-size input-group is ~38px — the +2px
	   centres the two vertically. */
	top: calc(0.75rem + 2px);
	right: calc(1.5rem + 52px);
	width: min(320px, 60vw);
	z-index: 30;
	opacity: 0;
	pointer-events: none;
	transform: translateX(10px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}
#chat-search.open {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}
/* Pin bar present (it's an earlier sibling in the shell) — drop the
   search below it. Tune --chat-pin-offset if the bar wraps taller. */
.chat-pin-bar ~ #chat-search-toggle {
	top: calc(0.75rem + var(--chat-pin-offset, 2.9rem));
}
.chat-pin-bar ~ #chat-search {
	top: calc(0.75rem + 2px + var(--chat-pin-offset, 2.9rem));
}

/* On phones there isn't room beside the toggle — a side-by-side panel
   squeezes to ~200px and everything wraps. Drop the panel BELOW the
   toggle instead, spanning the full chat width (the WhatsApp mobile
   pattern), sliding down rather than sideways. */
@media (max-width: 576px) {
	#chat-search {
		left: 0.75rem;
		right: 0.75rem;
		width: auto;
		top: calc(0.75rem + 42px + 0.5rem);
		transform: translateY(-8px);
	}
	#chat-search.open {
		transform: none;
	}
	.chat-pin-bar ~ #chat-search {
		top: calc(0.75rem + 42px + 0.5rem + var(--chat-pin-offset, 2.9rem));
	}
}
#chat-search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	max-height: 320px;
	overflow-y: auto;
	margin-top: 0.25rem;
}
#chat-search-results mark {
	padding: 0 0.1em;
	background: rgba(201, 59, 112, 0.25);
	border-radius: 0.15em;
}

/* ── Pinned-message bar (see renderPinBar in chat.js): a slim strip
   above the chat showing the current pin. Tapping jumps to it and
   cycles to the next when several are pinned. */
.chat-pin-bar {
	display: flex;
	align-items: center;
	/* Inset pill: margins match the chat gutter, width reduced so they
	   don't overflow; breathing room top and bottom. */
	margin-inline: var(--chat-gutter, 0.75rem);
	width: calc(100% - (var(--chat-gutter, 0.75rem) * 2));
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
	text-align: left;
	border: none;
	border-left: 4px solid #c93b70;
	border-radius: 0.375rem;
	background: rgba(0, 0, 0, 0.05);
	color: inherit;
	padding-block: 0.5rem;
	/* Content hugs the bar's own edges at every width — the name/snippet
	   at the left, the × at the right. */
	padding-inline: 0.75rem;
	font-size: 0.85rem;
	cursor: pointer;
}
.chat-pin-bar:hover {
	background: rgba(0, 0, 0, 0.09);
}
.chat-pin-bar .fa-thumbtack {
	color: #c93b70;
}
.chat-pin-bar .chat-pin-unpin {
	color: #6c757d;
	padding: 0 0.25rem;
	line-height: 1;
}
.chat-pin-bar .chat-pin-unpin:hover {
	color: #c93b70;
}
.chat-pin-bar .chat-pin-segments {
	display: flex;
	flex-direction: column;
	gap: 2px;
	justify-content: center;
}
.chat-pin-bar .chat-pin-seg {
	width: 3px;
	height: 9px;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.18);
}
.chat-pin-bar .chat-pin-seg.active {
	background: #c93b70;
}


.offcanvas-notice{
	padding-left: 0%;
	padding-right: 0%;
}	

.auto-saved{
	background-color: rgba(25, 135, 84, 0.75) !important;
	border-color: #198754 !important;
	opacity: 75%;
	color: #fff !important;}

/* Club Dashboard + Waiting List styles. Append to layout.css. All rules are scoped to .cd- classes. */
	
	/* ═══════════════════════════════════════════════════════════════════
	   Club Dashboard
	   Scoped under .cd-wrap so nothing leaks into the admin template.
	   Section colours match the financial report:
	   membership #e84b3c · shop #2B80FF · events #1FA971
	   ═══════════════════════════════════════════════════════════════════ */
	
	.cd-wrap {
		--cd-ink: #1d2433;
		--cd-muted: #6b7280;
		--cd-line: #eef0f3;
		--cd-card: #ffffff;
		--cd-soft: #f6f7f9;
		--cd-radius: 10px;
		--cd-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06);
		--cd-up: #12895b;
		--cd-down: #c2410c;
		color: var(--cd-ink);
		max-width: 1440px;
		margin-left: auto;
		margin-right: auto;
		padding-left: 12px;
		padding-right: 12px;
	}
	
	@property --p {
		syntax: '<number>';
		inherits: false;
		initial-value: 0;
	}
	
	/* ── Hero ──────────────────────────────────────────────────────── */
	
	.cd-hero {
		position: relative;
		overflow: hidden;
		border-radius: 22px;
		padding: 28px 28px 22px;
		color: #fff;
		background:
			radial-gradient(600px 260px at 92% -10%, rgba(232, 75, 60, .55), transparent 70%),
			radial-gradient(500px 240px at 60% 130%, rgba(43, 128, 255, .45), transparent 70%),
			radial-gradient(420px 200px at 0% 0%, rgba(31, 169, 113, .35), transparent 70%),
			linear-gradient(135deg, #161c2b 0%, #23304b 100%);
		box-shadow: 0 10px 30px rgba(22, 28, 43, .25);
	}
	/* Club colours, when set (see ClubDashboard::heroAttributes): a deep
	   shade of each colour underneath, the colours themselves as glows. */
	.cd-hero[data-club-colours] {
		background:
			radial-gradient(600px 260px at 92% -10%, rgba(var(--cd-club-2), var(--cd-club-2-glow)), transparent 70%),
			radial-gradient(520px 260px at 55% 135%, rgba(var(--cd-club-1), var(--cd-club-1-glow)), transparent 70%),
			radial-gradient(420px 200px at 0% 0%, rgba(var(--cd-club-1), calc(var(--cd-club-1-glow) * .7)), transparent 70%),
			linear-gradient(135deg, var(--cd-club-base-1) 0%, var(--cd-club-base-2) 100%);
	}
	/* A thin stripe of both colours along the bottom edge */
	.cd-hero[data-club-colours]::after {
		content: "";
		position: absolute;
		left: 0; right: 0; bottom: 0;
		height: 4px;
		background: linear-gradient(90deg, rgb(var(--cd-club-1)) 0 50%, rgb(var(--cd-club-2)) 50% 100%);
		opacity: .9;
	}
	.cd-hero[data-club-colours="3"]::after {
		background: linear-gradient(90deg, rgb(var(--cd-club-1)) 0 34%, rgb(var(--cd-club-2)) 34% 67%, rgb(var(--cd-club-3)) 67% 100%);
	}
	
	.cd-eyebrow {
		text-transform: uppercase;
		letter-spacing: .14em;
		font-size: .75rem;
		font-weight: 700;
		opacity: .75;
	}
	.cd-title {
		font-size: clamp(1.6rem, 3vw, 2.3rem);
		font-weight: 800;
		letter-spacing: -.02em;
		margin: .2rem 0 .15rem;
	}
	.cd-subtitle { opacity: .8; font-size: 1rem; transition: opacity .2s; }
	.cd-subtitle.is-stale { opacity: .45; }
	.cd-period-note { font-size: .8rem; opacity: .65; margin-top: 2px; }
	.cd-period-note:empty { display: none; }
	
	/* Period switch and date picker, stacked on the right of the hero */
	.cd-controls {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 8px;
	}
	.cd-hero .cd-seg-dark {
		width: auto;
		background: rgba(255, 255, 255, .1);
		border: 1px solid rgba(255, 255, 255, .16);
		border-radius: 12px;
		padding: 4px;
		backdrop-filter: blur(6px);
	}
	.cd-hero .cd-seg-dark .cd-seg-btn { color: rgba(255, 255, 255, .78); flex: 0 0 auto; }
	.cd-hero .cd-seg-dark .cd-seg-btn:hover:not(.is-on) { color: #fff; background: rgba(255, 255, 255, .1); }
	.cd-hero .cd-seg-dark .cd-seg-btn.is-on { background: #fff; color: var(--cd-ink); }
	.cd-hero .cd-seg-dark .cd-seg-btn:focus-visible { outline-color: rgba(255, 255, 255, .7); }
	
	.cd-datebar {
		display: flex;
		align-items: center;
		gap: 6px;
		background: rgba(255, 255, 255, .1);
		border: 1px solid rgba(255, 255, 255, .16);
		border-radius: 14px;
		padding: 6px;
		backdrop-filter: blur(6px);
	}
	.cd-date {
		background: transparent;
		border: 0;
		color: #fff;
		font-weight: 600;
		padding: 6px 8px;
		color-scheme: dark;
		min-width: 0;
	}
	.cd-date:focus { outline: 2px solid rgba(255, 255, 255, .5); border-radius: 8px; }
	.cd-btn-ghost,
	.cd-btn-light {
		border: 0;
		border-radius: 10px;
		padding: 7px 12px;
		font-weight: 600;
		line-height: 1;
		transition: background .15s, opacity .15s;
	}
	.cd-btn-ghost { background: transparent; color: #fff; }
	.cd-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
	.cd-btn-light { background: #fff; color: var(--cd-ink); }
	.cd-btn-ghost:disabled,
	.cd-btn-light:disabled { opacity: .35; cursor: default; }
	
	.cd-hero-strip {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 14px;
		margin-top: 22px;
		padding-top: 16px;
		border-top: 1px solid rgba(255, 255, 255, .14);
		font-size: 1.02rem;
		min-height: 2.6rem;
	}
	.cd-hero-strip strong { font-weight: 800; font-size: 1.15rem; }
	.cd-hero-wait { opacity: .55; }
	.cd-dot {
		width: 5px;
		height: 5px;
		border-radius: 50%;
		background: rgba(255, 255, 255, .4);
	}
	
	/* ── Section heads ─────────────────────────────────────────────── */
	
	.cd-section-head {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 4px 16px;
		margin-bottom: 14px;
	}
	.cd-section-head h2 {
		font-size: 1.35rem;
		font-weight: 800;
		letter-spacing: -.01em;
		margin: 0;
	}
	.cd-section-head h2 > :first-child { color: var(--cd-muted); margin-right: .4rem; font-size: 1.05rem; }
	.cd-section-note { color: var(--cd-muted); font-size: .85rem; }
	
	/* ── Cards ─────────────────────────────────────────────────────── */
	
	.cd-card {
		position: relative;
		overflow: hidden;
		background: var(--cd-card);
		border-radius: var(--cd-radius);
		box-shadow: var(--cd-shadow);
		padding: 20px;
	}
	.cd-card-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 6px 12px;
		margin-bottom: 14px;
	}
	.cd-card-title {
		text-transform: uppercase;
		letter-spacing: .09em;
		font-size: .72rem;
		font-weight: 700;
		color: var(--cd-muted);
	}
	.cd-card-feature {
		background:
			radial-gradient(320px 180px at 100% 0%, rgba(232, 75, 60, .09), transparent 70%),
			var(--cd-card);
	}
	.cd-chart { position: relative; width: 100%; }
	.cd-muted { color: var(--cd-muted); }
	.cd-big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
	.cd-hero-num {
		font-size: clamp(3rem, 6vw, 4.2rem);
		font-weight: 800;
		letter-spacing: -.04em;
		line-height: 1;
		margin: 6px 0 4px;
	}
	.cd-chip {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		background: var(--cd-soft);
		border-radius: 999px;
		padding: 4px 12px;
		font-size: .8rem;
		font-weight: 600;
	}
	.cd-chip:empty { display: none; }
	.cd-link { font-size: .85rem; font-weight: 600; text-decoration: none; }
	
	/* ── KPI tiles ─────────────────────────────────────────────────── */
	
	.cd-kpi { padding: 18px 18px 0; display: flex; flex-direction: column; }
	.cd-kpi::before {
		content: '';
		position: absolute;
		left: 0; right: 0; top: 0;
		height: 4px;
		background: var(--cd-accent);
	}
	.cd-kpi-icon {
		width: 38px;
		height: 38px;
		border-radius: 12px;
		display: grid;
		place-items: center;
		color: var(--cd-accent);
		background: color-mix(in srgb, var(--cd-accent) 13%, transparent);
		font-size: 1rem;
	}
	.cd-kpi-value {
		font-size: clamp(1.6rem, 2.4vw, 2.1rem);
		font-weight: 800;
		letter-spacing: -.03em;
		line-height: 1.05;
		margin-top: 4px;
	}
	.cd-kpi-label { color: var(--cd-muted); font-size: .85rem; font-weight: 600; }
	.cd-kpi-sub { color: var(--cd-muted); font-size: .75rem; margin-top: 2px; min-height: 1.1em; }
	.cd-spark { height: 46px; margin: 8px -18px 0; }
	
	.cd-delta {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		font-size: .75rem;
		font-weight: 700;
		padding: 3px 8px;
		border-radius: 999px;
		white-space: nowrap;
	}
	.cd-delta svg, .cd-delta i { font-size: .65rem; }
	.cd-delta-up   { color: var(--cd-up);   background: color-mix(in srgb, var(--cd-up) 12%, transparent); }
	.cd-delta-down { color: var(--cd-down); background: color-mix(in srgb, var(--cd-down) 12%, transparent); }
	.cd-delta-flat { color: var(--cd-muted); background: var(--cd-soft); }
	
	/* ── Stat lists ────────────────────────────────────────────────── */
	
	.cd-statlist { list-style: none; padding: 0; margin: 0; }
	.cd-statlist li {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 9px 0;
		border-top: 1px solid var(--cd-line);
		font-size: .92rem;
	}
	.cd-statlist li:first-child { border-top: 0; }
	.cd-statlist strong { font-weight: 800; }
	.cd-stat-icon {
		width: 28px;
		height: 28px;
		border-radius: 9px;
		display: grid;
		place-items: center;
		flex-shrink: 0;
		font-size: .8rem;
		color: var(--cd-accent);
		background: color-mix(in srgb, var(--cd-accent) 12%, transparent);
	}
	
	/* ── Rings ─────────────────────────────────────────────────────── */
	
	.cd-ring {
		--p: 0;
		--c: #2B80FF;
		width: 112px;
		aspect-ratio: 1;
		border-radius: 50%;
		display: grid;
		place-items: center;
		flex-shrink: 0;
		background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--cd-line) 0);
		transition: --p 1s cubic-bezier(.2, .8, .2, 1);
		margin: 0 auto;
	}
	.cd-ring-inner {
		width: 74%;
		aspect-ratio: 1;
		border-radius: 50%;
		background: var(--cd-card);
		display: grid;
		place-content: center;
		text-align: center;
	}
	.cd-ring-val { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
	.cd-ring-sub { font-size: .7rem; color: var(--cd-muted); margin-top: 2px; }
	.cd-ring-label { font-size: .82rem; font-weight: 600; margin-top: 8px; text-align: center; }
	
	/* ── Stacked bars and legends ──────────────────────────────────── */
	
	.cd-stackbar {
		display: flex;
		height: 14px;
		border-radius: 999px;
		overflow: hidden;
		background: var(--cd-line);
		gap: 2px;
	}
	.cd-stackbar > span { display: block; height: 100%; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
	.cd-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; }
	.cd-legend-item { display: inline-flex; align-items: center; gap: 6px; }
	.cd-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
	
	.cd-channel {
		background: var(--cd-soft);
		border-radius: 12px;
		padding: 12px;
		text-align: center;
	}
	.cd-channel-icon { color: var(--cd-accent); font-size: 1.1rem; }
	.cd-channel-val { font-size: 1.35rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
	.cd-channel-label { font-size: .75rem; color: var(--cd-muted); font-weight: 600; }
	
	.cd-hbar { margin-bottom: 12px; }
	.cd-hbar-track { height: 8px; border-radius: 999px; background: var(--cd-line); overflow: hidden; margin-top: 5px; }
	.cd-hbar-fill { height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
	
	/* ── Rank lists ────────────────────────────────────────────────── */
	
	.cd-rank-list { list-style: none; padding: 0; margin: 0; }
	.cd-rank-item {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 0;
		border-top: 1px solid var(--cd-line);
	}
	.cd-rank-item:first-child { border-top: 0; }
	.cd-rank {
		width: 28px;
		height: 28px;
		border-radius: 50%;
		display: grid;
		place-items: center;
		font-weight: 800;
		font-size: .8rem;
		background: var(--cd-soft);
		flex-shrink: 0;
	}
	.cd-rank-item:first-child .cd-rank { background: #fde68a; color: #7c5a00; }
	.cd-avatar {
		width: 34px;
		height: 34px;
		border-radius: 50%;
		display: grid;
		place-items: center;
		font-weight: 800;
		font-size: .8rem;
		color: #fff;
		flex-shrink: 0;
	}
	.cd-rank-bar { height: 4px; border-radius: 999px; background: var(--cd-line); margin-top: 6px; overflow: hidden; }
	.cd-rank-bar > span { display: block; height: 100%; border-radius: 999px; }
	.cd-pill { font-weight: 800; font-size: .95rem; white-space: nowrap; }
	.cd-min0 { min-width: 0; }
	.cd-empty { color: var(--cd-muted); font-size: .9rem; padding: 18px 0; text-align: center; list-style: none; }
	
	/* ── Money ─────────────────────────────────────────────────────── */
	
	.cd-fin-stat { border-left: 3px solid var(--cd-accent, var(--cd-line)); padding-left: 12px; }
	.cd-fin-stat .cd-big { font-size: 1.45rem; }
	.cd-fin-stat-label { font-size: .78rem; color: var(--cd-muted); font-weight: 600; }
	
	.cd-donut-wrap { display: grid; place-items: center; }
	.cd-donut-centre {
		position: absolute;
		inset: 0;
		display: grid;
		place-content: center;
		text-align: center;
		pointer-events: none;
	}
	.cd-donut-centre .cd-big { font-size: 1.35rem; }
	
	.cd-txn {
		display: grid;
		grid-template-columns: 52px 96px minmax(0, 1fr) minmax(0, 1.4fr) auto;
		align-items: center;
		gap: 12px;
		padding: 10px 0;
		border-top: 1px solid var(--cd-line);
		font-size: .9rem;
	}
	.cd-txn:first-child { border-top: 0; }
	.cd-txn-time { color: var(--cd-muted); font-variant-numeric: tabular-nums; }
	.cd-txn-amt { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
	.cd-badge {
		display: inline-block;
		text-align: center;
		font-size: .72rem;
		font-weight: 700;
		padding: 3px 8px;
		border-radius: 999px;
		color: var(--cd-accent);
		background: color-mix(in srgb, var(--cd-accent) 12%, transparent);
	}
	@media (max-width: 767.98px) {
		.cd-txn { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 10px; }
		.cd-txn .cd-badge { grid-column: 2; justify-self: start; }
		.cd-txn-desc { display: none; }
		.cd-txn-who { grid-column: 2; }
		.cd-txn-amt { grid-column: 3; grid-row: 1 / span 2; }
	}
	
	/* ── Members ───────────────────────────────────────────────────── */
	
	.cd-pictogram {
		display: grid;
		grid-template-columns: repeat(10, 1fr);
		gap: 6px 4px;
		font-size: 1.55rem;
		line-height: 1;
		max-width: 320px;
	}
	.cd-pictogram > * { justify-self: center; }
	
	/* ── Category filter ───────────────────────────────────────────── */
	
	.cd-cat-actions { display: inline-flex; gap: 4px; }
	.cd-btn-text {
		border: 0;
		background: var(--cd-soft);
		color: var(--cd-ink);
		font-size: .75rem;
		font-weight: 700;
		padding: 3px 10px;
		border-radius: 999px;
	}
	.cd-btn-text:hover { background: var(--cd-line); }
	.cd-btn-text:focus-visible, .cd-cat input:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
	.cd-cat-list { max-height: 330px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
	.cd-cat {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: 2px 10px;
		padding: 7px 0;
		border-top: 1px solid var(--cd-line);
		cursor: pointer;
		margin: 0;
	}
	.cd-cat:first-child { border-top: 0; }
	.cd-cat input { width: 16px; height: 16px; accent-color: #2B80FF; cursor: pointer; }
	.cd-cat-name { font-size: .88rem; font-weight: 600; }
	.cd-cat-sub { font-size: .72rem; color: var(--cd-muted); }
	.cd-cat .cd-hbar-track { grid-column: 2 / 4; margin-top: 2px; height: 6px; }
	.cd-cat.is-off .cd-cat-name, .cd-cat.is-off strong { color: var(--cd-muted); text-decoration: line-through; }
	.cd-cat.is-off .cd-hbar-fill { opacity: .25; }
	.cd-filter-flag {
		display: inline-flex; align-items: center; gap: 6px;
		background: #fff4e5; color: #8a4b00; border-radius: 999px;
		padding: 3px 10px; font-size: .78rem; font-weight: 700;
	}
	
	/* ── Waiting list report ───────────────────────────────────────── */
	
	.cd-hero-compact { padding-bottom: 26px; }
	.cd-seg {
		display: inline-flex;
		background: var(--cd-soft);
		border-radius: 10px;
		padding: 3px;
		gap: 3px;
		width: 100%;
	}
	.cd-seg-btn {
		flex: 1;
		border: 0;
		background: transparent;
		border-radius: 8px;
		padding: 6px 10px;
		font-size: .85rem;
		font-weight: 600;
		color: var(--cd-muted);
		white-space: nowrap;
	}
	.cd-seg-btn.is-on { background: var(--cd-card); color: var(--cd-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
	.cd-seg-btn:focus-visible { outline: 2px solid #2B80FF; outline-offset: 1px; }
	
	.cd-table { font-size: .9rem; }
	.cd-table th {
		font-size: .7rem;
		text-transform: uppercase;
		letter-spacing: .08em;
		color: var(--cd-muted);
		font-weight: 700;
		border-bottom-color: var(--cd-line);
		white-space: nowrap;
	}
	.cd-table td { border-bottom-color: var(--cd-line); vertical-align: middle; }
	
	/* Sortable headers: the whole label is the button */
	.cd-sort {
		display: inline-flex; align-items: center; gap: 5px;
		border: 0; background: none; padding: 2px 0;
		font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
		cursor: pointer;
	}
	.cd-sort svg, .cd-sort i { opacity: .3; font-size: .85em; transition: opacity .15s; }
	.cd-sort:hover { color: var(--cd-ink); }
	.cd-sort:hover svg, .cd-sort:hover i { opacity: .6; }
	.cd-sort.is-on { color: var(--cd-ink); }
	.cd-sort.is-on svg, .cd-sort.is-on i { opacity: 1; }
	.cd-sort:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; border-radius: 4px; }
	.cd-table th.text-end .cd-sort { flex-direction: row; }
	
	/* The age column the filters and chart are using */
	.cd-table th.is-basis .cd-sort { color: #1d4ed8; }
	.cd-table td.is-basis { font-weight: 700; background: rgba(43, 128, 255, .05); }
	
	.cd-age-range { display: flex; align-items: center; gap: 6px; }
	.cd-age-range .form-control,
	.cd-age-range .form-select { min-width: 0; }
	.cd-age-range .is-swapped { border-color: #f59f00; }
	
	/* Brother or sister who's a member */
	.cd-sib {
		display: inline-flex; align-items: center; gap: 3px;
		margin-left: 6px; padding: 1px 7px; border-radius: 999px;
		background: #e9f7f0; color: #157a52; font-size: .72rem; font-weight: 700;
		vertical-align: 1px;
	}
	.cd-sib-names { font-size: .75rem; color: var(--cd-muted); margin-top: 1px; }
	.cd-switch { display: flex; align-items: center; gap: 10px; padding-left: 0; min-height: 38px; }
	.cd-switch .form-check-input { float: none; margin: 0; width: 2.4em; height: 1.3em; cursor: pointer; flex-shrink: 0; }
	.cd-switch .form-check-input:checked { background-color: #1FA971; border-color: #1FA971; }
	.cd-switch .form-check-label { font-size: .9rem; cursor: pointer; }
	.cd-table td.num, .cd-table th.num { font-variant-numeric: tabular-nums; }
	.cd-table .cd-pos {
		display: inline-grid; place-items: center;
		min-width: 26px; height: 26px; border-radius: 50%;
		background: var(--cd-soft); font-weight: 800; font-size: .78rem;
	}
	.cd-wait-long { color: var(--cd-down); font-weight: 700; }
	.cd-chip-x {
		display: inline-flex; align-items: center; gap: 6px;
		border: 0; border-radius: 999px; padding: 3px 10px;
		background: #e8f0ff; color: #1d4ed8; font-size: .78rem; font-weight: 700;
	}
	
	/* ── Loading and errors ────────────────────────────────────────── */
	
	.cd-loading .cd-card::after,
	.cd-kpi.cd-loading::after {
		content: '';
		position: absolute;
		inset: 0;
		z-index: 5;
		background: linear-gradient(100deg, #f3f4f6 30%, #fbfbfc 50%, #f3f4f6 70%);
		background-size: 220% 100%;
		animation: cd-shimmer 1.3s linear infinite;
	}
	@keyframes cd-shimmer {
		from { background-position: 120% 0; }
		to   { background-position: -120% 0; }
	}
	.cd-error { border-radius: 12px; font-size: .9rem; }
	.cd-refreshing .cd-card { opacity: .55; transition: opacity .2s; }
	.cd-refreshing .cd-card:has(#cd-mem-cats) { opacity: 1; }
	
	@media (prefers-reduced-motion: reduce) {
		.cd-ring, .cd-stackbar > span, .cd-hbar-fill { transition: none; }
		.cd-loading .cd-card::after, .cd-kpi.cd-loading::after { animation: none; }
	}
	
	@media (max-width: 575.98px) {
		.cd-hero { padding: 22px 18px 18px; border-radius: 18px; }
		.cd-datebar { width: 100%; }
		.cd-date { flex: 1; }
		.cd-controls { width: 100%; align-items: stretch; }
		.cd-hero .cd-seg-dark { width: 100%; }
		.cd-hero .cd-seg-dark .cd-seg-btn { flex: 1 1 auto; padding: 6px 4px; font-size: .8rem; }
		.cd-card { padding: 16px; }
		.cd-kpi { padding: 14px 14px 0; }
		.cd-spark { margin: 8px -14px 0; }
	}
	
	/* Busiest conversations: active members (share of group members who
	   read or posted). Its own column, set off from the message count. */
	.cd-active {
		display: flex; align-items: center; gap: 10px;
		flex: 0 0 172px;
		margin-left: 4px; padding-left: 14px;
		border-left: 1px solid var(--cd-line);
	}
	.cd-mini-ring {
		--p: 0; --c: #7c5cff;
		width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
		display: grid; place-items: center;
		background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--cd-soft) 0);
	}
	.cd-mini-ring > span {
		width: 38px; height: 38px; border-radius: 50%;
		display: grid; place-items: center;
		background: var(--cd-card);
		font-size: .78rem; font-weight: 800; color: var(--cd-ink);
		font-variant-numeric: tabular-nums;
	}
	/* No groups: a plain count in the ring's place */
	.cd-active-count {
		width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
		display: grid; place-items: center;
		background: var(--cd-soft); font-weight: 800; font-size: .9rem;
		font-variant-numeric: tabular-nums;
	}
	.cd-active-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
	.cd-active-text strong { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
	.cd-active-text span { font-size: .75rem; color: var(--cd-muted); white-space: nowrap; }
	/* The plain count already shows the number, so drop the repeat */
	.cd-active-count + .cd-active-text strong { display: none; }
	
	@media (max-width: 575.98px) {
		/* Narrow screens: ring over a short label, so the name keeps its room */
		.cd-active { flex: 0 0 auto; flex-direction: column; gap: 3px; padding-left: 10px; }
		.cd-active-text { align-items: center; }
		.cd-active-text strong { font-size: .72rem; }
		.cd-active-text span { font-size: .66rem; }
		.cd-active .cd-mini-ring, .cd-active-count { width: 44px; height: 44px; }
		.cd-active .cd-mini-ring > span { width: 34px; height: 34px; font-size: .72rem; }
		/* Let conversation names wrap rather than cut off */
		#cd-top-threads .text-truncate { white-space: normal; overflow-wrap: anywhere; }
	}
	
	/* ── Home page club tiles (index.php) ──────────────────────────────
	   The Club Dashboard shortcut, the search card and the Team card share
	   one look: a deep shade of the club colours with a soft glow and a
	   stripe of the colours along the bottom, as on the dashboard header.
	   Colours come from ClubDashboard::heroAttributes() (CSS variables);
	   without them the defaults below give the standard dark look.
	   Corners come from Bootstrap's rounded-* classes in the markup. */
	.cd-tile {
		--cd-club-1: 232, 75, 60; --cd-club-2: 43, 128, 255; --cd-club-3: 31, 169, 113;
		--cd-club-1-glow: .5; --cd-club-2-glow: .45; --cd-club-accent: 43, 128, 255;
		--cd-club-base-1: #161c2b; --cd-club-base-2: #23304b;
		position: relative; overflow: hidden; isolation: isolate;
		padding: 20px 20px 22px;
		color: #fff !important; text-decoration: none !important;
		background:
			radial-gradient(420px 180px at 100% -20%, rgba(var(--cd-club-2), var(--cd-club-2-glow)), transparent 70%),
			radial-gradient(360px 200px at 10% 140%, rgba(var(--cd-club-1), var(--cd-club-1-glow)), transparent 70%),
			linear-gradient(135deg, var(--cd-club-base-1) 0%, var(--cd-club-base-2) 100%);
		box-shadow: 0 8px 24px rgba(22, 28, 43, .22);
	}
	/* Stripe of club colours along the bottom edge */
	.cd-tile::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
		background: linear-gradient(90deg, rgb(var(--cd-club-1)) 0 50%, rgb(var(--cd-club-2)) 50% 100%);
		pointer-events: none;
	}
	.cd-tile[data-club-colours="3"]::after {
		background: linear-gradient(90deg, rgb(var(--cd-club-1)) 0 34%, rgb(var(--cd-club-2)) 34% 67%, rgb(var(--cd-club-3)) 67% 100%);
	}
	/* Tiles that are links lift on hover */
	a.cd-tile { transition: transform .18s ease, box-shadow .18s ease; }
	a.cd-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(22, 28, 43, .3); }
	a.cd-tile:focus-visible { outline: 3px solid rgba(var(--cd-club-accent), .9); outline-offset: 3px; }
	
	.cd-tile-icon {
		flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px;
		display: grid; place-items: center; font-size: 1.45rem;
		background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
		backdrop-filter: blur(4px);
	}
	.cd-tile-eyebrow { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
	.cd-tile-title { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; margin: 1px 0 3px; }
	.cd-tile-title .cd-tile-soft { opacity: .55; font-weight: 700; }
	.cd-tile-sub { display: block; font-size: .88rem; line-height: 1.4; opacity: .8; }
	.cd-tile-go {
		flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
		display: grid; place-items: center;
		background: #fff; color: #161c2b;
		transition: transform .18s ease;
	}
	a.cd-tile:hover .cd-tile-go { transform: translateX(3px); }
	
	/* Club Dashboard shortcut: one row */
	.cd-promo { display: flex; align-items: center; gap: 16px; }
	.cd-promo .cd-tile-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
	/* Decorative rising bars in the brighter club colour */
	.cd-promo-spark { display: flex; align-items: flex-end; gap: 4px; height: 40px; flex-shrink: 0; opacity: .9; }
	.cd-promo-spark span {
		display: block; width: 7px; border-radius: 3px 3px 1px 1px;
		background: linear-gradient(180deg, rgb(var(--cd-club-accent)), rgba(var(--cd-club-accent), .35));
		transform-origin: bottom; transition: transform .3s ease;
	}
	.cd-promo:hover .cd-promo-spark span { transform: scaleY(1.12); }
	
	/* Team card: icon and arrow on top, words below */
	.cd-team { display: flex; flex-direction: column; gap: 14px; }
	.cd-team-top { display: flex; align-items: flex-start; justify-content: space-between; }
	
	/* Search card */
	.cd-search { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
	.cd-search .form-control { padding-right: 84px; border: 0; }
	.cd-search .form-control:focus { box-shadow: 0 0 0 .25rem rgba(var(--cd-club-accent), .45); }
	.cd-search .btn { border: 0; }
	/* "New" marker inside the search box */
	.cd-new-badge {
		position: absolute; right: 64px; top: 50%; transform: translateY(-50%); z-index: 5;
		display: inline-flex; align-items: center; gap: 7px;
		font-size: .8rem; font-weight: 700; color: #b86e00;
		pointer-events: none;
	}
	.cd-new-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #EF9F27; }
	.cd-new-dot::after {
		content: ""; position: absolute; inset: -4px; border-radius: 50%;
		border: 2px solid #EF9F27; opacity: .5; animation: cd-ping 1.5s ease-out infinite;
	}
	@keyframes cd-ping { from { transform: scale(.6); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
	
	@media (max-width: 575.98px) {
		.cd-tile { padding: 16px 16px 18px; }
		.cd-promo { gap: 12px; }
		.cd-promo-spark { display: none; }
		.cd-tile-icon { width: 44px; height: 44px; font-size: 1.2rem; }
		.cd-tile-title { font-size: 1.12rem; }
	}
	@media (prefers-reduced-motion: reduce) {
		a.cd-tile, .cd-tile-go, .cd-promo-spark span { transition: none; }
		.cd-new-dot::after { animation: none; }
	}

	/* Communication reach: what the notifications were */
	   .cd-notif-mix { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 6px; }
	   .cd-notif-mix li { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; align-items: center; gap: 10px; font-size: .8rem; cursor: default; }
	   .cd-notif-mix-label { color: var(--cd-muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	   .cd-notif-mix-track { height: 6px; border-radius: 99px; background: #eef0f3; overflow: hidden; }
	   .cd-notif-mix-track span { display: block; height: 100%; border-radius: 99px; }
	   .cd-notif-mix strong { font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }

	
/* On/Off Switch		 */
	.onoffswitch {
		position: relative; width: 90px;
		-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;}
	.onoffswitch-checkbox {
		display: none;}
	.onoffswitch-label {
		display: block; overflow: hidden; cursor: pointer;
		border: 1px solid #ccc; border-radius: 5px;}
	.onoffswitch-inner {
		width: 200%; margin-left: -100%;
		-moz-transition: margin 0.15s ease-in 0s; -webkit-transition: margin 0.15s ease-in 0s;
		-o-transition: margin 0.15s ease-in 0s; transition: margin 0.15s ease-in 0s;}
	.onoffswitch-inner:before, .onoffswitch-inner:after {
		float: left; width: 50%; height: 36px; padding: 0; line-height: 36px;
		font-size: 16px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
		-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
	.onoffswitch-inner:before {
		content: "ON";
		padding-left: 15px;
		padding-top: 1px;
		background-color: #5CB85C; color: #FFFFFF;}
	.onoffswitch-inner:after {
		content: "OFF";
		padding-right: 10px;
		padding-top: 1px;
		background-color: #F8F8F8; color: #666666;
		text-align: right;}
	.onoffswitch-switch {
		width: 35px; margin: 0px;
		background: #FFFFFF;
		border: 1px solid #ccc; border-radius: 5px;
		position: absolute; top: 0; bottom: 0; right: 55px;
		-moz-transition: all 0.15s ease-in 0s; -webkit-transition: all 0.15s ease-in 0s;
		-o-transition: all 0.15s ease-in 0s; transition: all 0.15s ease-in 0s; 
		background-image: -moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -o-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);}
	.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
		margin-left: 0;}
	.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
		right: 0px;}

/* Live/Draft Switch		 */
	.livedraftswitch {
		position: relative; width: 110px;
		-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;}
	.livedraftswitch-checkbox {
		display: none;}
	.livedraftswitch-label {
		display: block; overflow: hidden; cursor: pointer;
		border: 1px solid #ccc; border-radius: 5px;}
	.livedraftswitch-inner {
		width: 200%; margin-left: -100%;
		-moz-transition: margin 0.15s ease-in 0s; -webkit-transition: margin 0.15s ease-in 0s;
		-o-transition: margin 0.15s ease-in 0s; transition: margin 0.15s ease-in 0s;}
	.livedraftswitch-inner:before, .livedraftswitch-inner:after {
		float: left; width: 50%; height: 36px; padding: 0; line-height: 36px;
		font-size: 16px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
		-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
	.livedraftswitch-inner:before {
		content: "LIVE";
		padding-left: 20px;
		padding-top: 1px;
		background-color: #5CB85C; color: #FFFFFF;}
	.livedraftswitch-inner:after {
		content: "DRAFT";
		padding-right: 10px;
		padding-top: 1px;
		background-color: #F8F8F8; color: #666666;
		text-align: right;}
	.livedraftswitch-switch {
		width: 35px; margin: 0px;
		background: #FFFFFF;
		border: 1px solid #ccc; border-radius: 5px;
		position: absolute; top: 0; bottom: 0; right: 75px;
		-moz-transition: all 0.15s ease-in 0s; -webkit-transition: all 0.15s ease-in 0s;
		-o-transition: all 0.15s ease-in 0s; transition: all 0.15s ease-in 0s; 
		background-image: -moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -o-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);}
	.livedraftswitch-checkbox:checked + .livedraftswitch-label .livedraftswitch-inner {
		margin-left: 0;}
	.livedraftswitch-checkbox:checked + .livedraftswitch-label .livedraftswitch-switch {
		right: 0px;}
		
		
/* Yes/No Switch		 */
	.yesnoswitch {
		position: relative; width: 90px;
		-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;}
	.yesnoswitch-checkbox {
		display: none;}
	.yesnoswitch-label {
		display: block; overflow: hidden; cursor: pointer;
		border: 1px solid #ccc; border-radius: 5px;}
	.yesnoswitch-inner {
		width: 200%; margin-left: -100%;
		-moz-transition: margin 0.15s ease-in 0s; -webkit-transition: margin 0.15s ease-in 0s;
		-o-transition: margin 0.15s ease-in 0s; transition: margin 0.15s ease-in 0s;}
	.yesnoswitch-inner:before, .yesnoswitch-inner:after {
		float: left; width: 50%; height: 36px; padding: 0; line-height: 36px;
		font-size: 16px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
		-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
	.yesnoswitch-inner:before {
		content: "YES";
		padding-left: 10px;
		padding-top: 1px;
		background-color: #5CB85C; color: #FFFFFF;}
	.yesnoswitch-inner:after {
		content: "NO";
		padding-right: 15px;
		padding-top: 1px;
		background-color: #F8F8F8; color: #666666;
		text-align: right;}
	.yesnoswitch-switch {
		width: 35px; margin: 0px;
		background: #FFFFFF;
		border: 1px solid #ccc; border-radius: 5px;
		position: absolute; top: 0; bottom: 0; right: 55px;
		-moz-transition: all 0.15s ease-in 0s; -webkit-transition: all 0.15s ease-in 0s;
		-o-transition: all 0.15s ease-in 0s; transition: all 0.15s ease-in 0s; 
		background-image: -moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -o-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);}
	.yesnoswitch-checkbox:checked + .yesnoswitch-label .yesnoswitch-inner {
		margin-left: 0;}
	.yesnoswitch-checkbox:checked + .yesnoswitch-label .yesnoswitch-switch {
		right: 0px;}
	.embed-responsive-scroll{
		position: relative;
		display: block;
		height: 0;
		padding: 0;
		overflow-y: scroll;}
		
	/* Yes/No Circular Switch		 */
	.yesnoswitch-circle {
		position: relative; width: 40px;
		-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
		margin: 0.5rem;}
	.yesnoswitch-circle-checkbox {
		display: none;}
	.yesnoswitch-circle-label {
		display: block; overflow: hidden; cursor: pointer;
		border: 1px solid rgb(0,56,67); border-radius: 20px; height:20px;}
	.yesnoswitch-circle-inner {
		width: 200%; margin-left: -100%;
		-moz-transition: margin 0.15s ease-in 0s; -webkit-transition: margin 0.15s ease-in 0s;
		-o-transition: margin 0.15s ease-in 0s; transition: margin 0.15s ease-in 0s;}
	.yesnoswitch-circle-inner:before, .yesnoswitch-circle-inner:after {
		float: left; width: 50%; height: 28px; padding: 0; line-height: 28px;
		font-size: 16px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
		-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
	.yesnoswitch-circle-inner:before {
		content: "";
		padding-left: 10px;
		padding-top: 1px;
		background-color: rgb(0,56,67); color: #FFFFFF;}
	.yesnoswitch-circle-inner:after {
		content: "";
		padding-right: 15px;
		padding-top: 1px;
		background-color: transparent; color: #fff;
		text-align: right;}
	.yesnoswitch-circle-switch {
		width: 20px; margin: 0px;
		background: #FFFFFF;
		border: 1px solid rgb(0,56,67); border-radius: 20px;
		position: absolute; top: 0; bottom: 0; right: 20px;
		-moz-transition: all 0.15s ease-in 0s; -webkit-transition: all 0.15s ease-in 0s;
		-o-transition: all 0.15s ease-in 0s; transition: all 0.15s ease-in 0s; 
		background-image: -moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: -o-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
		background-image: linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);}
	.yesnoswitch-circle-checkbox:checked + .yesnoswitch-circle-label .yesnoswitch-circle-inner {
		margin-left: 0;}
	.yesnoswitch-circle-checkbox:checked + .yesnoswitch-circle-label .yesnoswitch-circle-switch {
		right: 0px;}
	
	
	/* Risk Assessment Dashboard */
	
	/* ── Met Office mandatory warning colours — §2.1.2 NSWWS Style Guide ── */
	  .metoffice-yellow { background-color: #FFE923; color: #000; }
	  .metoffice-amber  { background-color: #FF9900; color: #000; }
	  .metoffice-red    { background-color: #CC0033; color: #fff; }
	  .metoffice-yellow-border { border-left: 4px solid #FFE923 !important; background-color: #fffbe6; }
	  .metoffice-amber-border  { border-left: 4px solid #FF9900 !important; background-color: #fff4e0; }
	  .metoffice-red-border    { border-left: 4px solid #CC0033 !important; background-color: #fce8ec; }
	  .metoffice-yellow-text { color: #7a6800; }
	  .metoffice-amber-text  { color: #7a4200; }
	  .metoffice-red-text    { color: #8b0020; }
	
	  /* ── Tide / daylight animated fill ── */
	  .stat-fill {
		position: absolute; bottom: 0; left: 0; right: 0;
		border-radius: 0 0 .375rem .375rem;
		transition: height 1.2s cubic-bezier(.4,0,.2,1);
		z-index: 0;
	  }
	  .stat-fill ~ * { position: relative; z-index: 1; }
	  .stat-fill-tide     { background: #058af0;background: linear-gradient(-44deg, rgba(5, 138, 240, 1) 35%, rgba(153, 238, 255, 1) 100%);}
	  .stat-fill-daylight { background: linear-gradient(to top, rgba(255,193,7,.2),   rgba(255,193,7,.04)); }
	
	  /* ── Stat card clickable state ── */
	  .stat-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
	  .stat-card-link:hover .card { border-color: #0d6efd; box-shadow: 0 0 0 .15rem rgba(13,110,253,.15); }
	
	  /* ── Tide graph canvases ── */
	  /* Inline card version — compact */
	  #tideCanvas      { width: 100%; height: 120px; display: block; border-radius: .375rem; }
	  /* Modal version — taller now that it has the full modal width to breathe */
	  #tideCanvasModal { width: 100%; height: 240px; display: block; border-radius: .375rem; }
	  
	  /* Hazard row layout */
	  .hazard-row {
		  background: transparent;
		  border-radius: 0.5rem;
		  padding: 0;
	  }
	  
	  .hazard-number {
		  position: absolute;
		  top: -10px;
		  left: -10px;
		  width: 26px;
		  height: 26px;
		  border-radius: 50%;
		  background: #e2e8f0;
		  color: #475569;
		  font-size: 0.8rem;
		  font-weight: 600;
		  display: flex;
		  align-items: center;
		  justify-content: center;
		  z-index: 2;
	  }
	  
	  .hazard-delete-btn {
		  position: absolute;
		  top: -10px;
		  right: -10px;
		  width: 26px;
		  height: 26px;
		  border-radius: 50%;
		  background: #fcebeb;
		  color: #791f1f;
		  border: 0.5px solid #f09595;
		  display: flex;
		  align-items: center;
		  justify-content: center;
		  font-size: 0.75rem;
		  padding: 0;
		  z-index: 2;
		  transition: background 0.15s;
	  }
	  .hazard-delete-btn:hover { background: #f7c1c1; }
	  
	  /* Field — wraps textarea + grading footer */
	  .hz-field {
		  border: 1px solid #dee2e6;
		  border-left: 3px solid #cbd5e1;
		  border-radius: 0.375rem;
		  overflow: hidden;
		  background: #fff;
		  transition: border-left-color 0.2s;
	  }
	  .hz-field:focus-within {
		  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
		  border-color: #86b7fe;
	  }
	  
	  .hz-text {
		  width: 100%;
		  border: 0;
		  outline: 0;
		  resize: vertical;
		  background: transparent;
		  display: block;
		  /* padding handled by .form-control inside .form-floating */
	  }
	  .hz-text:focus { outline: 0; box-shadow: none; }
	  
	  /* Strip Bootstrap's border + focus ring from the inner control so
		 the .hz-field's border + accent strip is the only chrome shown. */
	  .hz-field .form-floating > .form-control {
		  border: 0;
		  border-radius: 0;
		  background: transparent;
	  }
	  .hz-field .form-floating > .form-control:focus {
		  box-shadow: none;
	  }
	  
	  /* Footer strip — dots + label */
	  .hz-footer {
		  display: flex;
		  align-items: center;
		  gap: 0.6rem;
		  flex-wrap: wrap;
		  padding: 0.4rem 0.75rem;
		  background: #f8f9fa;
		  border-top: 1px solid #e9ecef;
		  font-size: 0.75rem;
	  }
	  
	  .hz-footer-label {
		  color: #6c757d;
		  text-transform: uppercase;
		  letter-spacing: 0.05em;
		  font-size: 0.7rem;
	  }
	  
	  .hz-dots {
		  display: inline-flex;
		  gap: 0.4rem;
	  }
	  
	  .hz-footer-value {
		  margin-left: auto;
		  font-size: 0.8rem;
	  }
	  .hz-footer-empty {
		  color: #adb5bd;
		  font-style: italic;
		  font-weight: 400;
	  }
	  
	  /* Accent per grade */
	  .hz-field.hz-accent-none { border-left-color: #cbd5e1; }
	  .hz-field.hz-accent-1    { border-left-color: #198754; }  /* Low      */
	  .hz-field.hz-accent-2    { border-left-color: #28a745; }  /* Low-Med  */
	  .hz-field.hz-accent-3    { border-left-color: #ffc107; }  /* Medium   */
	  .hz-field.hz-accent-4    { border-left-color: #fd7e14; }  /* High     */
	  .hz-field.hz-accent-5    { border-left-color: #dc3545; }  /* Critical */
	
	  /* ── Activity dot ── */
	  .activity-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: #dee2e6; }
	  .activity-dot.done    { background: #198754; }
	  .activity-dot.current { background: #ffc107; }
	
	  /* ── Leaflet admin map ── */
	  #adminMap { height: 200px; border-radius: .375rem; overflow: hidden; }
	
	  /* ── Kiosk person tap card ── */
	  .kiosk-person {
		cursor: pointer; border: 2px solid transparent;
		transition: border-color .15s, background-color .15s; user-select: none;
	  }
	  .kiosk-person:hover { border-color: #dee2e6; }
	  .kiosk-person.signed-in { border-color: #198754; background-color: #d1e7dd !important; }
	  .kiosk-status { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #dee2e6; }
	  .kiosk-status.st-in { background: #198754; }
	
	  /* ── ARA risk dots ── */
	  .risk-dot {
		display: inline-block; width: 24px; height: 24px; border-radius: 50%;
		border: 2px solid #dee2e6; cursor: pointer; vertical-align: middle;
		margin-right: 3px; transition: background .1s, border-color .1s;
	  }
	  .risk-dot.rd-active-1 { background: #d1e7dd; border-color: #198754; }
	  .risk-dot.rd-active-2 { background: #fff3cd; border-color: #ffc107; }
	  .risk-dot.rd-active-3 { background: #fff3cd; border-color: #fd7e14; }
	  .risk-dot.rd-active-4 { background: #f8d7da; border-color: #dc3545; }
	  .risk-dot.rd-active-5 { background: #f8d7da; border-color: #842029; }
	
	  /* ── ARA outcome buttons ── */
	  .outcome-btn {
		flex: 1; padding: 14px 8px; border-radius: .375rem;
		border: 2px solid #dee2e6; background: transparent;
		font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
	  }
	  .outcome-btn.proceed        { border-color: #198754; color: #0a3622; }
	  .outcome-btn.proceed.active { background: #d1e7dd; }
	  .outcome-btn.caution        { border-color: #fd7e14; color: #6a2d06; }
	  .outcome-btn.caution.active { background: #fff3cd; }
	  .outcome-btn.stop           { border-color: #dc3545; color: #58151c; }
	  .outcome-btn.stop.active    { background: #f8d7da; }
	
	  /* ── Register tab strip ── */
	  .reg-tabs { display: flex; gap: 3px; }
	  .reg-tab {
		flex: 1; padding: 8px 4px; border: 1px solid #dee2e6; border-radius: .375rem;
		background: #fff; text-align: center; font-size: .8125rem; color: #6c757d;
		cursor: pointer; transition: background .15s;
	  }
	  .reg-tab.active { background: #0d6efd; color: #fff; border-color: #0d6efd; font-weight: 600; }
	
	  /* ── Safety ratio ── */
	  .ratio-connector { font-size: .9rem; color: #6c757d; padding: 0 8px; }
	
	  /* ── Activity template selector ── */
	  .activity-template-card {
		border: 2px solid #dee2e6; border-radius: .5rem; padding: 12px 14px;
		cursor: pointer; transition: border-color .15s, background .15s;
		background: #fff;
	  }
	  .activity-template-card:hover { border-color: #0d6efd; background: #f0f6ff; }
	  .activity-template-card.selected { border-color: #0d6efd; background: #e8f0fe; }
	  .activity-template-card .card-name { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
	  .activity-template-card .card-desc { font-size: .8rem; color: #6c757d; margin-bottom: 6px; }	
	
	
	
	.video-wrapper video {
	  max-width: 100%;
	  max-height: 80vh;
	}
	
	#donut-chart .chart-legend {
		display: none !important;
	}
	
	.refine{
		color:rgb(0,56,67);
		font-size: .8rem;
		text-align: left;
		background: transparent;
		padding: 0.2rem 0 0.2rem 1rem;
		margin-bottom: 0;}
	.refine label{
		margin-top: 0.1rem;}
	
		
	.scrolling{
		font-size: 80%;
		border: 1px #ccc solid;
		padding: 1rem;
		overflow-y: scroll;
		max-height: 200px;
	}
	
	.member-awards{
		line-height: 10px;}
		
/* 	Footer */

	.footer {
		flex-shrink: 0;
		padding: 20px;
		background: #f9f9f9;}
  
	.embed-responsive-16by9-sm-4{
		padding-bottom: 70%;
		border:1px solid #f1f1f1;}
	p.event-title{
		margin-bottom: 0.4rem;}
	.racecartdata{
		font-size: .8rem;
	}	
	.card-stripe{
		background: #f1f1f1;
		color: #5cb85c;
		border-color: #5cb85c;
	}
	.bg-stripe{
		background: #533AFD;
		border-color: #533AFD;
	}
	.basket-divider{
		border-right: 1px solid #b3b3b3;
		display: flex;
		margin-top: 8px;
		margin-bottom: 8px;
	}
		
	.StripeElement {
	  background-color: white;
	  padding: 8px 12px;
	  border-radius: 4px;
	  border: 1px solid #5cb85c;
	  box-shadow: 0 1px 3px 0 #e6ebf1;
	  -webkit-transition: box-shadow 150ms ease;
	  transition: box-shadow 150ms ease;
	  font-size: 3rem;
	  width: 100%;
	}
	
	.StripeElement--focus {
	  box-shadow: 0 1px 3px 0 #cfd7df;
	}
	
	.StripeElement--invalid {
	  border-color: #cb2706;
	  color: #cb2706;
	}
	
	.StripeElement--webkit-autofill {
	  background-color: #e1f5e1 !important;
	}
	.paymentprocessing{
		display: none;
		height: 100%;
		background: rgba(92, 184, 92, 0.9);
		color: #fff;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 20;
		align-items: center;
		justify-content: center;}
	.paymentprocessing.visible{
		display: flex;}
	
	.btn-sq{
		border-radius: 0;
		border: none;
	} 
	.badge-danger{
		color: #fff;
		background: #d9534f;}
	.bg-cloud-primary{
		background: #E24A3B !important;}
	.bg-events{
	background: #1FA971 !important;}
	.bg-shop{
	background: #2B80FF !important;}
		
	.alert a{
		color: inherit;
		text-decoration: underline;
		font-weight: bold;}
	#cal{
		position: relative;
		display: block;
		text-align: center;}
	
.inline{
	display: inline;
}

input.btn-warning::-webkit-input-placeholder, input.btn-warning::-moz-placeholder, input.btn-warning:-ms-input-placeholder, input.btn-warning:-moz-placeholder{
	color: #fff;
}
.input-group-addon-dark{
	color: #e9ecef;
	background-color: #495057;}

.code{
	font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
	font-size: 1.2rem;
	line-height: 0.9em;
	margin-top: 0.18rem;
}
.img-circle{
	border-radius: 50%;
	border: 2px solid #fff;}
	
#googlemap{
	padding-bottom: 60%;}
	
.dtpicker-content {
	touch-action: manipulation;}
	
.logo-small{
	width: 40px;}

.table-number-input{width:30%;}

.trim-xs{
	font-size: 0.7rem;}

.input-group-nowrap {
	-ms-flex-wrap: inherit;
	flex-wrap: inherit;}
	
.flex-shrink-1.input-group-text{
	white-space: normal;
}




/* Timeline  */


#cd-timeline {
  position: relative;
  padding: 2em 0;
}
#cd-timeline::before {
  /* this is the vertical line */
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  height: 100%;
  width: 4px;
  background: #f9f9f9;
}

.cd-timeline-block {
  position: relative;
  margin: 2em 0;
}
.cd-timeline-block a{
	display: block;
	color: #333;
}
.cd-timeline-block a:hover{
	text-decoration: none;
}

.cd-timeline-block:after {
  content: "";
  display: table;
  clear: both;
}
.cd-timeline-block:first-child {
  margin-top: 0;
}
.cd-timeline-block:last-child {
  margin-bottom: 0;
}

.cd-timeline-img {
  position: absolute;
  top: 16px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
}
.cd-timeline-img img {
  display: block;
  width: 24px;
  height: 24px;
  position: relative;
  left: 50%;
  top: 50%;
  margin-left: -12px;
  margin-top: -12px;
}
.cd-timeline-img.cd-picture {
  background: #ffc107;
}

.cd-timeline-content {
  position: relative;
  margin-left: 60px;
  background: #ffc107;
  border-radius: 0.25em;
  padding: 1em;
  box-shadow: 0 3px 0 #ffc107;
}
.cd-timeline-content:after {
  content: "";
  display: table;
  clear: both;
}
.cd-timeline-content h3 {
	margin-top: 0px;
	color: #333;}
.cd-timeline-content h4 {
	color: #D58B71}
	
.cd-timeline-content .cd-date {
  float: left;
  padding: .8em 0;
  opacity: .7;
}
.cd-timeline-content::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 100%;
  height: 0;
  width: 0;
  border: 20px solid transparent;
  border-right: 20px solid #ffc107;
}

/* WhatsApp-style photo grid for a bulk upload (see
   CommentContentFile::renderPhotoGrid in comment.php, and the fullscreen
   gallery modal in chat-client.js). Matches the single-image frame's
   420px cap for visual consistency at every tile count. */
.chat-photo-grid {
	display: grid;
	gap: 2px;
	max-width: 420px;
	border-radius: 0.375rem;
	overflow: hidden;
	margin: 1rem 0;
}
.chat-photo-grid-tile {
	position: relative;
	padding: 0;
	border: 0;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.06);
	aspect-ratio: 1;
}
.chat-photo-grid-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.chat-photo-grid-2,
.chat-photo-grid-4plus {
	grid-template-columns: 1fr 1fr;
}
.chat-photo-grid-4plus {
	grid-template-rows: 1fr 1fr;
}
/* 3 photos: one tall on the left, two stacked on the right — a fixed
   container height (rather than aspect-ratio on the tiles) makes the
   row-span math straightforward regardless of each photo's own shape. */
.chat-photo-grid-3 {
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	height: 280px;
}
.chat-photo-grid-3 .chat-photo-grid-tile {
	aspect-ratio: auto;
}
.chat-photo-grid-3 .chat-photo-grid-tile:nth-child(1) {
	grid-row: span 2;
}
.chat-photo-grid-more-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1.5rem;
	font-weight: 600;
}

/* Album pane. Two layouts, one breakpoint:
   phone   — one photo per row, full width, uncropped;
   sm up   — 3 across, cropped square, so a long batch stays scannable. */
.chat-gallery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.chat-gallery-grid-img {
	display: block;
	width: 100%;
	height: auto;      /* natural aspect ratio — nothing cropped */
}

@media (min-width: 576px) {
	.chat-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
		max-width: 900px;
		margin: 0 auto;   /* centred, so tiles don't stretch on a wide monitor */
	}

	.chat-gallery-grid-tile {
		aspect-ratio: 1 / 1;   /* the square crop only exists at this size */
	}

	.chat-gallery-grid-img {
		height: 100%;
		object-fit: cover;
	}
}

.chat-gallery-grid-tile:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Mode-driven hiding for controls that already use the d-none/d-*-flex
   responsive pattern and so can't have d-none toggled on them. */
.chat-gallery-hidden {
	display: none !important;
}

/* Both grids position their overlays against the tile. */
.chat-photo-grid-tile,
.chat-gallery-grid-tile {
	position: relative;
}

.pswp__button--download-one .chat-pswp-icn {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pswp-icon-color);
	font-size: 22px;
	line-height: 1;
}

.chat-gallery-grid-video-tile {
	aspect-ratio: 16 / 9;
}

.chat-gallery-grid-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;   /* letterbox rather than crop — cropping would cut the controls */
	background: #000;
}

.attachment-sortable,
.attachment-sortable .preview-image {
	/* Stops Safari's long-press image menu (Share / Save to Photos /
	   Copy) hijacking the gesture before Sortable's delay completes.
	   draggable="false" does not suppress this — only this does. */
	-webkit-touch-callout: none;

	/* A drag that starts a few pixels off otherwise becomes a text
	   selection, which looks broken on desktop and blocks the drag
	   on touch. */
	user-select: none;
	-webkit-user-select: none;
}

.attachment-sortable {
	cursor: grab;
}

.attachment-sortable:active {
	cursor: grabbing;
}

/* The gap left behind, and the clone under the cursor. Without these
   the drag gives no feedback about where the item will land. */
.sortable-ghost {
	opacity: 0.35;
}

.sortable-fallback {
	opacity: 0.9;
}

.chat-media-play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	pointer-events: none;   /* the tap belongs to the tile button underneath */
}

.chat-media-play-badge i {
	margin-left: 2px;       /* optical centring — a triangle looks left-heavy dead centre */
}

/* A video with no poster still needs to occupy space in the phone column,
   where tiles are sized by their image rather than a fixed aspect ratio. */
.chat-gallery-grid-tile-blank {
	aspect-ratio: 16 / 9;
}

/* Video attachments in chat — real aspect ratio (unlike the deliberately-
   cropped 1:1 image frame), capped to match the image frames' footprint. */
.chat-video-frame {
	width: 100%;
	max-width: 420px;
	background-color: rgba(0, 0, 0, 0.06);
	border-radius: 0.375rem;
	overflow: hidden;
}
.chat-video-frame video {
	max-height: 420px;
}

.role-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
	height: 100%;
}
.role-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}
.avatar-circle {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	font-weight: 600;
	flex-shrink: 0;
	overflow: hidden;
	border: 3px solid #dee2e6;
}
.avatar-circle img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.modal-avatar-circle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	font-weight: 600;
	flex-shrink: 0;
	border: 2px solid #dee2e6;
	overflow: hidden;
}

.lib-content { min-width: 0; }
@media (max-width: 575.98px) {
	.lib-card { flex-direction: row; }
	.lib-card .lib-preview { flex: 0 0 6.5rem; width: 6.5rem; --bs-aspect-ratio: 133.333%; }
	.lib-card .lib-page { padding: .5rem !important; }
	.lib-card .lib-icon { font-size: 2rem; }
	.lib-card .lib-badges { margin: .35rem !important; }
	.lib-card .card-body { padding: .75rem .75rem .5rem; }
	.lib-card .card-footer { padding: 0 .75rem .75rem; }
	.lib-card.lib-has-edit .card-title { padding-right: 2.25rem; }
}

.history-timeline {
	position: relative;
	padding-left: 1.25rem;
}
.history-timeline::before {
	content: '';
	position: absolute;
	left: 5px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	background: #dee2e6;
	border-radius: 1px;
}
.timeline-item {
	position: relative;
	padding: 0.4rem 0 0.4rem 1rem;
}
.timeline-item::before {
	content: '';
	position: absolute;
	left: -0.85rem;
	top: 0.85rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #6c757d;
	border: 2px solid #fff;
	box-shadow: 0 0 0 2px #6c757d;
}
.role-col {
	animation: fadeUp 0.35s ease both;
}

.binbag-icon, .person-icon{
	width: 100%;}

.binbag-icon, .ig-binbag-icon{
	fill: #9DD3A7;}
.person-icon, .ig-person-icon{
	fill: #009d91;}
	
.ig-binbag-icon{
	width: 17px;
	height: 25px;}
.ig-binbag-text{
	color: #9DD3A7;
	font-size: 30px;}

.ig-person-icon{
	width: 8px;
	height: 25px;}
.ig-person-text{
	font-family: "FatFrank Heavy",Helvetica,Arial,sans-serif;
	color: #009d91;
	font-size: 30px;}

.ig-binbags-total{
	position: relative;
	width: 100%;}
	
.ig-totalcount{
	font-family: "FatFrank Heavy",Helvetica,Arial,sans-serif;
	position: absolute;
	color: #fff;
	font-size: 50px;
	text-align: center;
	width: 100%;
	line-height: 1em;
	padding-top: 80%;}
	.ig-totalcount small{
		font-size: 13px;
		line-height: 18px;
		display: block;
		padding: 10% 20% 0 20%;}

ig-volunteers{
	position: relative;
}	

/* ═══════════════════════════════════════════════════════════════════
   Club Financial Report (club-financial-report.php)
   Builds on the Club Dashboard styles (.cd-*), so add this AFTER them.
   ═══════════════════════════════════════════════════════════════════ */

.cd-beta {
	display: inline-block;
	vertical-align: middle;
	margin-left: .35rem;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* Month and year pickers inside the dark hero datebar */
.cd-hero-select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 6px center / 12px 10px;
	border: 0;
	border-radius: 8px;
	color: #fff;
	color-scheme: dark;
	font-weight: 600;
	padding: 6px 24px 6px 8px;
	cursor: pointer;
	min-width: 0;
}
.cd-hero-select:hover { background-color: rgba(255, 255, 255, .1); }
.cd-hero-select:focus { outline: 2px solid rgba(255, 255, 255, .5); }
.cd-hero-select option { color: #1d2433; background: #fff; }
.cd-hero-select option:disabled { color: #9ca3af; }
.cd-datebar-to { opacity: .65; font-size: .85rem; }

.cd-hero-back {
	color: #fff;
	opacity: .8;
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.cd-hero-back:hover { color: #fff; opacity: 1; }

/* Headline tiles without a sparkline underneath */
.cd-kpi.cd-kpi-plain { padding-bottom: 18px; }
.cd-kpi-plain .cd-kpi-value { margin-top: 14px; font-variant-numeric: tabular-nums; }
.cd-kpi-foot { font-size: .75rem; color: var(--cd-muted); margin-top: 6px; }
.cd-kpi-share {
	font-size: .75rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--cd-soft);
	color: var(--cd-muted);
	white-space: nowrap;
}
.cd-kpi-share:empty { display: none; }
/* Pale accents (yellow, grey) need a darker icon to be readable */
.cd-kpi-icon.cd-kpi-icon-dark { color: color-mix(in srgb, var(--cd-accent) 50%, #1d2433); }

/* Net income: the one dark tile */
.cd-kpi.cd-kpi-dark { background: #1d2433; color: #fff; }
.cd-kpi-dark .cd-kpi-label,
.cd-kpi-dark .cd-kpi-foot { color: rgba(255, 255, 255, .65); }
.cd-kpi-dark .cd-kpi-share { background: rgba(255, 255, 255, .12); color: #fff; }
.cd-kpi-dark .cd-kpi-icon { background: rgba(31, 169, 113, .22); color: #5fd3a3; }

.cd-stackbar.cd-stackbar-lg { height: 20px; }

/* Transactions: table runs edge to edge inside the card */
.cd-card.cd-card-flush { padding: 0; }
.cd-txn-toolbar { padding: 14px 20px 6px; margin-bottom: 0; }
.cd-pager { display: inline-flex; align-items: center; gap: 8px; }
.cd-pager .cd-btn-text { padding: 5px 10px; }
.cd-pager .cd-btn-text:disabled { opacity: .35; cursor: default; }
.cd-table-flush th:first-child,
.cd-table-flush td:first-child { padding-left: 20px; }
.cd-table-flush th:last-child,
.cd-table-flush td:last-child { padding-right: 20px; }
.cd-table-flush td { padding-top: 10px; padding-bottom: 10px; }
.cd-table-flush tbody tr:last-child td { border-bottom: 0; }
.cd-table-flush tbody tr:hover td { background: var(--cd-soft); }
.cd-table-flush tr.is-refund td { background: #fffaf0; }
.cd-fr-desc { min-width: 220px; color: var(--cd-muted); }
.cd-badge-refund { color: #8a4b00; background: #fff1d6; margin-left: 4px; }
.cd-view { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; text-decoration: none; }
.cd-neg { color: var(--cd-down); }
.cd-share { min-width: 2.6rem; text-align: right; }

@media (max-width: 575.98px) {
	.cd-txn-toolbar { padding: 12px 16px 4px; }
	.cd-table-flush th:first-child,
	.cd-table-flush td:first-child { padding-left: 16px; }
	.cd-hero-select { flex: 1; }
	.cd-hero-back { margin-left: 0 !important; width: 100%; }
}	


.nav-link .spinner, .nav-item .spinner, .btn .spinner {
	display: none;
}

/* When loading, hide text and show spinner */
.nav-link.loading .btn-text, .nav-item.loading .btn-text, .btn.loading .btn-text {
	display: none;
	opacity: 0;
}
.nav-link.loading .spinner, .nav-item.loading .spinner, .btn.loading .spinner {
	display: inline-block;
}


#pills-tab.nav-pills .nav-link {
	--bs-nav-pills-link-bg: #e0e0e0;          /* background */
	color: #333!important;
	padding: .5rem;}

/* Change the active pill colour */
#pills-tab.nav-pills .nav-link.active,
#pills-tab.nav-pills .show > .nav-link {
	--bs-nav-pills-link-active-bg: #6c757d;   /* background */
	color: #fff!important;  /* text colour */
}

a.member-item{
	color: #000;
}
a.member-item:hover{
	border-color: #666;
	text-decoration: none;}
a.member-item:active{
	color: #fff;
	background: #666;}

/* BootStrap Extenders */
.start-safari{
	left: 70%!important;}
.start-chrome{
	left: 36%!important;}
.start-android{
	right: 4%!important;}
.end-5{
	right: 4%!important;}

#preview-holder .preview-image{
	max-width: 50%;}

/* DAY VIEW (inside modal) */
	.dayview{
	  display:grid;
	  grid-template-columns: 34px 1fr; /* time labels | track */
	  gap: .75rem;
	}
	
	/* left column: time labels */
	.dayview-times{
	  display:grid;
	  grid-template-rows: repeat(24, var(--hour-h, 56px));
	}
	.dayview-times .time{
	  display:flex;
	  align-items:center;      /* vertical middle */
	  justify-content:flex-end;/* keep it right-aligned */
	  font-size:.75rem;
	  color:rgba(0,0,0,.55);
	  padding-right:.25rem;
	  line-height:1;
	}
	
	/* right side: a single continuous track */
	.dayview-track{
	  position: relative;
	  height: calc((24 * var(--hour-h, 56px)) + (var(--hour-h, 56px) / 2)); /* +30 mins */
	  border-left: 1px solid rgba(0,0,0,.08);
	}
	
	/* hour lines layer */
	.dayview-hours{
	  position:absolute;
	  inset:0;
	  display:grid;
	  grid-template-rows: repeat(24, var(--hour-h, 56px));
	  pointer-events:none;
	  padding-bottom: calc(var(--hour-h, 56px) / 2); /* matches the extra 30 mins */
	  box-sizing: border-box;
	}
	.dayview-hours .hour{
	  position:relative;
	  border-top:0;
	}
	
	.dayview-hours .hour::before{
	  content:"";
	  position:absolute;
	  left:0;
	  right:0;
	  top:50%;
	  border-top:1px solid rgba(0,0,0,.08);
	}
	
	/* events layer */
	.dayview-events{
	  position:absolute;
	  inset:0;
	}
	
	/* event block: minute-accurate positioning */
	.day-event{
	  position:absolute;
	  left: 0;
	  right: 0;
	  top: calc(((var(--start) + 30) * 1px) * var(--px-per-min, 0.9333));
	  height: calc((var(--dur) * 1px) * var(--px-per-min, 0.9333));
	  border-radius: .5rem;
	  padding: .4rem .5rem;
	  overflow:hidden;
	  text-decoration:none;
	  pointer-events:auto;
	  box-shadow: 0 1px 3px rgba(0,0,0,.08);
	}
	
	/* horizontal stacking (lanes) */
	.day-event{
	  width: calc((100% - .5rem) / var(--lanes));
	  left: calc((100% / var(--lanes)) * var(--lane));
	  margin-left: .25rem;
	  margin-right: .25rem;
	}
	
	/* event text */
	.day-event .title{
	  font-weight: 600;
	  font-size: .85rem;
	  white-space: nowrap;
	  overflow:hidden;
	  text-overflow: ellipsis;
	}
	.day-event .meta{
	  font-size: .75rem;
	  opacity: .8;
	}
	
	
	/* set pixels-per-minute based on hour height:
	   if hour height is 56px: 56/60 = 0.9333px per min */
	.dayview{
	  --hour-h: 56px;
	  --px-per-min: 0.9333;
	}
	
	.day-event.continues-out{
	  border-bottom-left-radius: 0;
	  border-bottom-right-radius: 0;
	}
	.day-event.continues-in{
	  border-top-left-radius: 0;
	  border-top-right-radius: 0;
	}
	
	/* optional subtle indicators */
	.day-event.continues-out::after{
	  content:"";
	  position:absolute;
	  left:.5rem; right:.5rem; bottom:.2rem;
	  border-top:1px dashed rgba(255,255,255,.5);
	  opacity:.7;
	}
	.day-event.continues-in::before{
	  content:"";
	  position:absolute;
	  left:.5rem; right:.5rem; top:.2rem;
	  border-top:1px dashed rgba(255,255,255,.5);
	  opacity:.7;
	}
	.dayview-wrap{
	  display:flex;
	  flex-direction:column;
	  gap:.5rem;
	}
	
	/* all-day bar */
	.allday{
	  display:grid;
	  grid-template-columns: 34px 1fr; /* same as dayview */
	  gap:.75rem;
	  align-items:start;
	}
	
	.allday-label{
	  font-size:.75rem;
	  color: rgba(0,0,0,.55);
	  text-align:right;
	  padding-right:.25rem;
	  padding-top:.25rem;
	}
	
	.allday-lane{
	  display:flex;
	  flex-wrap:wrap;     /* if many all-day events, wrap to next line */
	  gap:.5rem;
	  padding:.25rem;
	  border-left: 1px solid rgba(0,0,0,.08);
	}
	
	.allday-event{
	  display:inline-block;
	  padding:.25rem .5rem;
	  border-radius:.5rem;
	  text-decoration:none;
	  font-size:.85rem;
	  white-space:nowrap;
	  max-width:100%;
	  overflow:hidden;
	  text-overflow:ellipsis;
	}

	:root{
		--hour-h: 60px;              /* height per hour row */
		--time-w: 50px;              /* left time column width */
		--day-min: 190px;            /* min width per day (for horizontal scroll) */
		--header-h: 48px;            /* sticky header height */
		--allday-h: 120px;           /* all-day strip height */
		--minute: calc(var(--hour-h) / 60);
	  }
	
	  .weekview-wrapper{
		overflow: hidden;
		border: 1px solid rgba(0,0,0,.06);
	  }
	  
	  /* Make the *entire* week view have one consistent minimum width */
	  .weekview-head,
	  .weekview-allday,
	  .weekview-body{
		min-width: calc(var(--time-w) + (var(--day-min) * 7));
	  }
	
	  /* ==================== HEADERS (sticky) ==================== */
	  .weekview-head{
		display:grid;
		grid-template-columns: var(--time-w) repeat(7, minmax(var(--day-min), 1fr));
		height: var(--header-h);
		position: sticky;
		top: 0;
		z-index: 30;
	  }
	
	  .weekview-corner{
		position: sticky;
		left: 0;
		z-index: 40;
	  }
	
	  .weekview-dayhead{
		display:flex;
		align-items:center;
		justify-content:center;
		text-align:center;
		background:#f8f9fa;
		line-height: 1.05;
		margin: 5px 2.5px 5px 2.5px;
	  }
	
	  /* ==================== ALL-DAY STRIP (sticky under headers) ==================== */
	  .weekview-allday{
		display:grid;
		grid-template-columns: var(--time-w) 1fr;
		height: var(--allday-h);
		position: sticky;
		top: var(--header-h);
		z-index: 25;
	  }
	
	  .weekview-corner--allday{
		display:flex;
		align-items:center;
		justify-content:center;
	  }
	
	  .weekview-corner--allday .label{
		font-size: .7rem;
		color:#6c757d;
		opacity:.9;
	  }
	
	  .weekview-allday-gridwrap{
		position: relative;
		min-width: calc(var(--day-min) * 7);
	  }
	
	  .weekview-allday-grid{
		height: 100%;
		background:
		  repeating-linear-gradient(
			to right,
			rgba(0,0,0,.06) 0,
			rgba(0,0,0,.06) 1px,
			transparent 1px,
			transparent calc(100% / 7)
		  );
	  }
	
	  .weekview-allday-overlay{
		position:absolute;
		inset: 8px 8px 10px 8px;
		display:grid;
		grid-template-columns: repeat(7, 1fr);
		grid-template-rows: repeat(3, 1fr); /* allow stacking */
		gap: 6px;
		pointer-events:none;
	  }
	
	  .allday-bar{
		pointer-events:auto;
		display:flex;
		align-items:center;
		padding: .35rem .5rem;
		border-radius: 10px;
		text-decoration:none;
		box-shadow: 0 1px 0 rgba(0,0,0,.08);
		overflow:hidden;
		white-space:nowrap;
		text-overflow:ellipsis;
		font-size: .78rem;
	  }
	  .allday-bar{ grid-column: var(--col) / span var(--span); grid-row: var(--row); }
	
	  /* ==================== BODY SCROLL AREA ==================== */
	  .weekview-body{
		display:grid;
		grid-template-columns: var(--time-w) 1fr;
		background-color: #fff;
	  }
	
	  /* sticky times col */
	  .weekview-times{
		display:grid;
		grid-template-rows: repeat(24, var(--hour-h));
		background:#fff;
		border-right: 1px solid rgba(0,0,0,.08);
		position: sticky;
		left: 0;
		z-index: 20;
	  }
	
	  /* label aligned to vertical middle of hour */
	  .weekview-times .time{
		font-size: .75rem;
		padding-left: .5rem;
		color:#6c757d;
		opacity:.85;
	  }
	
	  .weekview-gridwrap{
		position: relative;
		min-width: calc(var(--day-min) * 7);
	  }
	
	  /* base grid lines */
	  .weekview-grid{
		height: calc(var(--hour-h) * 24);
		background:
		  /* vertical day dividers */
		  repeating-linear-gradient(
			to right,
			rgba(0,0,0,.06) 0,
			rgba(0,0,0,.06) 1px,
			transparent 1px,
			transparent calc(100% / 7)
		  ),
		  /* hour lines */
		  repeating-linear-gradient(
			to bottom,
			rgba(0,0,0,.08) 0,
			rgba(0,0,0,.08) 1px,
			transparent 1px,
			transparent var(--hour-h)
		  );
	  }
	
	  /* overlay grid (minutes) */
	  .weekview-overlay{
		position:absolute;
		inset: 0;
		display:grid;
		grid-template-columns: repeat(7, 1fr);
		grid-template-rows: repeat(1440, var(--minute));
		pointer-events:none; /* allow scroll */
	  }
	
	  .week-event{
		pointer-events:auto;
		border-radius: 10px;
		padding: .4rem .5rem;
		overflow:hidden;
		text-decoration:none;
		box-shadow: 0 1px 0 rgba(0,0,0,.08);
		font-size: .75rem;
		line-height: 1.15;
		display:block;
		margin: 3px;
		position: relative;
		box-sizing: border-box;
		--lanes: 1;
		--lane: 0;
		--lane-gap: 0px;
		width: calc((100% - (var(--lane-gap) * (var(--lanes) - 1))) / var(--lanes));
		left: calc((100% / var(--lanes)) * var(--lane));
		margin-left: calc(var(--lane-gap) * var(--lane));
		grid-column: var(--day);
		grid-row: calc(var(--start) + 1) / span var(--dur);
	  }
	
	  .week-event .title{
		font-weight:700;
		white-space:nowrap;
		overflow:hidden;
		text-overflow:ellipsis;
	  }
	
	  .week-event .meta{
		opacity:.75;
		margin-top:.15rem;
		white-space:nowrap;
		overflow:hidden;
		text-overflow:ellipsis;
	  }

	  @keyframes ping {
		  0% { transform: scale(1); opacity: 0.5; }
		  100% { transform: scale(1.8); opacity: 0; }
	  }
	  
	  @keyframes fadeUp {
		  from { opacity: 0; transform: translateY(12px); }
		  to   { opacity: 1; transform: translateY(0); }
	  }

/* =====================================================================
		 Admin permissions — users/edit-permissions.php
		 (modules/Permissions/permissions-client.js)
		 A summary list of who has access, and a side panel to change one
		 person. Built on the notification settings pieces (.ns-section,
		 .ns-wrap, .ns-card, .ns-push, .ns-search, .ns-intro) and the groups
		 list ones (.gl-avatar, .gl-search, .gl-moved).
		 Replaces the earlier permissions block. Append this to layout.css
		 after the notification settings section.
		 ===================================================================== */
	  
	  /* ---------- Summary list ---------- */
	  
	  .pm-row {
		  display: flex;
		  align-items: center;
		  gap: .9rem;
		  padding: .85rem 1.25rem;
		  border-top: 1px solid var(--bs-border-color-translucent);
		  color: inherit;
		  text-decoration: none;
		  transition: background-color .15s;
	  }
	  .pm-row:first-child { border-top: 0; }
	  a.pm-row:hover { background: rgba(var(--bs-emphasis-color-rgb), .035); color: inherit; }
	  a.pm-row:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
	  .pm-row .gl-avatar { flex: none; width: 2.75rem; height: 2.75rem; font-size: .9rem; }
	  .pm-row-body { flex: 1 1 auto; min-width: 0; }
	  .pm-row-name { font-weight: 600; line-height: 1.25; }
	  .pm-row-meta { font-size: .75rem; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	  .pm-row-go { flex: none; color: var(--bs-tertiary-color); }
	  .pm-row.is-open { background: rgba(var(--bs-primary-rgb), .06); box-shadow: inset 3px 0 0 var(--bs-primary); }
	  
	  .pm-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
	  .pm-chip {
		  display: inline-flex;
		  align-items: center;
		  gap: .35rem;
		  padding: .2rem .6rem;
		  border-radius: 999px;
		  font-size: .75rem;
		  font-weight: 600;
		  line-height: 1.4;
		  background: rgba(var(--bs-primary-rgb), .1);
		  border: 1px solid rgba(var(--bs-primary-rgb), .22);
		  color: var(--bs-emphasis-color);
	  }
	  .pm-chip i { font-size: .7rem; opacity: .75; }
	  .pm-chip-l4 { background: rgba(var(--bs-primary-rgb), .2); border-color: rgba(var(--bs-primary-rgb), .4); }
	  .pm-chip-reach { background: transparent; border-style: dashed; border-color: var(--bs-border-color); color: var(--bs-secondary-color); font-weight: 500; }
	  
	  /* ---------- Add someone ---------- */
	  
	  .pm-add-card { overflow: visible; position: relative; z-index: 10; }   /* so the results can drop down past it */
	  .pm-add-icon { background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
	  .pm-search .gl-search { position: relative; }
	  .pm-results {
		  position: absolute;
		  top: calc(100% + .35rem);
		  left: 0;
		  right: 0;
		  z-index: 20;
		  max-height: 22rem;
		  overflow-y: auto;
		  border-radius: .9rem;
		  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12);
	  }
	  .pm-result { display: flex; align-items: center; gap: .75rem; text-align: left; padding: .6rem 1rem; }
	  .pm-result-text { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
	  .pm-result-text strong,
	  .pm-result-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	  
	  /* ---------- Edit panel ---------- */
	  
	  .pm-panel.offcanvas-end { width: 34rem; max-width: 100%; border-left: 0; box-shadow: -.5rem 0 2rem rgba(0, 0, 0, .12); }
	  .pm-panel .offcanvas-header { padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid var(--bs-border-color-translucent); gap: .9rem; }
	  .pm-panel .offcanvas-header .gl-avatar { flex: none; width: 3rem; height: 3rem; font-size: 1rem; }
	  .pm-panel .offcanvas-body { padding: 1.25rem 1.5rem; }
	  .pm-panel-section { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); margin: 0 0 .6rem; }
	  
	  /* Quick roles */
	  .pm-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.6rem; }
	  .pm-preset {
		  border: 1px solid var(--bs-border-color);
		  background: var(--bs-body-bg);
		  color: var(--bs-body-color);
		  border-radius: 999px;
		  padding: .35rem .8rem;
		  font-size: .82rem;
		  font-weight: 600;
	  }
	  .pm-preset:hover:not(:disabled) { border-color: var(--bs-primary); color: var(--bs-primary); }
	  .pm-preset.is-active,
	  .pm-preset.is-active:hover { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
	  .pm-preset:disabled { opacity: .4; cursor: not-allowed; }
	  
	  /* One zone: label on the left, a five-way switch on the right */
	  .pm-zone { display: flex; align-items: center; gap: 1rem; padding: .55rem 0; }
	  .pm-zone + .pm-zone { border-top: 1px solid var(--bs-border-color-translucent); }
	  .pm-zone-label { flex: 0 0 8.5rem; display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .92rem; }
	  .pm-zone-label i { width: 1.1rem; text-align: center; color: var(--bs-secondary-color); }
	  .pm-zone-note { display: block; font-size: .7rem; font-weight: 500; color: var(--bs-secondary-color); }
	  .pm-zone-saved { display: block; font-size: .7rem; font-weight: 600; color: var(--bs-success); }
	  .pm-help .pm-zone-saved { display: inline; }
	  .pm-zone-saved.d-none { display: none !important; }
	  
	  .pm-seg {
		  flex: 1 1 auto;
		  display: grid;
		  grid-template-columns: repeat(5, 1fr);
		  gap: 2px;
		  padding: 3px;
		  border-radius: 999px;
		  background: var(--bs-tertiary-bg);
	  }
	  .pm-seg button {
		  border: 0;
		  background: transparent;
		  border-radius: 999px;
		  padding: .35rem 0;
		  font-size: .78rem;
		  font-weight: 600;
		  color: var(--bs-secondary-color);
		  white-space: nowrap;
	  }
	  .pm-seg button:hover:not(:disabled) { color: var(--bs-body-color); background: rgba(var(--bs-emphasis-color-rgb), .06); }
	  .pm-seg button:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
	  .pm-seg button.is-on { background: var(--bs-body-bg); color: var(--bs-emphasis-color); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
	  .pm-seg button.is-on:not(:first-child) { background: var(--bs-primary); color: #fff; }
	  .pm-seg button:disabled { opacity: .35; cursor: not-allowed; }
	  .pm-seg button.is-on:disabled { opacity: .7; }
	  
	  /* Reach into affiliated organisations: a setting, not a level, so no blue */
	  .pm-reach { display: block; }
	  .pm-reach .pm-seg button.is-on,
	  .pm-reach .pm-seg button.is-on:not(:first-child) { background: var(--bs-body-bg); color: var(--bs-emphasis-color); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
	  .pm-help { font-size: .78rem; color: var(--bs-secondary-color); margin: .4rem 0 0; }
	  .pm-not-mine { padding-top: .6rem; border-top: 1px solid var(--bs-border-color-translucent); }
	  
	  /* Recent changes */
	  .pm-history { list-style: none; padding: 0; margin: 0 0 .5rem; }
	  .pm-history li { position: relative; padding: 0 0 .9rem 1.25rem; font-size: .85rem; }
	  .pm-history li::before { content: ""; position: absolute; left: .3rem; top: .4rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--bs-secondary-color); }
	  .pm-history li::after { content: ""; position: absolute; left: .5rem; top: 1rem; bottom: 0; width: 1px; background: var(--bs-border-color); }
	  .pm-history li:last-child::after { display: none; }
	  .pm-history small { display: block; color: var(--bs-secondary-color); font-size: .75rem; }
	  
	  .pm-panel-footer { display: flex; align-items: center; gap: .5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--bs-border-color-translucent); }
	  .pm-autosave { font-size: .8rem; color: var(--bs-secondary-color); }
	  .pm-remove-link { border: 0; background: none; padding: 0; color: var(--bs-danger); font-size: .85rem; font-weight: 600; }
	  
	  /* ---------- Saved / Undo toast ---------- */
	  
	  .pm-toast {
		  position: fixed;
		  z-index: 1100;
		  left: 50%;
		  bottom: 4.5rem;
		  transform: translateX(-50%);
		  display: flex;
		  align-items: center;
		  gap: .65rem;
		  max-width: calc(100vw - 2rem);
		  padding: .6rem .6rem .6rem 1rem;
		  border-radius: 999px;
		  background: #212529;
		  color: #fff;
		  font-size: .88rem;
		  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
	  }
	  .pm-toast > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
	  .pm-toast > i { flex: none; color: #75b798; }
	  .pm-toast-error > i { color: #ea868f; }
	  .pm-toast-error { padding-right: 1rem; }
	  .pm-toast-undo { flex: none; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: .8rem; border-radius: 999px; padding: .3rem .8rem; }
	  .pm-toast-undo:hover { background: rgba(255, 255, 255, .24); }
	  /* Wider screens: bottom-left, so it sits over the page rather than the open panel */
	  @media (min-width: 576px) {
		  .pm-toast { left: 2rem; transform: none; bottom: 2rem; max-width: 30rem; }
	  }
	  
	  /* ---------- What the levels mean ---------- */
	  
	  .pm-legend { font-size: .85rem; color: var(--bs-secondary-color); line-height: 1.6; }
	  .pm-legend strong { color: var(--bs-body-color); }
	  
	  /* ---------- Phones ---------- */
	  
	  @media (max-width: 575.98px) {
		  .pm-row { padding: .85rem 1rem; }
		  .pm-zone { flex-direction: column; align-items: stretch; gap: .4rem; }
		  .pm-zone-label { flex: none; }
		  .pm-seg button { font-size: .74rem; }
		  .pm-panel .offcanvas-header,
		  .pm-panel .offcanvas-body,
		  .pm-panel-footer { padding-left: 1rem; padding-right: 1rem; }
	  }
	  
	  @media (prefers-reduced-motion: reduce) {
		  .pm-row { transition: none; }
	  }




@media (max-width: 575px) {

	#month-event-overlay-mobile {
		position: relative;
		padding-left: 4px !important;
	}

	.mobile-day-header {
		display: grid;
		grid-template-columns: 62px 1fr;
		gap: 0 10px;
		margin-bottom: 20px;
		align-items: start;
		position: relative;
	}

	/* Vertical line */
	.mobile-day-header::before {
		content: '';
		position: absolute;
		left: 57px;
		top: 0;
		bottom: -20px;
		width: 1px;
		background-color: #dee2e6;
		z-index: 0;
	}

	/* Dot */
	.mobile-day-header::after {
		content: '';
		position: absolute;
		left: 52px;
		top: 17px;
		width: 10px;
		height: 10px;
		border-radius: 50%;
		background-color: #dee2e6;
		border: 2px solid white;
	}
	
	#today {
		scroll-margin-top: 140px;
	}

	.mobile-day-header.today::after {
		background-color: #0d6efd;
	}

	.mobile-day-header:last-child::before {
		bottom: 0;
	}

	.mobile-day-header > p {
		grid-column: 1;
		margin: 0;
		padding-top: 10px;
		padding-right: 14px;
		text-align: center;
		border: none !important;
		opacity: 1;
	}

	.mobile-day-header > p .badge {
		position: static !important;
		display: flex;
		flex-direction: column;
		align-items: center;
		background: transparent !important;
		color: #888 !important;
		font-weight: 300;
		font-size: 0.6rem;
		line-height: 1.2;
		padding: 0;
		white-space: nowrap;
		width: 100%;
	}

	.mobile-day-header > .event-bar {
		grid-column: 2;
		margin-bottom: 3px;
		height: 28px;
	}
}

@media (min-width: 576px) {
	html{font-size: 13px;}
	.yesnoswitch-inner:before, .yesnoswitch-inner:after, .livedraftswitch-inner:before, .livedraftswitch-inner:after, .onoffswitch-inner:before, .onoffswitch-inner:after {
	height: 29px; line-height: 29px;}
	#preview-holder .preview-image{
	max-width: 25%;}
	
	/* Events Calendar */
	
	.calendar-wrapper {
		background: #e6e9eb;
		position: relative;
	}
	
	/* day grid – base (mobile = 1 column) */
	.month-grid {
		display: grid;
		grid-template-columns: 1fr;          /* one long column on mobile */
		grid-auto-rows: 150px;               /* each “slot” 150px high */
		gap: 2px;
		font-weight: 600;
	}
	
	.day-header {
		background: #f8f9fa;
		text-align: center;
		font-weight: 600;
		padding: .5rem;
		border: 1px solid #e6e9eb;
	}
	
	.month-grid,
	.month-grid .day-cell {
		border: 1px solid #e6e9eb;
		min-height: 150px;
		padding: .5rem;
	}
	
	.day-cell {
		background: #fff;
	}
	
	.day-number {
		font-weight: 700;
	}
	
	.day-blank {
		background: #f1f1f1 !important;
	}
	
	/* overlay base */
	.event-overlay {
		position: absolute;
		inset: 0;
		display: grid;
		gap: 2px;
		pointer-events: none;
		padding: 0.5rem;
	}
	
	/* spans (desktop) */
	.col-span-2 { grid-column-end: span 2 !important; }
	.col-span-3 { grid-column-end: span 3 !important; }
	.col-span-4 { grid-column-end: span 4 !important; }
	.col-span-5 { grid-column-end: span 5 !important; }
	.col-span-6 { grid-column-end: span 6 !important; }
	.col-span-7 { grid-column-end: span 7 !important; }
	
	.month-grid {
		grid-template-columns: repeat(7, 1fr);
		grid-template-rows: 38px repeat(5, 150px); /* header + 5 weeks */
	}
	
	.event-overlay {
		grid-template-columns: repeat(7, 1fr);
		grid-template-rows: 42px repeat(5, 150px);
	}
	
	/* Week 1 (grid-row: 2 because row 1 is the weekday header) */
	.w1-d1-start { grid-column: 1; grid-row: 2; }
	.w1-d2-start { grid-column: 2; grid-row: 2; }
	.w1-d3-start { grid-column: 3; grid-row: 2; }
	.w1-d4-start { grid-column: 4; grid-row: 2; }
	.w1-d5-start { grid-column: 5; grid-row: 2; }
	.w1-d6-start { grid-column: 6; grid-row: 2; }
	.w1-d7-start { grid-column: 7; grid-row: 2; }
	
	/* Week 2 (row 3), etc. */
	.w2-d1-start { grid-column: 1; grid-row: 3; }
	.w2-d2-start { grid-column: 2; grid-row: 3; }
	.w2-d3-start { grid-column: 3; grid-row: 3; }
	.w2-d4-start { grid-column: 4; grid-row: 3; }
	.w2-d5-start { grid-column: 5; grid-row: 3; }
	.w2-d6-start { grid-column: 6; grid-row: 3; }
	.w2-d7-start { grid-column: 7; grid-row: 3; }
	
	/* Week 3 (row 3), etc. */
	.w3-d1-start { grid-column: 1; grid-row: 4; }
	.w3-d2-start { grid-column: 2; grid-row: 4; }
	.w3-d3-start { grid-column: 3; grid-row: 4; }
	.w3-d4-start { grid-column: 4; grid-row: 4; }
	.w3-d5-start { grid-column: 5; grid-row: 4; }
	.w3-d6-start { grid-column: 6; grid-row: 4; }
	.w3-d7-start { grid-column: 7; grid-row: 4; }
	
	/* Week 4 (row 3), etc. */
	.w4-d1-start { grid-column: 1; grid-row: 5; }
	.w4-d2-start { grid-column: 2; grid-row: 5; }
	.w4-d3-start { grid-column: 3; grid-row: 5; }
	.w4-d4-start { grid-column: 4; grid-row: 5; }
	.w4-d5-start { grid-column: 5; grid-row: 5; }
	.w4-d6-start { grid-column: 6; grid-row: 5; }
	.w4-d7-start { grid-column: 7; grid-row: 5; }

	/* ... */
	.w5-d1-start { grid-column: 1; grid-row: 6; }
	.w5-d2-start { grid-column: 2; grid-row: 6; }
	.w5-d3-start { grid-column: 3; grid-row: 6; }
	.w5-d4-start { grid-column: 4; grid-row: 6; }
	.w5-d5-start { grid-column: 5; grid-row: 6; }
	.w5-d6-start { grid-column: 6; grid-row: 6; }
	.w5-d7-start { grid-column: 7; grid-row: 6; }

	/* ... */
	.w6-d1-start { grid-column: 1; grid-row: 7; }
	.w6-d2-start { grid-column: 2; grid-row: 7; }
	.w6-d3-start { grid-column: 3; grid-row: 7; }
	.w6-d4-start { grid-column: 4; grid-row: 7; }
	.w6-d5-start { grid-column: 5; grid-row: 7; }
	.w6-d6-start { grid-column: 6; grid-row: 7; }
	.w6-d7-start { grid-column: 7; grid-row: 7; }
	
	
	.event-bar {
		margin: .1rem .5rem;
		margin-top: calc(var(--ev-i, 0) * 1.65rem);
		height: 21px;
		z-index: 1;}
	.event-details{
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.event-logo {
	width: 14px!important;
	height: 14px!important;}
	
	.group-avatar{
	width:15px; height:15px; font-size:0.55rem;}
	
	.gl-chip {
		position: relative;
		z-index: 2;
		display: inline-flex;
		align-items: center;
		gap: .4rem;
		padding: .6rem 1rem;
		border: 1px solid var(--bs-border-color);
		border-radius: 20px;
		background: var(--bs-body-bg);
		color: var(--bs-body-color);
		font-size: 0.9rem;
		line-height: 1.5;
		text-decoration: none;
		flex-shrink: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: auto;
	}
}

@media (max-width:500px) {
	.role-card .ratio-16x9 {
		--bs-aspect-ratio: 90%; 
	}
}

@media (max-width:767px) {
	.weekview-xscroll{
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	  }
}

@media (min-width: 768px) {
	html{font-size: 14px;}
	.table-number-input{width:inherit;}
  #cd-timeline::before {
	left: 50%;
	margin-left: -2px;}
	.fullwidth-hero{height: 400px;}

  .cd-timeline-img {
	top:30px;
	width: 30px;
	height: 30px;
	left: 50%;
	margin-left: -15px;
	/* Force Hardware Acceleration in WebKit */
	-webkit-transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	#pills-tab.nav-pills .nav-link {
	padding: .8rem;}
  }


  .cd-timeline-content {
	margin-left: 0;
	padding: 1.6em;
	width: 45%;
  }
  .cd-timeline-content::before {
	top: 24px;
	left: 100%;
	border-color: transparent;
	border-left-color: #ffc107;
  }
  .cd-timeline-content .cd-read-more {
	float: left;
  }
  .cd-timeline-content .cd-date {
	position: absolute;
	width: 100%;
	left: 122%;
	top: 22px;
	font-size: 16px;
	font-weight: bold;
	color: #aaa;
  }
  .cd-timeline-block:nth-child(even) .cd-timeline-content {
	float: right;
  }
  .cd-timeline-block:nth-child(even) .cd-timeline-content::before {
	top: 24px;
	left: auto;
	right: 100%;
	border-color: transparent;
	border-right-color: #ffc107;
  }
  .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more {
	float: right;
  }
  .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-date {
	left: auto;
	right: 122%;
	text-align: right;
  }
  .yesnoswitch-inner:before, .yesnoswitch-inner:after, .livedraftswitch-inner:before, .livedraftswitch-inner:after, .onoffswitch-inner:before, .onoffswitch-inner:after {
	height: 32px; line-height: 32px;}
	
	.offcanvas-notice{
		padding-left: 12%;
		padding-right: 12%;
	}
	
	:root{ --day-min: 1px; }
	.weekview-allday-gridwrap,
	.weekview-gridwrap{ min-width: 0; }
	
}


@media (min-width: 992px) {
	html{font-size: 15px;}
	.btn-sq{
		padding-top: 2rem;
		padding-bottom: 2rem;}
	.jumbotron-start-line .logo{
		max-width: 6rem;}
	.fullwidth-hero{height: 500px;}
	.yesnoswitch-inner:before, .yesnoswitch-inner:after, .livedraftswitch-inner:before, .livedraftswitch-inner:after, .onoffswitch-inner:before, .onoffswitch-inner:after {
	height: 34px; line-height: 34px;}
	
	#nav-wrap{
		flex-wrap: wrap;}
	.offcanvas-notice{
		padding-left: 25%;
		padding-right: 25%;
	}
}

@media (max-width: 1400px) {
	#primary-nav, #secondary-nav {
		transition: opacity 0.2s ease-in-out;
	}
	#primary-nav.sticky-top, #secondary-nav.sticky-top {
		opacity: 1;
	}
	#primary-nav.nav-hidden, #secondary-nav.nav-hidden {
		opacity: 0;
	}
}

@media (min-width: 1400px) {
	html{font-size: 15px;}
	.fullwidth-hero{height: 550px;}
	#main-content, .main-footer{
		margin-right:19%;}
	#main-content #chat-edit{
			margin-right:19%;}
	#navigationFullMenu{
		position: fixed;
		right:0!important;
		top:0!important;
		height: 100vh;
		width:19vw;
		border-left:0;}
}

@media (min-width: 1705px) {
	#main-content, .main-footer{
		margin-right:15%;}
	#main-content #chat-edit{
			margin-right:15%;}
	#navigationFullMenu{
		position: fixed;
		right:0!important;
		top:0!important;
		height: 100vh;
		width:15vw;
		border-left:0;}
}

/* ── Chat-page document lock. The page's natural flow (chrome + a chat
   sized to exactly fill down to the composer + trailing elements like
   .footerpadding) sums slightly taller than the viewport, creating a
   document scrollbar. The chat scrolls internally so it's invisible —
   until a scroll gesture lands OUTSIDE the chat scroller (header, the
   floating search/down buttons) and scrolls the document instead,
   dragging the header off-screen. On pages with a chat, the document
   must not scroll at all: #chat is the only scroller. CSS-only via
   :has() so no JS is involved. */
html:has(#chat-shell),
body:has(#chat-shell) {
	overflow: hidden;
	height: 100%;
	min-height: 100%;
	min-height: 100dvh !important;
	overscroll-behavior: none;
}

/* Search toggle/panel must clear the UNREAD BANNER as well as the pin
   bar — the banner pushes the pin bar down by its own height, which
   was landing the search button exactly on top of the pins. Rules for
   banner-only and banner+pin (the banner renders before the pin bar in
   the shell, so the combined ~ chain matches); when the banner
   disappears — cleared, or the live counter reaches zero — these stop
   matching and everything rises back automatically. Tune
   --chat-banner-offset if the banner styling changes its height. */
#unread-banner ~ #chat-search-toggle {
	top: calc(0.75rem + var(--chat-banner-offset, 3.2rem));
}
#unread-banner ~ #chat-search {
	top: calc(0.75rem + 2px + var(--chat-banner-offset, 3.2rem));
}
#unread-banner ~ .chat-pin-bar ~ #chat-search-toggle {
	top: calc(0.75rem + var(--chat-banner-offset, 3.2rem) + var(--chat-pin-offset, 2.9rem));
}
#unread-banner ~ .chat-pin-bar ~ #chat-search {
	top: calc(0.75rem + 2px + var(--chat-banner-offset, 3.2rem) + var(--chat-pin-offset, 2.9rem));
}
@media (max-width: 576px) {
	#unread-banner ~ #chat-search {
		top: calc(0.75rem + 42px + 0.5rem + var(--chat-banner-offset, 3.2rem));
	}
	#unread-banner ~ .chat-pin-bar ~ #chat-search {
		top: calc(0.75rem + 42px + 0.5rem + var(--chat-banner-offset, 3.2rem) + var(--chat-pin-offset, 2.9rem));
	}
}

/* Reaction picker (see renderReactionMenu in reaction.js): a fixed
   7-per-row grid so the 14-emoji set forms two tidy rows instead of
   one long strip or a ragged wrap. Adding reactions later just grows
   more rows. */
.reaction-picker-grid {
	display: grid;
	grid-template-columns: repeat(7, auto);
	justify-items: center;
}

/* System markers in the chat ("X joined the group") — centred pill,
   visually akin to the day markers but distinguishable. */
.system-marker-label {
	display: inline-block;
	background: rgba(0, 0, 0, 0.07);
	color: #5f6b76;
	font-size: 0.78rem;
	padding: 0.2rem 0.7rem;
	border-radius: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   CLUB FILE LIBRARY  (/library/)
   index.php (browse), club-library-edit-file.php (editor),
   club-library-file-users.php (activity). Scripts live in
   /modules/ClubFileLibrary/library-client.js.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shared ─────────────────────────────────────────────────── */

/* Round icon buttons (+, tag/group shortcuts, edit on the activity page) */
.lib-circle-btn {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}
.lib-circle-btn-sm { width: 2.25rem; height: 2.25rem; }

/* Pill search box with the icon inside (and an optional clear × at the end) */
.library-search { position: relative; flex: 1 1 auto; min-width: 0; }
.library-search .form-control { padding-left: 2.6rem; padding-right: 2.6rem; border-radius: 50rem; }
.library-search-icon {
	position: absolute;
	top: 50%;
	left: 1rem;
	transform: translateY(-50%);
	color: var(--bs-secondary-color);
	pointer-events: none;
}
.library-search-clear {
	position: absolute;
	top: 50%;
	right: .6rem;
	transform: translateY(-50%);
	padding: .25rem;
	border: 0;
	background: transparent;
	line-height: 1;
	font-size: 1.2rem;
	color: var(--bs-secondary-color);
}
.library-search-clear:hover,
.library-search-clear:focus-visible { color: var(--bs-body-color); }
.library-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ── Browse (index.php) ─────────────────────────────────────── */

/* Search + filter bar, pinned while scrolling. --library-sticky-top is set
   by library-client.js to clear the site's own fixed header. */
.library-toolbar {
	position: sticky;
	top: var(--library-sticky-top, 0px);
	z-index: 1010;
	margin: 0 -.75rem 1rem;
	padding: .75rem .75rem .5rem;
	background: rgba(var(--bs-body-bg-rgb), .95);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: box-shadow .2s;
}
.library-toolbar.is-stuck { box-shadow: 0 .5rem 1rem -.75rem rgba(0, 0, 0, .35); }
.library-toolbar .lib-circle-btn { width: 2.75rem; height: 2.75rem; }
#library-sentinel { height: 1px; margin-bottom: -1px; }
#filter-count { font-size: .65rem; }

/* Active filter chips */
.lib-chip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .15rem .6rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 50rem;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	font-size: .8rem;
	line-height: 1.5;
}
.lib-chip:hover { border-color: var(--bs-secondary); }
.lib-chip i { color: var(--bs-secondary-color); font-size: .75rem; }

/* Filters: a bottom sheet on phones, a sticky side column from md up */
#libraryFilters.offcanvas-bottom { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
@media (min-width: 768px) {
	.library-filters-wrap {
		position: sticky;
		top: calc(var(--library-sticky-top, 0px) + .75rem);
		max-height: calc(100vh - var(--library-sticky-top, 0px) - 1.5rem);
		overflow-y: auto;
	}
	#libraryFilters .offcanvas-body { display: block; padding: 0; }
}

/* Loading placeholders: the same card shape as the real thing, with the
   same grey and pulse as the group chat (chat-img-skeleton-pulse above) */
.lib-skeleton .lib-preview,
.lib-skeleton .placeholder {
	background-color: rgba(0, 0, 0, .06);
	opacity: 1;
	animation: chat-img-skeleton-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
	.lib-skeleton .lib-preview,
	.lib-skeleton .placeholder { animation: none; background-color: rgba(0, 0, 0, .08); }
}

/* ── Editor (club-library-edit-file.php) ────────────────────── */

/* Round see-through buttons over the thumbnail, matching the group page */
.thumb-action-btn {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	color: #fff;
	background-color: rgba(60, 60, 60, .6);
	box-shadow: 0 .125rem .35rem rgba(0, 0, 0, .25);
	backdrop-filter: blur(2px);
}
.thumb-action-btn:hover,
.thumb-action-btn:focus-visible { color: #fff; background-color: rgba(30, 30, 30, .8); }

/* "What are you adding?" — file / video / link cards */
.kind-option {
	--kind-color: #495057;
	--kind-tint: rgba(73, 80, 87, .08);
	--kind-ring: rgba(73, 80, 87, .2);
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	height: 100%;
	padding: 1.5rem .75rem 1.25rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 1rem;
	background: var(--bs-body-bg);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	color: var(--bs-body-color);
	text-align: center;
	line-height: 1.2;
	cursor: pointer;
	user-select: none;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.kind-option:hover {
	transform: translateY(-2px);
	border-color: var(--kind-color);
	box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .08);
}
.kind-icon {
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	color: var(--kind-color);
	background: var(--kind-tint);
	transition: background-color .15s ease, color .15s ease;
}
.kind-title { font-weight: 600; font-size: 1.05rem; }
.kind-hint  { font-size: .8rem; color: var(--bs-secondary-color); }
.kind-check {
	position: absolute;
	top: .6rem;
	right: .6rem;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: .7rem;
	color: #fff;
	background: var(--kind-color);
}
.btn-check:checked + .kind-option {
	border-color: var(--kind-color);
	background: var(--kind-tint);
	box-shadow: 0 0 0 .2rem var(--kind-ring);
	transform: none;
}
.btn-check:checked + .kind-option .kind-icon { background: var(--kind-color); color: #fff; }
.btn-check:checked + .kind-option .kind-check { display: flex; }
.btn-check:focus-visible + .kind-option { outline: 2px solid var(--kind-color); outline-offset: 2px; }

@media (max-width: 575.98px) {
	.kind-option { padding: 1.1rem .4rem .9rem; gap: .4rem; border-radius: .85rem; }
	.kind-icon { width: 2.75rem; height: 2.75rem; font-size: 1.15rem; }
	.kind-title { font-size: .95rem; }
}

/* Tags and groups on the item, as removable chips */
#tagdiv,
#groupdiv { display: flex; flex-wrap: wrap; gap: .4rem; }
#tagdiv:empty::before   { content: "No tags yet"; font-size: .875rem; color: var(--bs-secondary-color); }
#groupdiv:empty::before { content: "No groups: not limited"; font-size: .875rem; color: var(--bs-secondary-color); }

.tag-chip {
	display: inline-flex;
	align-items: center;
	gap: .15rem;
	padding: .25rem .3rem .25rem .8rem;
	border-radius: 50rem;
	background: #495057;
	color: #fff;
	font-size: .875rem;
	line-height: 1.4;
}
.tag-chip .deltag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, .75);
	font-size: .8rem;
}
.tag-chip .deltag:hover,
.tag-chip .deltag:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; }

/* Group chips take the group's colour (--chip-bg / --chip-fg, set inline) */
.group-chip { background: var(--chip-bg, #495057); color: var(--chip-fg, #fff); }
.group-chip .deltag { color: inherit; opacity: .75; }
.group-chip .deltag:hover,
.group-chip .deltag:focus-visible { opacity: 1; background: rgba(127, 127, 127, .25); color: inherit; }

/* ── Activity (club-library-file-users.php) ─────────────────── */

.act-stat {
	height: 100%;
	padding: .75rem 1rem;
	border: 1px solid var(--bs-border-color);
	border-radius: .75rem;
	background: var(--bs-body-bg);
}
.act-stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.act-stat-label { font-size: .75rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.act-stat .progress { height: .35rem; margin-top: .5rem; }

.act-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; }
.act-row + .act-row { border-top: 1px solid var(--bs-border-color-translucent); }
.act-avatar {
	width: 2.5rem;
	height: 2.5rem;
	flex-shrink: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bs-secondary-bg);
	color: var(--bs-secondary-color);
	font-weight: 600;
	font-size: .85rem;
}
.act-main { flex: 1 1 auto; min-width: 0; }
.act-name { font-weight: 600; overflow-wrap: anywhere; }
.act-meta { font-size: .8rem; color: var(--bs-secondary-color); }
.act-pill { padding: .3rem .65rem; border-radius: 50rem; font-size: .75rem; font-weight: 500; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════
   END CLUB FILE LIBRARY
   ═══════════════════════════════════════════════════════════════ */


/* =====================================================================
   Home page widget — conditions + family events (home-widget.js)
   #home-widget sets --hw-accent (club colour) and --hw-on-accent.
   ===================================================================== */

/* Cards are Bootstrap's card border shadow overflow-hidden mb-4; the
   holder already has mb-4, so the last card doesn't add a second gap. */
.hw > .card:last-child { margin-bottom: 0 !important; }

.hw-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--bs-emphasis-color);
}

.hw-sub,
.hw-muted {
	color: var(--bs-secondary-color);
}

.hw-sub {
	margin: .1rem 0 0;
	font-size: .875rem;
}

.hw-link {
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
}

.hw-icon {
	display: inline-flex;
	flex-shrink: 0;
}
.hw-icon svg { width: 100%; height: 100%; }
.hw-icon-12 { width: 12px; height: 12px; }
.hw-icon-16 { width: 16px; height: 16px; }
.hw-icon-20 { width: 20px; height: 20px; }
.hw-icon-wx { width: 36px; height: 36px; color: var(--bs-body-color); }

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

.hw-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .9rem;
	padding: 1.1rem 1.4rem;
	border-bottom: 1px solid var(--bs-border-color-translucent);
}

.hw-badge {
	width: 2.75rem;
	height: 2.75rem;
	flex-shrink: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hw-accent, #0e7c86);
	color: var(--hw-on-accent, #fff);
}
.hw-badge svg { width: 24px; height: 24px; }

.hw-head-text {
	flex: 1 1 10rem;
	min-width: 0;
}

.hw-picker {
	flex-shrink: 0;
	max-width: 14rem;
}

/* ---------- Warning banner (Met Office colours are set inline) ---------- */

.hw-warning {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .7rem 1.4rem;
	font-size: .875rem;
}
.hw-warning-text { flex-grow: 1; }
.hw-warning a { font-weight: 600; white-space: nowrap; }

/* ---------- 10-day strip: 7 days fill the width, scroll for the rest ---------- */

.hw-strip {
	display: flex;
	gap: .375rem;
	padding: .75rem .75rem .5rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-padding-left: .75rem;   /* snap to the padding, not the bare edge */
	scrollbar-width: thin;
}
.hw-strip > .hw-day {
	flex: 0 0 calc((100% - 6 * .375rem) / 7);
	scroll-snap-align: start;
}

/* Days 8–10: less certain, so faded, with a marker before them */
.hw-day.is-long-range { opacity: .6; }
.hw-day.is-long-range:hover,
.hw-day.is-long-range:focus-visible { opacity: 1; }

.hw-long-range-mark {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 .15rem;
	border-left: 1px dashed var(--bs-border-color);
	color: var(--bs-secondary-color);
	font-size: .625rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.hw-long-range-mark span {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}
.hw-long-range-tag { font-weight: 600; }

.hw-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .6rem;
	padding: .85rem .5rem .75rem;
	border-radius: .75rem;
	text-align: center;
	min-width: 0;
}

.hw-day.is-today {
	background: var(--bs-tertiary-bg);
	box-shadow: inset 0 0 0 2px var(--hw-accent, #0e7c86);
}

.hw-day.no-data { opacity: .55; }

.hw-day-name {
	font-size: .8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.hw-day-date {
	margin-top: -.4rem;
	font-size: .75rem;
	color: var(--bs-secondary-color);
}

.hw-day-warn-slot {
	height: 1.35rem;
	display: flex;
	align-items: center;
}

.hw-day-warn {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	max-width: 100%;
	padding: .1rem .5rem;
	border-radius: 999px;
	font-size: .6875rem;
	font-weight: 700;
	overflow: hidden;
}
.hw-day-warn-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hw-temp strong { font-size: 1.375rem; }
.hw-temp span { font-size: .9375rem; color: var(--bs-secondary-color); }

.hw-wind {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .1rem;
}
.hw-wind-main {
	display: flex;
	align-items: center;
	gap: .25rem;
	font-size: .875rem;
	font-weight: 600;
}
.hw-unit {
	margin-left: .15rem;
	font-weight: 400;
	color: var(--bs-secondary-color);
}

.hw-tide-times { white-space: nowrap; }

.hw-wind-sub {
	font-size: .75rem;
	color: var(--bs-secondary-color);
}

.hw-surf {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .25rem;
}
.hw-surf strong { font-size: 1rem; }
.hw-surf-bar {
	width: 100%;
	height: 6px;
	border-radius: 3px;
	background: var(--bs-secondary-bg);
}
.hw-surf-segs {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3px;
}
.hw-surf-seg {
	height: 6px;
	border-radius: 3px;
	background: var(--bs-secondary-bg);
}

.hw-surf-label {
	font-size: .75rem;
	font-weight: 700;
}

.hw-tide {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .05rem;
	padding-top: .5rem;
	border-top: 1px solid var(--bs-border-color-translucent);
	font-size: .8125rem;
	font-weight: 600;
}
.hw-tide-label {
	font-size: .6875rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bs-secondary-color);
}

/* Surf bands: colour for the bar, a darker shade for text so it reads */
.hw-band-flat    { background: #aab2bb; }
.hw-band-junk    { background: #a61e2e; }
.hw-band-poor    { background: #e8743b; }
.hw-band-fair    { background: #e9b949; }
.hw-band-good    { background: #7cc576; }  /* lighter green */
.hw-band-pumping { background: #1f7a44; }  /* "Excellent": darker green */
.hw-text-flat    { color: #4b5560; }
.hw-text-junk    { color: #8a1a26; }
.hw-text-poor    { color: #a3420f; }
.hw-text-fair    { color: #7a5a00; }
.hw-text-good    { color: #2e7d32; }
.hw-text-pumping { color: #145c32; }

.hw-legend {
	margin: 0;
	padding: .25rem 1.4rem .9rem;
	color: var(--bs-secondary-color);
}

/* ---------- Events ---------- */

.hw-events-head {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	padding: 1.1rem 1.4rem .6rem;
}
.hw-events-head .hw-link { margin-left: auto; }
.hw-events-head .hw-muted { font-size: .8125rem; }

.hw-events {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 0 1rem 1rem;
}

.hw-empty {
	margin: 0;
	padding: 1rem .5rem 1.25rem;
	text-align: center;
	color: var(--bs-secondary-color);
}

.hw-event {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: .85rem 1rem;
	border: 1px solid var(--bs-border-color-translucent);
	border-radius: .875rem;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .15s ease;
}
@media (hover: hover) {
	.hw-event:hover { color: inherit; box-shadow: 0 .3rem .8rem rgba(0, 0, 0, .08); }
}
.hw-event:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* Red bar: still waiting on a reply (same signal as the calendar list) */
.hw-event-needs::before,
.hw-event.has-going::before {
	content: "";
	position: absolute;
	top: .6rem;
	bottom: .6rem;
	left: 0;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--bs-danger);
}

/* Someone in the family is going: green bar, even if others still need to RSVP */
.hw-event.has-going::before { background: var(--bs-success); }

.hw-event-going,
.hw-event.has-going {
	background: rgba(var(--bs-success-rgb), .07);
	border-color: rgba(var(--bs-success-rgb), .25);
}

.hw-event-declined { opacity: .7; }

.hw-date {
	width: 3.5rem;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
}
.hw-date-mon {
	font-size: .75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bs-secondary-color);
}
.hw-date-day {
	margin-top: .2rem;
	font-size: 1.875rem;
	font-weight: 800;
	letter-spacing: -.03em;
	color: var(--bs-emphasis-color);
}

.hw-event-body {
	flex-grow: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: .2rem;
}

.hw-event-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .6rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--bs-emphasis-color);
}

.hw-event-when {
	font-size: .875rem;
	font-weight: 600;
}
.hw-event-when .hw-muted { font-weight: 400; }

.hw-pill {
	padding: .1rem .6rem;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 700;
	white-space: nowrap;
}
.hw-pill-needs    { background: #212529; color: #fff; } 
.hw-pill-going    { background: var(--bs-success); color: #fff; }
.hw-pill-declined { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.hw-pill-not_open { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

.hw-cond {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .2rem .9rem;
	font-size: .8125rem;
	color: var(--bs-secondary-color);
}
.hw-cond-surf { display: inline-flex; align-items: center; gap: .35rem; }
.hw-dot { width: 10px; height: 10px; border-radius: 50%; }
.hw-cond-warn {
	padding: .05rem .5rem;
	border-radius: 999px;
	font-size: .6875rem;
	font-weight: 700;
}

.hw-people {
	display: flex;
	gap: .75rem;
	flex-shrink: 0;
}

.hw-person {
	width: 3rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .25rem;
}

.hw-avatar {
	position: relative;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bs-tertiary-bg);
	font-size: .875rem;
	font-weight: 700;
	color: var(--bs-emphasis-color);
	box-shadow: 0 0 0 2px var(--bs-border-color);
}
.hw-person-going .hw-avatar   { background: var(--bs-success); color: #fff; box-shadow: 0 0 0 2px var(--bs-success); }
.hw-person-needs .hw-avatar   { box-shadow: 0 0 0 2px #212529; }
/* Faded without opacity, so the red cross badge stays full strength. */
.hw-person-declined .hw-avatar { color: var(--bs-tertiary-color); box-shadow: 0 0 0 2px var(--bs-border-color-translucent); }

.hw-person-name {
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: .75rem;
}

.hw-person-badge {
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--bs-body-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: .6875rem;
	font-weight: 800;
	line-height: 1;
}
.hw-person-badge svg { width: 10px; height: 10px; }
.hw-person-badge.is-going    { background: var(--bs-success); }
.hw-person-badge.is-declined { background: var(--bs-danger); }
.hw-person-badge.is-needs    { background: #212529; }

/* ---------- Loading placeholders (same pulse as the chat skeleton) ---------- */

.hw-skel {
	display: block;
	border-radius: .375rem;
	animation: chat-img-skeleton-pulse 1.6s ease-in-out infinite;
}
.hw-skel-round { border-radius: 50%; }
.hw-skeleton .hw-event { border-color: var(--bs-border-color-translucent); }
.hw-skeleton .hw-event-body { gap: .45rem; }

@media (prefers-reduced-motion: reduce) {
	.hw-skel { animation: none; background: rgba(0, 0, 0, .08); }
	.hw-event { transition: none; }
}

/* ---------- Phones: the strip scrolls sideways, people drop below ---------- */

@media (max-width: 767.98px) {
	.hw-strip > .hw-day { flex: 0 0 9.5rem; }
	.hw-day { scroll-snap-align: start; padding: .65rem .4rem; gap: .5rem; }
	.hw-picker { max-width: none; width: 100%; }
	.hw-warning { padding: .7rem 1rem; align-items: flex-start; flex-wrap: wrap; }

	.hw-strip {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding: .6rem .5rem .75rem;
	}
	.hw-day { flex: 0 0 9.5rem; scroll-snap-align: start; padding: .65rem .4rem; gap: .5rem; }
	.hw-icon-wx { width: 30px; height: 30px; }
	.hw-temp strong { font-size: 1.125rem; }
	.hw-temp span, .hw-wind-sub, .hw-day-warn-text { display: none; }

	.hw-events-head { padding: 1rem 1rem .5rem; }
	.hw-events { padding: 0 .6rem .75rem; }
	.hw-event { flex-wrap: wrap; align-items: flex-start; gap: .75rem; padding: .75rem; }
	.hw-date { width: 2.75rem; }
	.hw-date-day { font-size: 1.6rem; }
	.hw-event-body { flex: 1 1 calc(100% - 3.5rem); }
	.hw-people { width: 100%; padding-left: 3.5rem; gap: .5rem; }
}

/* ---------- Day buttons + 3-hourly pop-up ---------- */

button.hw-day {
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: background-color .15s ease;
}
@media (hover: hover) {
	button.hw-day:hover { background: var(--bs-tertiary-bg); }
}
button.hw-day:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

.hw-modal .modal-header { gap: .5rem; }
.hw-modal-heading { flex-grow: 1; min-width: 0; text-align: center; }
.hw-modal .modal-title { font-size: 1.125rem; font-weight: 700; }
.hw-modal .hw-sub { margin: 0; }

.hw-nav-btn {
	width: 2.75rem;
	height: 2.75rem;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	border: 1px solid var(--bs-border-color);
	border-radius: 50%;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
}
.hw-nav-btn:disabled { opacity: .35; }
.hw-modal .btn-close { margin: 0 0 0 .25rem; }

.hw-modal-warning {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin-bottom: 1rem;
	padding: .6rem .9rem;
	border-radius: .6rem;
	font-size: .875rem;
}

.hw-facts {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1rem;
}
.hw-fact {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .3rem .7rem;
	border-radius: 999px;
	background: var(--bs-tertiary-bg);
	font-size: .8125rem;
	font-weight: 600;
}
.hw-fact .hw-muted { font-weight: 400; }

.hw-slots { display: flex; flex-direction: column; }

.hw-slot {
	display: grid;
	/* time | icon | temp | wind | gusts | surf | rain */
	grid-template-columns: 4rem 2rem 3rem minmax(0, 1.3fr) 3rem minmax(0, 1.6fr) 3.5rem;
	align-items: center;
	gap: .6rem;
	padding: .55rem .5rem;
	border-bottom: 1px solid var(--bs-border-color-translucent);
	font-size: .875rem;
}
.hw-slots.no-surf .hw-slot { grid-template-columns: 4rem 2rem 3rem minmax(0, 1.3fr) 3rem 3.5rem; }

.hw-slot-head {
	padding-top: 0;
	font-size: .6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bs-secondary-color);
}

.hw-slot.is-night { background: rgba(var(--bs-secondary-rgb), .06); }
.hw-slot.is-now { box-shadow: inset 3px 0 0 var(--hw-accent, #0e7c86); }

.hw-slot-time { font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; }
.hw-now-pill {
	align-self: flex-start;
	margin-top: .15rem;
	padding: 0 .4rem;
	border-radius: 999px;
	background: var(--hw-accent, #0e7c86);
	color: var(--hw-on-accent, #fff);
	font-size: .625rem;
	text-transform: uppercase;
}
.hw-icon-wx-sm { width: 26px; height: 26px; color: var(--bs-body-color); }
.hw-slot-temp { font-size: 1rem; font-weight: 700; }
.hw-slot-wind, .hw-slot-surf { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; min-width: 0; }
.hw-slot-surf strong { margin-right: .1rem; }
.hw-slot-period { width: 100%; font-size: .75rem; }
.hw-slot-gust { font-weight: 600; }
.hw-picker-empty { max-width: 16rem; font-size: .8125rem; }

@media (max-width: 575.98px) {
	/* time | icon | temp | wind | gusts | surf  (rain dropped) */
	.hw-slot { grid-template-columns: 3.25rem 1.75rem 2.25rem minmax(0, 1fr) 2.75rem minmax(0, 1.2fr); gap: .4rem; font-size: .8125rem; }
	.hw-slots.no-surf .hw-slot { grid-template-columns: 3.25rem 1.75rem 2.25rem minmax(0, 1fr) 2.75rem; }
	.hw-col-rain, .hw-slot-unit { display: none; }

	/* Surf is the last column here: line it up on the right edge */
	.hw-slot-surf { justify-content: flex-end; text-align: right; }
	.hw-slots:not(.no-surf) .hw-slot-head > span:nth-last-child(2) { text-align: right; }
	.hw-slot-head { letter-spacing: .02em; }
}


/* ---------- Day slides in PhotoSwipe (home-widget.js) ---------- */

/* The slide fills the viewport; the card sits in the middle of it.
   Sized to the viewport, not 100%: PhotoSwipe's slide wrapper has no
   height for HTML slides, so 100% let the card grow past the screen and
   get clipped instead of scrolling. */
.hw-pswp-slide {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3.75rem 4.5rem; /* clear PhotoSwipe's top bar and side arrows */
}

.hw-pswp-card {
	width: 100%;
	max-width: 46rem;
	max-height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* PhotoSwipe turns touch scrolling off; allow up/down drags here so the
	   card scrolls, while sideways swipes still change day. */
	touch-action: pan-y;
	box-sizing: border-box;
	padding: 1.25rem 1.4rem 1rem;
	border-radius: 1rem;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, .35);
	cursor: default;
	user-select: text;
}

.hw-pswp-head {
	margin-bottom: 1rem;
	text-align: center;
}

.hw-pswp-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--bs-emphasis-color);
}

.hw-pswp-head .hw-sub { margin: .1rem 0 0; }
.hw-pswp-card .hw-facts { justify-content: center; }

/* Phones: no side arrows (you swipe), so the card can use the width. */
@media (max-width: 575.98px) {
	.hw-pswp-slide { padding: 3.5rem .5rem 1rem; align-items: flex-start; }
	.hw-pswp-card { padding: 1rem .75rem .75rem; border-radius: .875rem; }
	.hw-pswp .pswp__button--arrow { display: none; }
}


/* =====================================================================
   Notification settings — users/notification-settings.php
   One row per group with a switch per kind of message, and a top row
   that sets a whole column. Reuses the groups-list pieces: .gl-avatar
   (the group colour ring, from --gl-colour / --gl-on-colour on the row),
   .gl-icon-btn + .gl-fav-btn (star), .gl-search, .gl-empty.
   --ns-cols (set on #ns-groups) is how many switch columns the club has.
   ===================================================================== */

.ns-section { background: var(--bs-secondary-bg); }
.ns-wrap { max-width: 54rem; margin: 0 auto; }
.ns-intro { color: var(--bs-secondary-color); max-width: 38rem; }

.ns-card {
	background: var(--bs-body-bg);
	border-radius: 1rem;
	box-shadow: 0 .25rem 1.25rem rgba(0, 0, 0, .06);
	overflow: hidden;
}

/* This-device push card: one compact row */
.ns-push { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.ns-push-icon {
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 1.15rem;
	background: rgba(var(--bs-warning-rgb), .18);
	color: var(--bs-warning-text-emphasis);
}
.ns-push-text { flex: 1 1 auto; min-width: 0; }
.ns-push-action { flex: none; text-align: right; margin: 0 !important; }

/* Name column + one column per switch */
.ns-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) repeat(var(--ns-cols, 4), 5.75rem);
	align-items: center;
	column-gap: .25rem;
}

.ns-head {
	padding: .85rem 1.25rem .6rem;
	font-size: .72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bs-secondary-color);
}
.ns-head > span { text-align: center; line-height: 1.2; }
.ns-head i { display: block; font-size: 1.05rem; margin-bottom: .3rem; }

.ns-row { padding: .8rem 1.25rem; border-top: 1px solid var(--bs-border-color-translucent); }
.ns-master {
	/* Darker than the group rows, with a firmer line under it, so the
	   "all groups" switches read as separate from any one group.
	   Built from the text colour, so it darkens in light mode and
	   lightens in dark mode. */
	background: rgba(var(--bs-emphasis-color-rgb), .07);
	border-bottom: 2px solid var(--bs-border-color);
}
.ns-master + .ns-search,
.ns-master + #ns-list > .ns-row:first-child { border-top: 0; }

.ns-group { display: flex; align-items: center; gap: .75rem; min-width: 0; }

/* The groups-list avatar, a size down for this denser list */
.ns-group .gl-avatar {
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	font-size: .95rem;
	text-decoration: none;
}
.ns-group .ns-avatar-all {
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	outline-color: var(--bs-border-color);
}

.ns-name { flex: 1 1 auto; min-width: 0; }
.ns-name a,
.ns-name strong {
	display: block;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ns-name a:hover { text-decoration: underline; }
.ns-meta {
	display: block;
	font-size: .75rem;
	color: var(--bs-secondary-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ns-group .gl-icon-btn { flex: none; }
.ns-group .gl-icon-btn:disabled { opacity: .5; }
.ns-leave:hover,
.ns-leave:focus-visible { color: var(--bs-danger); }

/* Switch cells: in the grid on wide screens, their own row on phones */
.ns-switches { display: contents; }
.ns-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .3rem;
	margin: 0;
	min-height: 2rem;
}
.ns-cell.form-switch { padding-left: 0; }
.ns-cell .form-check-input { float: none; margin: 0; width: 2.6em; height: 1.4em; cursor: pointer; }
.ns-cell .form-check-input:disabled { cursor: progress; }
.ns-cell-label { display: none; }
.ns-count { font-size: .7rem; line-height: 1; color: var(--bs-secondary-color); }
.ns-na { color: var(--bs-tertiary-color); }

/* Mixed (some groups on, some off): knob in the middle, half-strength colour */
.ns-cell.form-switch .form-check-input:indeterminate {
	background-color: rgba(var(--bs-primary-rgb), .45);
	border-color: rgba(var(--bs-primary-rgb), .45);
	background-position: center;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.ns-search { padding: .75rem 1.25rem; border-top: 1px solid var(--bs-border-color-translucent); }

.ns-row.ns-leaving { opacity: .4; pointer-events: none; transition: opacity .2s; }

/* Phones: each group's switches on their own line, with labels */
@media (max-width: 639.98px) {
	.ns-head { display: none; }
	.ns-grid { grid-template-columns: minmax(0, 1fr); }
	.ns-row { padding: .85rem 1rem; }
	.ns-switches {
		display: grid;
		grid-template-columns: repeat(var(--ns-cols, 4), minmax(0, 1fr));
		gap: .5rem;
		margin-top: .7rem;
	}
	.ns-cell-label { display: block; font-size: .68rem; line-height: 1.15; text-align: center; color: var(--bs-secondary-color); }
	.ns-search { padding: .75rem 1rem; }
	.ns-push { flex-wrap: wrap; padding: 1rem; }
	.ns-push-text { flex: 1 1 0; }
	.ns-push-action { flex-basis: 100%; text-align: left; padding-left: 3.75rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ns-row.ns-leaving { transition: none; }
}

/* =====================================================================
   Push off on this device — main-menu bell and notifications panel.
   push-status.js swaps the menu bell to fa-bell-slash and puts
   .push-off on <html>; these show the note in the panel only then.
   ===================================================================== */

.push-off-only { display: none; }
html.push-off .push-off-only { display: block; }

.push-off-note {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .75rem 1rem;
	border-radius: .75rem;
	background: rgba(0, 0, 0, .22);
	border: 1px solid rgba(var(--bs-warning-rgb), .6);
	color: inherit;
	text-decoration: none;
	line-height: 1.3;
}
.push-off-note:hover,
.push-off-note:focus-visible { background: rgba(0, 0, 0, .32); color: inherit; }
.push-off-note > i { flex: none; font-size: 1.35rem; color: var(--bs-warning); }
.push-off-note small { opacity: .8; }

/* =====================================================================
   Notification stacks — the notifications panel (notification-client.js)
   Several notifications about the same thing pile up: real cards on top
   of each other, the next two peeking out underneath. Tap the pile and
   they slide apart into a list. layoutStack() measures the cards and
   sets each one's position (transform) and height inline; these rules
   only say how they animate.
   ===================================================================== */

.nt-stack-wrap { position: relative; }

.nt-stack-cards {
	position: relative;
	transition: height .35s cubic-bezier(.2, .8, .2, 1);
}

.nt-stack-cards > .nt-card {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	margin: 0;
	overflow: hidden;
	transform-origin: bottom center; /* shrink towards the edge that peeks out */
	transition:
		transform .35s cubic-bezier(.2, .8, .2, 1),
		height .35s cubic-bezier(.2, .8, .2, 1),
		opacity .25s ease,
		filter .25s ease;
}

/* Closed: the cards behind are dimmed, so the front one reads as on top */
.nt-stack-wrap:not(.nt-expanded) .nt-stack-cards > .nt-card:not(:first-child) {
	filter: brightness(.82);
	box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25);
}
.nt-stack-wrap:not(.nt-expanded) .nt-stack-cards > .nt-card:first-child {
	box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .3);
}

/* Closed: the whole pile opens it. The front card's × stays usable. */
.nt-stack-open {
	position: absolute;
	inset: 0;
	z-index: 100;
	width: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	border-radius: var(--bs-card-border-radius, .375rem);
}
.nt-stack-open:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
/* The front card sits above that button but lets taps through to it,
   except on its × (each card's transform gives it its own layer, so a
   z-index on the × alone wouldn't lift it above the button). */
.nt-stack-wrap:not(.nt-expanded) .nt-stack-cards > .nt-card:first-child { z-index: 102 !important; pointer-events: none; }
.nt-stack-wrap:not(.nt-expanded) .nt-stack-cards > .nt-card:first-child .nt-card-close { pointer-events: auto; }
.nt-expanded .nt-stack-open { display: none; }

/* Open: "3 notifications · Show less · Clear all" slides in above */
.nt-stack-bar {
	display: flex;
	align-items: center;
	gap: .5rem;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height .3s ease, opacity .2s ease, margin .3s ease;
}
.nt-expanded .nt-stack-bar { max-height: 3rem; opacity: 1; margin-bottom: .6rem; }

.nt-stack-count { flex: 1 1 auto; font-weight: 600; font-size: .85rem; opacity: .85; }

.nt-stack-less,
.nt-stack-clear {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .3rem .75rem;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .25);
	color: inherit;
	font-size: .78rem;
	font-weight: 700;
	white-space: nowrap;
}
.nt-stack-less i { font-size: .65rem; }
.nt-stack-less:hover, .nt-stack-less:focus-visible,
.nt-stack-clear:hover, .nt-stack-clear:focus-visible { background: rgba(0, 0, 0, .4); }

.nt-card-title { min-width: 0; }

/* "+ 1,480 older" under an open pile (only the newest 20 are drawn) */
.nt-stack-more {
	display: none;
	margin-top: .6rem;
	font-size: .8rem;
	opacity: .8;
	text-align: center;
}
.nt-expanded .nt-stack-more { display: block; }

/* "+ 12 more like this" on a card whose stack wasn't fully loaded */
.nt-more-note { margin-top: .5rem; font-size: .8rem; opacity: .75; }

/* First draw, and anyone who'd rather not have motion: no sliding */
.nt-no-anim .nt-stack-cards,
.nt-no-anim .nt-stack-cards > .nt-card,
.nt-no-anim .nt-stack-bar { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
	.nt-stack-cards,
	.nt-stack-cards > .nt-card,
	.nt-stack-bar { transition: none !important; }
}

/* =====================================================================
   Swipe (modules/Utils/swipe.js) — anything that can be swiped sideways.
   pan-y: up-and-down drags still scroll; only sideways ones swipe.
   ===================================================================== */

.swipe-x { touch-action: pan-y; }
.swipe-x.is-swiping {
	user-select: none;
	-webkit-user-select: none;
	cursor: grabbing;
	will-change: translate;
}

/* List view: no month name in the toolbar (the list has its own month headings) - the
   Events | Timetable switch takes its place */
.cal-label-off #calendar-label { display: none !important; }

/* Month view on phones: today's date (when it has events) in a grey tile, like the active view button */
.mobile-day-header.is-today .mobile-day-date {
	background: var(--bs-secondary);
	color: #fff !important;
	border-radius: .6rem;
	padding: .35rem .45rem .3rem;
	margin-left: .55rem !important;   /* ms-3 less the padding, so the text stays in line with the other days */
	margin-top: .15rem !important;    /* mt-2 less the padding */
	text-align: center;
	box-shadow: 0 .15rem .4rem rgba(var(--bs-secondary-rgb, 108, 117, 125), .3);
}

/* Phones: the way the phone is held picks the view (upright the list, sideways the planner -
   event-calendar.js), so no Planner / List buttons */
.cal-phone #pills-tab { display: none !important; }

/* ═════════ Calendar search, in the calendar's toolbar (planner and list alike) ═════════
   Wide screens: a search box before the arrows. Narrower: a search button the same size as
   the arrows, which opens the box across the whole toolbar row (its x closes it again).
   The matches show in their own panel in place of the calendar. */
.cal-toolbar-row { position: relative; }
.cal-search { display: inline-flex; vertical-align: middle; }
.cal-search-box { position: relative; display: none; align-items: center; }
.cal-search-box .form-control { height: 2.5rem; padding-left: 2.3rem; padding-right: 2.2rem; }
.cal-search-icon { position: absolute; left: .9rem; color: var(--bs-secondary-color); font-size: .9rem; pointer-events: none; }
.cal-search-clear {
	position: absolute; right: .35rem; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%;
	background: none; color: var(--bs-secondary-color); display: none; align-items: center; justify-content: center;
}
.cal-search-clear:hover { background: rgba(0,0,0,.06); color: var(--bs-emphasis-color); }
.cal-search.has-text .cal-search-clear { display: inline-flex; }
/* Opened across the toolbar row */
.cal-search-open .cal-search-box {
	display: flex; position: absolute; inset: 0 calc(var(--bs-gutter-x, 1.5rem) * .5); z-index: 6;
	background: var(--bs-tertiary-bg, #f8f9fa);
}
.cal-search-open .cal-search-box .form-control { width: 100%; }
.cal-search-open .cal-search-clear { display: inline-flex; }   /* closes it, even when empty */
@media (min-width: 1200px) {
	.cal-search-box { display: flex; }
	.cal-search-box .form-control { width: 14rem; }
	.cal-search .cal-search-toggle { display: none !important; }
}
/* The matches */
.cal-search-results { --list-toolbar-h: 0px; }

/* The calendar toolbar's buttons, rounded: the arrows and Today as one pill, the search button
   a circle (like the + button). In the list the arrows go (it scrolls through the months
   itself), leaving Today as a pill of its own. */
.cal-toolbar-row .btn-group > .btn:first-child { border-top-left-radius: 2rem; border-bottom-left-radius: 2rem; padding-left: .9rem; }
.cal-toolbar-row .btn-group > .btn:last-child { border-top-right-radius: 2rem; border-bottom-right-radius: 2rem; padding-right: .9rem; }
.cal-search-toggle { border-radius: 50%; width: 2.5rem; padding-left: 0; padding-right: 0; }
.cal-view-list #prev-btn,
.cal-view-list #next-btn { display: none !important; }
.cal-view-list #today-btn { border-radius: 2rem !important; }
/* Today the same size everywhere - in the planner's pill or on its own in the list */
#today-btn { width: 4rem; padding-left: 0; padding-right: 0; }
/* All the toolbar's buttons the height of the + button (2.5rem) */
.cal-toolbar-row #prev-btn, .cal-toolbar-row #today-btn, .cal-toolbar-row #next-btn, .cal-search-toggle, .cal-filter-btn {
	height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0;
}

/* The toolbar's right-hand buttons evenly spaced (Today / arrows, search, +) */
.cal-toolbar-row > .text-end { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.cal-toolbar-row > .text-end > * { margin: 0 !important; }

/* ═════════ Calendar filters: the Filter button (after the search) and its panel ═════════ */
.cal-filter { display: inline-flex; }
.cal-filter-btn { position: relative; border-radius: 50%; width: 2.5rem; padding-left: 0; padding-right: 0; }
.cal-filter-dot { position: absolute; top: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; background: var(--bs-success); border: 2px solid var(--bs-tertiary-bg, #f8f9fa); display: none; }
.cal-filter-btn.is-on .cal-filter-dot { display: block; }
.cal-filter-panel {
	position: absolute; top: calc(100% - .35rem); right: calc(var(--bs-gutter-x, 1.5rem) * .5); z-index: 30;
	width: min(24rem, calc(100vw - 1.5rem)); text-align: left;
	background: var(--bs-body-bg, #fff); border: 1px solid #e3e7ee; border-radius: 1rem;
	box-shadow: 0 .75rem 2rem rgba(0,0,0,.14); padding: .9rem 1rem .6rem;
}
.cal-filter-section + .cal-filter-section { margin-top: .9rem; }
.cal-filter-section h3 { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); margin: 0 0 .45rem; }
.cal-filter-help { margin: .35rem 0 0; font-size: .74rem; color: var(--bs-secondary-color); }
.cal-filter-mine button { flex: 1; }
.cal-filter-mine { display: flex; }
/* Clubs: round logos, one at a time */
.cal-filter-orgs { display: flex; flex-wrap: wrap; gap: .5rem .35rem; }
.cal-filter-org {
	display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 4.1rem;
	border: 0; background: none; padding: .15rem 0; color: var(--bs-body-color);
}
.cal-filter-avatar { width: 2.75rem; height: 2.75rem; object-fit: contain; padding: 3px; font-size: .7rem; font-weight: 800; transition: opacity .15s, box-shadow .15s; }
.cal-filter-org.active .cal-filter-avatar { box-shadow: 0 0 0 2px var(--bs-body-bg, #fff), 0 0 0 4px var(--bs-primary); }
.cal-filter-section.has-choice .cal-filter-org:not(.active) .cal-filter-avatar { opacity: .4; }
.cal-filter-org-name {
	font-size: .66rem; font-weight: 600; line-height: 1.15; text-align: center; max-width: 100%;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cal-filter-org.active .cal-filter-org-name { font-weight: 800; }
/* Event types: chips, any number */
.cal-filter-types { display: flex; flex-wrap: wrap; gap: .35rem; }
.cal-filter-type {
	display: inline-flex; align-items: center; gap: .35rem;
	border: 1px solid #dfe3e9; border-radius: 2rem; background: var(--bs-body-bg, #fff);
	padding: .3rem .7rem; font-size: .8rem; font-weight: 700; color: #495057;
}
.cal-filter-type i { font-size: .8em; opacity: .7; }
.cal-filter-type-img { width: 1rem; height: 1rem; object-fit: contain; }
.cal-filter-type.active { background: #212529; border-color: #212529; color: #fff; }
.cal-filter-type.active i { opacity: 1; }
.cal-filter-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; padding-top: .6rem; border-top: 1px solid #eef0f3; }

/* Phones: the toolbar's buttons a touch smaller (2.25rem), so the Events | Timetable switch,
   Today, search, filter and + share one row */
@media (max-width: 575.98px) {
	.cal-toolbar-row #prev-btn, .cal-toolbar-row #today-btn, .cal-toolbar-row #next-btn,
	.cal-search-toggle, .cal-filter-btn, .cal-toolbar-row .lib-circle-btn { height: 2.25rem; }
	.cal-search-toggle, .cal-filter-btn, .cal-toolbar-row .lib-circle-btn { width: 2.25rem; }
	.cal-toolbar-row > .text-end { gap: .35rem; }
	.cal-toolbar-row { --bs-gutter-x: .5rem; }
	.cal-mode-holder .list-mode-switch button { padding: .28rem .5rem !important; font-size: .76rem !important; }
	.cal-mode-holder .list-mode-switch button i { display: none; }
}

/* ═════════ The calendar toolbar's layout ═════════
   Planner / List as round buttons on the left; the month name (planner) or the Events | Timetable
   switch (list) in the middle; Today, search, filter and + on the right. Phones have no
   Planner / List buttons (the way the phone is held picks the view), so there the middle
   moves to the left. */
.cal-toolbar-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cal-toolbar-row > * { width: auto; max-width: none; margin: 0 !important; grid-row: 1; min-width: 0; }
.cal-toolbar-row > div:has(> #pills-tab) { grid-column: 1; display: flex; justify-content: flex-start; }
.cal-toolbar-row > div:has(#calendar-label) { grid-column: 2; display: flex; align-items: center; justify-content: center; }
.cal-toolbar-row > .text-end { grid-column: 3; }
.cal-toolbar-row #calendar-label { white-space: nowrap; }
.cal-phone .cal-toolbar-row { grid-template-columns: auto 1fr; }
.cal-phone .cal-toolbar-row > div:has(#calendar-label) { grid-column: 1; justify-content: flex-start; }
.cal-phone .cal-toolbar-row > .text-end { grid-column: 2; }
.cal-toolbar-row .cal-mode-holder { margin: 0; }

/* Planner / List: round icon buttons, like search, filter and + */
.cal-toolbar-row #pills-tab { flex-wrap: nowrap; gap: .5rem; }
.cal-toolbar-row #pills-tab.nav-pills .nav-link {
	width: 2.5rem; height: 2.5rem; padding: 0 !important; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 0; background: transparent; border: 1px solid var(--bs-secondary); color: var(--bs-secondary) !important;
}
.cal-toolbar-row #pills-tab.nav-pills .nav-link i { font-size: 1rem; margin: 0 !important; }
.cal-toolbar-row #pills-tab.nav-pills .nav-link:hover { background: var(--bs-secondary); color: #fff !important; }
.cal-toolbar-row #pills-tab.nav-pills .nav-link.active { background: var(--bs-secondary); color: #fff !important; }

/* Narrower screens: a smaller month name, so it fits between the buttons */
@media (max-width: 767.98px) {
	.cal-toolbar-row #calendar-label { font-size: 1.15rem !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   ATTENDANCE REPORT  (.ar-report)
   Drawn by /modules/Reports/attendance-report.js into any container, e.g.
   the member Attendance Report modal. Builds on the Club Dashboard (.cd-*)
   and group list (.gl-avatar) styles; only the extras are here.
   Report rules are scoped to .ar-report; the modal shell's to
   #attendanceReportModal.
   ═══════════════════════════════════════════════════════════════════ */
/* Category colours (validated categorical slots 1-6). Single-series marks
   use the dashboard blue. */
.ar-report {
	--ar-blue: #2B80FF;
	--ar-s1: #2a78d6;  /* signed in */
	--ar-s2: #eb6834;  /* no sign-in taken */
	--ar-s3: #1baf7a;  /* not signed in */
	--ar-s4: #eda100;  /* declined */
	--ar-s5: #e87ba4;  /* withdrawn */
	--ar-s6: #008300;  /* other */
}

#attendanceReportModal .modal-content { border: 0; border-radius: 22px; overflow: hidden; background: var(--cd-soft, #f6f7f9); }
/* The report is drawn into a .cd-wrap for the dashboard variables. .cd-wrap
   centres itself with auto side margins and a max width; in a flex parent such
   as a modal that sizes it to its content (the table) instead of its parent,
   pushing it off the screen on phones. Fill the container instead. */
.ar-report.cd-wrap { max-width: none; min-width: 0; margin-left: 0; margin-right: 0; }

/* ── Modal shell (member-attendance-report-modal.php) ── */
#attendanceReportModal .modal-body { padding: 16px; background: #f6f7f9; }
#attendanceReportModal .modal-footer { background: #f6f7f9; border-top: 1px solid #eef0f3; }

/* Hero: light version of the dashboard header — white card, soft colour glows */
.ar-report .ar-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px 20px; color: #1d2433;
							  background:
								  radial-gradient(560px 240px at 95% -20%, rgba(43, 128, 255, .12), transparent 70%),
								  radial-gradient(420px 220px at 55% 140%, rgba(31, 169, 113, .08), transparent 70%),
								  radial-gradient(380px 200px at 0% 0%, rgba(232, 75, 60, .06), transparent 70%),
								  #fff;
							  box-shadow: var(--cd-shadow, 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06)); }
.ar-report .ar-hero .cd-eyebrow { color: #6b7280; opacity: 1; }
.ar-report .ar-hero .cd-subtitle { color: #6b7280; opacity: 1; }
.ar-report .ar-hero-unit { font-size: 1.4rem; font-weight: 700; color: #6b7280; margin-left: .35rem; letter-spacing: 0; }
.ar-report .ar-hero .cd-seg { width: auto; }
.ar-report .ar-hero .cd-seg-btn { flex: 0 0 auto; font-size: .8rem; }
.ar-report .ar-datebar { display: flex; align-items: center; gap: 6px; background: #f6f7f9; border-radius: 12px; padding: 4px 6px; }
.ar-report .ar-datebar select { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: #1d2433; font-weight: 600; padding: 5px 4px; cursor: pointer; }
.ar-report .ar-datebar select:focus { outline: 2px solid #2B80FF; border-radius: 8px; }
.ar-report .ar-hero .cd-hero-strip { border-top-color: #eef0f3; font-size: .92rem; min-height: 0; color: #1d2433; }
.ar-report .ar-hero .cd-dot { background: #cbd0d8; }
/* Tablets: use the width rather than Bootstrap's 500px */
@media (min-width: 768px) and (max-width: 991.98px) {
	#attendanceReportModal .modal-dialog.modal-xl { max-width: calc(100% - 2rem); }
}
/* Phones: full screen (modal-fullscreen-md-down), controls stacked full width */
@media (max-width: 767.98px) {
	#attendanceReportModal .modal-content { border-radius: 0; }
	#attendanceReportModal .modal-body { padding: 12px; }
	.ar-report .ar-hero { padding: 20px 18px 16px; border-radius: 18px; }
	.ar-report .ar-hero .cd-controls { width: 100%; align-items: stretch; }
	.ar-report .ar-hero .cd-controls .btn-close { position: absolute; top: 16px; right: 16px; }
	.ar-report .ar-hero .cd-seg { width: 100%; }
	.ar-report .ar-hero .cd-seg-btn { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; padding: 6px 4px; font-size: .75rem; }
	.ar-report .cd-hero-num { font-size: 3rem; }
}

/* Filter bar: rounded, soft, like the group search */
.ar-report .ar-filters .form-select,
.ar-report .ar-filters .form-control { border-radius: 999px; border-color: transparent; background-color: #fff;
											  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); height: 2.4rem; font-size: .9rem; }
.ar-report .ar-filters .form-control { padding-left: 2.3rem; }
.ar-report .ar-search { position: relative; }
.ar-report .ar-search > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; }
.ar-report .ar-filters .dropdown-menu { border: 0; border-radius: 14px; box-shadow: 0 6px 24px rgba(16, 24, 40, .14); padding: .5rem .75rem; }
.ar-report .ar-filters .form-check { padding-top: .2rem; padding-bottom: .2rem; }

/* Clickable hour bars (roles, groups): name and value, track underneath */
.ar-report .ar-hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 10px;
							  width: 100%; border: 0; background: none; text-align: left; color: inherit;
							  padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 10px;
							  transition: background .15s, opacity .15s; }
.ar-report .ar-hrow:hover { background: #f6f7f9; }
.ar-report .ar-hrow.is-on { background: #eef4ff; }
.ar-report .ar-hlist.has-on .ar-hrow:not(.is-on) { opacity: .5; }
.ar-report .ar-hrow.is-zero:not(.is-on) .ar-hrow-name,
.ar-report .ar-hrow.is-zero:not(.is-on) .ar-hrow-val { opacity: .55; }
.ar-report .ar-hrow-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: .92rem; }
.ar-report .ar-hrow-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-report .ar-hrow-val { font-size: .85rem; color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-report .ar-hrow-val strong { color: #1d2433; font-weight: 800; font-size: .95rem; }
.ar-report .ar-hrow .cd-hbar-track { grid-column: 1 / -1; margin-top: 7px; }
.ar-report .ar-hrow .cd-hbar-fill { background: var(--ar-blue); }

/* Response tiles: dashboard KPI cards you can press */
.ar-report .ar-kpi { width: 100%; height: 100%; border: 0; text-align: left; padding-bottom: 16px; cursor: pointer;
							 transition: transform .15s, box-shadow .15s, opacity .15s; }
.ar-report .ar-kpi:hover:not(:disabled) { transform: translateY(-2px); }
.ar-report .ar-kpi.is-on { box-shadow: 0 0 0 2px var(--cd-accent), var(--cd-shadow); }
.ar-report .ar-kpi:disabled { opacity: .45; cursor: default; }
.ar-report .ar-kpi .cd-kpi-value { font-size: 1.8rem; margin-top: 10px; }
.ar-report .ar-stack > span { cursor: pointer; }

/* Hours by month */
.ar-report .ar-cols       { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.ar-report .ar-col        { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; border-radius: 6px; }
.ar-report .ar-col > span { display: block; width: 100%; background: var(--ar-blue); border-radius: 6px 6px 3px 3px;
									transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.ar-report .ar-col:hover > span { filter: brightness(.88); }
.ar-report .ar-col-labels { display: flex; gap: 6px; font-size: .7rem; color: #6b7280; margin-top: 6px; }
.ar-report .ar-col-labels > span { flex: 1 1 0; text-align: center; overflow: hidden; white-space: nowrap; }

/* Group avatars: as .gl-avatar — image or initials on the group colour, ringed in the group colour */
.ar-report .ar-gav { --size: 26px; flex: 0 0 auto; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden;
							 display: inline-grid; place-items: center; vertical-align: middle;
							 background: var(--gl-colour); color: var(--gl-on-colour);
							 outline: 2px solid var(--gl-colour); outline-offset: 2px; margin: 3px;
							 font-size: calc(var(--size) * .4); font-weight: 700; letter-spacing: .02em; line-height: 1; }
.ar-report .ar-gav img { width: 100%; height: 100%; object-fit: cover; }
.ar-report .ar-gav.is-small { outline: 0; margin: 0; }
.ar-report .ar-gav-list { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.ar-report .ar-opt { display: flex; align-items: center; gap: 8px; }

/* List */
.ar-report .ar-table-card { padding: 0; }
.ar-report .ar-table-card .cd-table { margin: 0; }
.ar-report .ar-table-card .cd-table th:first-child,
.ar-report .ar-table-card .cd-table td:first-child { padding-left: 20px; }
.ar-report .ar-table-card .cd-table th:last-child,
.ar-report .ar-table-card .cd-table td:last-child { padding-right: 20px; }
.ar-report .cd-table thead th { padding-top: 14px; padding-bottom: 10px; background: #fff; position: sticky; top: 0; z-index: 1; }
.ar-report .ar-month-row td { background: #f6f7f9; color: #6b7280; font-size: .7rem; font-weight: 700;
									  letter-spacing: .09em; text-transform: uppercase; padding-top: 8px; padding-bottom: 8px; }
/* Withdrawn / cancelled / moved rows: faded, but the Cancelled/Moved badge stays clear */
.ar-report .ar-row-faded td:not(:nth-child(2)),
.ar-report .ar-row-faded td:nth-child(2) > :not(.cd-badge) { opacity: .45; }
.ar-report .ar-date { font-weight: 600; white-space: nowrap; }
.ar-report .ar-date small { display: block; color: #6b7280; font-weight: 400; }

/* Event name as a pill button with the event type icon */
.ar-report .ar-event { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px;
							   border: 1px solid #e3e6eb; background: #fff; color: #1d2433; font-weight: 600; font-size: .88rem;
							   text-decoration: none; transition: border-color .15s, box-shadow .15s; max-width: 100%; }
.ar-report a.ar-event:hover { border-color: #1d2433; box-shadow: 0 2px 8px rgba(16, 24, 40, .08); color: #1d2433; }
.ar-report .ar-event-icon { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
									color: var(--ar-blue); background: color-mix(in srgb, var(--ar-blue) 12%, transparent); font-size: .8rem; overflow: hidden; }
.ar-report .ar-event-icon img { width: 18px; height: 18px; object-fit: contain; }
.ar-report .ar-event > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ar-report .ar-signed { color: #12895b; font-weight: 700; }
.ar-report .ar-warn   { color: #c2410c; font-size: .8rem; font-weight: 600; }

.ar-report .ar-tip { position: fixed; z-index: 2000; pointer-events: none; background: #1d2433; color: #fff;
							 font-size: .78rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; display: none;
							 box-shadow: 0 6px 20px rgba(16, 24, 40, .2); }
/* Count + Refresh row, when the report isn't given a footer (e.g. on a page) */
.ar-report .ar-footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
	.ar-report .ar-col > span, .ar-report .ar-kpi { transition: none; }
}

/* ── Snapshot card (AttendanceSnapshot) ─────────────────────────────
   Drawn inside any card, e.g. the member profile's Attendance card. */
.ar-snap { --ar-blue: #2B80FF; }
.ar-snap-wait { color: #6b7280; font-size: .9rem; padding: 18px 0; }
.ar-snap-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ar-snap-hours { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.ar-snap-hours > span { font-size: clamp(2.4rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.04em; color: #1d2433; }
.ar-snap-hours > small { font-size: 1.05rem; font-weight: 700; color: #6b7280; }
.ar-snap-sub { margin-top: 6px; font-size: .9rem; color: #1d2433; }
.ar-snap-period { margin-top: 2px; font-size: .78rem; color: #6b7280; }
.ar-snap-ring.cd-ring { width: 92px; margin: 0; }
.ar-snap-ring .cd-ring-val { font-size: 1.2rem; }
.ar-snap-bars { display: flex; align-items: flex-end; gap: 5px; height: 64px; margin-top: 18px; }
.ar-snap-bars > span { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; border-radius: 5px; background: #f6f7f9; }
.ar-snap-bars > span > span { display: block; width: 100%; background: var(--ar-blue); border-radius: 5px 5px 3px 3px; }
.ar-snap-labels { display: flex; gap: 5px; margin-top: 5px; font-size: .66rem; color: #6b7280; }
.ar-snap-labels > span { flex: 1 1 0; text-align: center; }
.ar-snap-list { list-style: none; padding: 0; margin: 14px 0 0; }
.ar-snap-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef0f3; font-size: .88rem; }
.ar-snap-ico { flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: .85rem;
			   color: var(--cd-accent); background: color-mix(in srgb, var(--cd-accent) 13%, transparent); }
.ar-snap-what { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-snap-what a { color: #1d2433; font-weight: 600; text-decoration: none; }
.ar-snap-what a:hover { text-decoration: underline; }
.ar-snap-k { display: block; font-size: .7rem; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.ar-snap-when { flex: 0 0 auto; color: #6b7280; font-size: .8rem; text-align: right; }
.ar-snap-empty { color: #6b7280; font-size: .88rem; margin: 12px 0 0; }
.ar-snap-open { display: block; width: 100%; margin-top: 14px; border: 0; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: .88rem;
				background: color-mix(in srgb, #2B80FF 10%, #fff); color: #1a5fd0; transition: background .15s; }
.ar-snap-open:hover { background: color-mix(in srgb, #2B80FF 18%, #fff); }
.ar-snap-open:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }

/* ── Group attendance matrix (/modules/Reports/attendance-matrix.js) ── */
.amx { --amx-name-w: 230px; --amx-total-w: 96px; --amx-col-w: 46px; --amx-h1: 46px;
	   --amx-ok: #1baf7a; --amx-warn: #eda100; --amx-bad: #d92d20; --amx-blue: #2a78d6; --amx-muted: #8a93a3; }
.amx.cd-wrap { max-width: none; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.amx-wait { color: #6b7280; padding: 24px 0; }
.amx-toolbar { padding: 14px 16px; }
.amx-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
.amx-tools-2 { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f3; align-items: center; }
.amx-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.amx-field .form-select { min-width: 190px; border-radius: 10px; }
.amx-k { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.amx-seg { display: inline-flex; background: #f1f3f6; border-radius: 12px; padding: 3px; gap: 3px; }
.amx-chip { border: 0; background: transparent; border-radius: 9px; padding: 5px 12px; font-size: .84rem; font-weight: 700; color: #4b5565; white-space: nowrap; }
.amx-chip.is-on { background: #fff; color: #1d2433; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.amx-chip i { margin-right: 4px; opacity: .7; }
.amx-search { position: relative; flex: 1 1 200px; max-width: 320px; margin: 0; }
.amx-search > i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8a93a3; font-size: .8rem; }
.amx-search .form-control { padding-left: 32px; border-radius: 10px; }
.amx-check-n { color: #8a93a3; }
.amx-check { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: #4b5565; margin: 0; }
.amx-export { margin-left: auto; border: 1px solid #e3e6eb; background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .84rem; color: #1d2433; }
.amx-export:hover { background: #f6f7f9; }
.amx-chip:focus-visible, .amx-export:focus-visible, .amx-name:focus-visible, .amx-scroll:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
.amx-kpi-value { font-size: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Summary tiles: icon beside the figure, padding all round */
.amx-stat { padding: 16px 18px 16px; }
.amx-stat-top { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.amx-stat .cd-kpi-icon { flex: 0 0 auto; margin: 0; }
.amx-stat-fig { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.amx-stat .amx-kpi-value { margin: 0; font-size: 2.1rem; line-height: 1.05; letter-spacing: -.03em; }
.amx-kid-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
/* Incident / note / media tags: toggles, in the toolbar and on the tile */
.amx-kind-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.amx-kind-filter .amx-k { margin-right: 2px; }
.amx-kind { display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--amx-kid) 35%, #fff); background: #fff; color: var(--amx-kid);
			border-radius: 999px; padding: 3px 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.amx-kind:hover { background: color-mix(in srgb, var(--amx-kid) 8%, #fff); }
.amx-kind.is-on { background: var(--amx-kid); border-color: var(--amx-kid); color: #fff; }
.amx-kind.amx-kid-zero:not(.is-on) { color: #9aa1ad; border-color: #e3e6eb; font-weight: 600; }
.amx-kind:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
/* Markers under a session's date: incidents, notes, media */
.amx-kids { display: flex; justify-content: center; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.amx-kid { display: inline-flex; align-items: center; gap: 1px; height: 18px; min-width: 18px; padding: 0 3px; border-radius: 6px; font-size: .6rem; text-decoration: none; justify-content: center; }
.amx-kid b { font-size: .58rem; }
.amx-kid-incident { color: #fff; background: #d92d20; }
.amx-kid-feedback { color: #1a4f9c; background: #dbe8fb; }
.amx-kid-media    { color: #5b21b6; background: #ece4ff; }
button.amx-kid { border: 0; cursor: pointer; }
button.amx-kid:hover { filter: brightness(.92); }
button.amx-kid:focus-visible { outline: 2px solid #2B80FF; outline-offset: 1px; }

/* The incidents / notes / media modal */
.amx-kmodal .modal-content { border: 0; border-radius: 20px; overflow: hidden; }
.amx-kmodal .modal-header { align-items: flex-start; border-bottom: 1px solid #eef0f3; }
.amx-kmodal-head { min-width: 0; }
.amx-kmodal-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.amx-kmodal .modal-title { font-weight: 800; }
.amx-kmodal .modal-body { background: #f6f7f9; display: flex; flex-direction: column; gap: 12px; }
.amx-ktabs { display: flex; flex-wrap: wrap; gap: 6px; }
.amx-kitem { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); border-left: 4px solid var(--amx-kid); }
.amx-kitem-head { display: flex; align-items: center; gap: 10px; }
.amx-kitem-head .amx-kid { height: 26px; min-width: 26px; font-size: .75rem; border-radius: 8px; }
.amx-kitem-head h6 { margin: 0; font-weight: 800; font-size: 1.02rem; }
.amx-kmeta { margin-top: 6px; font-size: .8rem; color: #6b7280; }
.amx-kmeta strong { color: #1d2433; font-weight: 600; }
.amx-kdesc { margin: 10px 0 0; white-space: pre-line; line-height: 1.55; color: #1d2433; }
.amx-kimages { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.amx-kimages a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eef0f3; }
.amx-kimages img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.amx-kimages a:hover img { transform: scale(1.04); }
.amx-kvideo { display: block; width: 100%; max-height: 360px; margin-top: 12px; border-radius: 12px; background: #000; }
.amx-kfiles { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.amx-kfiles a { color: #1a5fd0; text-decoration: none; font-weight: 600; }
.amx-kfiles a:hover { text-decoration: underline; }
.amx-kopen { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .84rem; font-weight: 700; color: #1d2433; text-decoration: none;
			 border: 1px solid #e3e6eb; border-radius: 10px; padding: 6px 12px; }
.amx-kopen:hover { background: #f6f7f9; color: #1d2433; }
.amx-kopen i { font-size: .7rem; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .amx-kimages img { transition: none; } }
.amx-stat .cd-kpi-label { margin: 0; }
.amx-stat-fig { flex: 1 1 auto; }
.amx-stat-fig .cd-kpi-sub { margin-top: 3px; }
.amx-top-title { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin-bottom: 2px; }
.amx-podium { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.amx-podium li { display: flex; align-items: center; gap: 8px; font-size: .84rem; min-width: 0; }
.amx-medal { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff; background: var(--amx-medal); }
.amx-podium-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.amx-podium-name a { color: #1d2433; text-decoration: none; }
.amx-podium-name a:hover { color: #1a5fd0; text-decoration: underline; }
.amx-podium-bar { flex: 0 0 48px; height: 6px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.amx-podium-bar > span { display: block; height: 100%; background: #eb6834; border-radius: 999px; }
.amx-podium strong { flex: 0 0 auto; min-width: 20px; text-align: right; }
/* Below desktop width the busiest session and the top three get full-width tiles, so names fit */
@media (max-width: 991.98px) { .amx-top-col { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; } }
.amx .cd-kpi-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.amx-card { margin-top: 16px; padding: 0; overflow: hidden; }
/* Scrolls sideways only: up and down it scrolls with the page on every screen
   (a box with its own height left the key and turnout looking stuck in place) */
.amx-scroll { overflow-x: auto; overflow-y: hidden; }
@media (max-height: 600px) {
	.amx-table.amx-date { --amx-h1: 118px; }
	.amx-vt { font-size: .68rem; }
}
.amx-table { border-collapse: separate; border-spacing: 0; font-size: .86rem; table-layout: fixed; width: max-content; }
.amx-col-name { width: var(--amx-name-w); }
.amx-col-total { width: var(--amx-total-w); }
.amx-col-s { width: var(--amx-col-w); }
.amx-table.amx-date { --amx-h1: 168px; }
/* By date: titles run up each column */
.amx-evv { padding: 0 2px; vertical-align: bottom; border-bottom: 0 !important; }
.amx-evv-in { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: calc(var(--amx-h1) - 6px); padding: 8px 0 6px;
			  border-radius: 10px 10px 0 0; border-top: 3px solid var(--amx-c); background: color-mix(in srgb, var(--amx-c) 10%, #fff); overflow: hidden; }
.amx-vt { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; min-height: 0; flex: 1 1 auto;
		  font-size: .74rem; font-weight: 700; color: #1d2433; text-align: left; }
.amx-evv-ico { color: var(--amx-c); font-size: .8rem; flex: 0 0 auto; }
.amx-evv-ico .amx-ev-img { width: 14px; height: 14px; }
/* Key: one chip per event in view */
.amx-key { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #eef0f3; }
.amx-key:empty { display: none; }
.amx-key-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e6eb; background: #fff; border-radius: 999px; padding: 4px 10px 4px 8px;
				font-size: .78rem; font-weight: 700; color: #1d2433; }
.amx-key-chip:hover { background: color-mix(in srgb, var(--amx-c) 8%, #fff); }
.amx-key-chip.is-on { background: color-mix(in srgb, var(--amx-c) 16%, #fff); border-color: var(--amx-c); }
.amx-key-chip:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
.amx-key-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amx-c); }
.amx-key-n { font-size: .68rem; color: #6b7280; background: #f1f3f6; border-radius: 999px; padding: 0 6px; }
.amx-key-chip i { font-size: .62rem; opacity: .5; }
.amx-table th, .amx-table td { background: #fff; border-bottom: 1px solid #f0f2f5; }
/* Headers stick to the top, names and totals to the left */
.amx-table thead th { position: sticky; z-index: 2; }
.amx-h1 th { top: 0; height: var(--amx-h1); }
.amx-h2 th { top: var(--amx-h1); }
.amx-corner, .amx-person { position: sticky; left: 0; z-index: 3; }
.amx-total-h, .amx-total { position: sticky; left: var(--amx-name-w); z-index: 3; border-right: 1px solid #e3e6eb; }
.amx-table thead .amx-corner, .amx-table thead .amx-total-h { z-index: 5; }
.amx-corner { text-align: left; vertical-align: bottom; padding: 10px 14px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.amx-total-h { vertical-align: bottom; padding: 10px 8px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; text-align: center; }

.amx-ev { padding: 0 2px; vertical-align: bottom; border-bottom: 0 !important; }
.amx-ev-in { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px 10px 0 0; font-weight: 700; font-size: .78rem; color: #1d2433;
			 background: color-mix(in srgb, var(--amx-c) 12%, #fff); border-top: 3px solid var(--amx-c); white-space: nowrap; overflow: hidden; }
.amx-ev-in > i:first-child, .amx-ev-img { color: var(--amx-c); flex: 0 0 auto; }
.amx-ev-img { width: 16px; height: 16px; object-fit: contain; }
.amx-ev-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.amx-rep { margin-left: auto; font-size: .65rem; opacity: .55; }
.amx-date { padding: 0 2px 6px; text-align: center; vertical-align: top; }
.amx-date > a, .amx-date > span { display: flex; flex-direction: column; align-items: center; padding: 5px 0 4px; border-radius: 0 0 10px 10px; text-decoration: none; color: #1d2433;
								   background: color-mix(in srgb, var(--amx-c) 6%, #fff); line-height: 1.1; }
.amx-date > a:hover { background: color-mix(in srgb, var(--amx-c) 18%, #fff); }
.amx-dow { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; font-weight: 700; }
.amx-day { font-size: 1.05rem; font-weight: 800; }
.amx-mon { font-size: .66rem; color: #6b7280; font-weight: 600; }
.amx-future .amx-day { color: var(--amx-blue); }
/* Today: a dashed line before the first upcoming session */
.amx-table .amx-today { box-shadow: inset 2px 0 0 #2B80FF; }
.amx-h2 .amx-today > a::before { content: 'Next'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #2B80FF; color: #fff !important; padding: 0 4px; border-radius: 4px; line-height: 1.4; font-size: .55rem; font-weight: 800; color: #2B80FF; letter-spacing: .05em; text-transform: uppercase; }
.amx-h2 .amx-today > a, .amx-h2 .amx-today > span { position: relative; }

.amx-person { text-align: left; padding: 6px 14px; font-weight: 400; }
.amx-person > .amx-av { float: left; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: #f1f3f6; color: #4b5565; margin: 2px 10px 0 0; }
.amx-who { display: block; overflow: hidden; }
.amx-name { display: block; font-weight: 700; color: #1d2433; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.amx-name:hover { color: #1a5fd0; text-decoration: underline; }
.amx-sub { display: block; font-size: .72rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amx-tag { display: inline-block; font-size: .6rem; font-weight: 700; padding: 0 6px; border-radius: 999px; background: #f1f3f6; color: #4b5565; margin-left: 4px; text-transform: uppercase; letter-spacing: .03em; }
.amx-tag-bad { background: #fde8e7; color: #b42318; }
.amx-former { opacity: .55; }
.amx-total { padding: 6px 10px; text-align: left; white-space: nowrap; }
.amx-total strong { display: inline-block; min-width: 22px; font-size: .95rem; }
.amx-bar { display: inline-block; width: 30px; height: 6px; border-radius: 999px; background: #eef0f3; vertical-align: middle; margin: 0 4px; overflow: hidden; }
.amx-bar > span { display: block; height: 100%; background: var(--amx-ok); border-radius: 999px; }
.amx-pct { font-size: .7rem; color: #6b7280; }

.amx-table tbody td[data-c] { text-align: center; padding: 4px 2px; height: 46px; }
.amx-table tbody tr:hover th, .amx-table tbody tr:hover td { background: #f7f9fc; }
.amx-table .amx-col-hot { background: #f2f6fd !important; }
.amx-m { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .78rem; }
.amx-m-in        { background: var(--amx-ok); color: #fff; box-shadow: 0 2px 6px rgba(27, 175, 122, .35); }
.amx-m-went      { color: var(--amx-ok); box-shadow: inset 0 0 0 2px var(--amx-ok); }
.amx-m-noshow    { color: #a15c00; background: color-mix(in srgb, var(--amx-warn) 18%, #fff); }
.amx-m-going     { color: var(--amx-blue); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--amx-blue) 55%, #fff); }
.amx-m-maybe     { color: #6b7280; background: #f1f3f6; }
.amx-m-no        { color: var(--amx-bad); background: color-mix(in srgb, var(--amx-bad) 10%, #fff); width: 22px; height: 22px; font-size: .68rem; }
.amx-m-withdrawn { color: var(--amx-muted); width: 22px; height: 22px; font-size: .68rem; }
.amx-m-invited   { color: #c3c8d1; width: 22px; height: 22px; font-size: .6rem; }

/* Turnout: the first row, just above the people, so each session's total is seen at a glance */
.amx-table tbody tr.amx-turnout th, .amx-table tbody tr.amx-turnout td { background: #f6f8fb; border-bottom: 2px solid #e3e6eb; }
.amx-table tbody tr.amx-turnout:hover th, .amx-table tbody tr.amx-turnout:hover td { background: #f6f8fb; }
.amx-turnout-label { font-size: .72rem; font-weight: 700 !important; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.amx-turnout-sub { display: block; font-size: .66rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #8a93a3; }
.amx-table tbody tr.amx-turnout td[data-c] { text-align: center; padding: 6px 2px; height: 40px; }
.amx-heat.amx-heat-going { color: #1a4f9c; background: rgba(42, 120, 214, var(--amx-h)); }
.amx-going-key { color: #2a78d6; font-weight: 700; }
.amx-heat { display: inline-grid; place-items: center; min-width: 30px; height: 24px; border-radius: 8px; font-weight: 800; font-size: .78rem; color: #0d5c40;
			background: rgba(27, 175, 122, var(--amx-h)); }
.amx-none, .amx-empty { padding: 40px 16px; text-align: center; color: #6b7280; }
.amx-empty i { font-size: 1.8rem; opacity: .4; margin-bottom: 8px; }
.amx-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; border-top: 1px solid #eef0f3; font-size: .78rem; color: #4b5565; align-items: center; }
.amx-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.amx-legend .amx-m { width: 22px; height: 22px; font-size: .62rem; }

@media (max-width: 767.98px) {
	.amx { --amx-name-w: 124px; --amx-total-w: 44px; --amx-col-w: 40px; }
	.amx-total-h { font-size: 0; }                 /* no room for the label: the count says it */
	.amx-total-h::after { content: '#'; font-size: .72rem; }
	.amx-name { font-size: .82rem; }
	.amx-corner { padding: 10px; }
	.amx-person > .amx-av, .amx-bar, .amx-pct { display: none; }
	.amx-person { padding: 6px 10px; }
	.amx-total { text-align: center; }
	.amx-field { flex: 1 1 100%; }
	.amx-field .form-select { min-width: 0; width: 100%; }
	.amx-seg { width: 100%; }
	.amx-chip { flex: 1 1 0; }
	.amx-search { max-width: none; flex-basis: 100%; }
	.amx-export { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   MEMBER PROFILE  (.mp-page)  — /users/club-member-profile.php
   Builds on the Club Dashboard (.cd-*) and group list (.gl-avatar)
   styles in layout.css, and matches the Attendance Report's light look.
   ═══════════════════════════════════════════════════════════════════ */
.mp-page {
	--mp-ok:   #1baf7a;
	--mp-warn: #eda100;
	--mp-bad:  #d92d20;
	padding-top: 16px;
	padding-bottom: 48px;
}
/* .cd-wrap's auto side margins misbehave in flex parents; fill the column instead */
.mp-page.cd-wrap { min-width: 0; }


/* ── Hero ───────────────────────────────────────────────────────── */
.mp-hero {
	position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px 22px; color: var(--cd-ink);
	background:
		radial-gradient(560px 240px at 95% -20%, rgba(43, 128, 255, .12), transparent 70%),
		radial-gradient(420px 220px at 55% 140%, rgba(31, 169, 113, .08), transparent 70%),
		radial-gradient(380px 200px at 0% 0%, rgba(232, 75, 60, .06), transparent 70%),
		#fff;
	box-shadow: var(--cd-shadow);
}
.mp-hero .cd-eyebrow { color: var(--cd-muted); opacity: 1; }
.mp-hero-main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.mp-avatar {
	flex: 0 0 auto; width: 88px; height: 88px; border-radius: 50%;
	display: grid; place-items: center; font-size: 2rem; font-weight: 800; letter-spacing: .01em;
	color: #fff; background: var(--mp-colour);
	outline: 3px solid var(--mp-colour); outline-offset: 3px;
}
.mp-id { flex: 1 1 260px; min-width: 0; }
.mp-name { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: .2rem 0 .55rem; overflow-wrap: anywhere; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-chips .cd-chip { color: var(--cd-ink); }
.mp-chips .cd-chip i { color: var(--cd-muted); }
.mp-chip-ok { background: color-mix(in srgb, var(--mp-ok) 14%, #fff); }
.mp-chip-ok i { color: var(--mp-ok) !important; }
.mp-chip-muted { color: var(--cd-muted) !important; }

.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.mp-btn {
	display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--cd-line); background: #fff; color: var(--cd-ink);
	border-radius: 12px; padding: 9px 14px; font-weight: 700; font-size: .88rem; text-decoration: none; line-height: 1.1;
	transition: background .15s, box-shadow .15s, transform .15s;
}
.mp-btn:hover { background: var(--cd-soft); color: var(--cd-ink); }
.mp-btn i { color: var(--cd-muted); }
.mp-btn-primary { background: #2B80FF; border-color: #2B80FF; color: #fff; box-shadow: 0 4px 14px rgba(43, 128, 255, .28); }
.mp-btn-primary i { color: #fff; }
.mp-btn-primary:hover { background: #1a6fef; color: #fff; transform: translateY(-1px); }
.mp-btn:focus-visible, .mp-alert:focus-visible, .mp-tile:focus-visible, .mp-more-btn:focus-visible,
.mp-icon-btn:focus-visible, .mp-person:focus-visible, .mp-link:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }

/* Safety strip: medical and emergency contact, always first thing seen */
.mp-alerts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--cd-line); }
.mp-alert {
	display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px; font-size: .86rem; font-weight: 600;
	text-decoration: none; border: 1px solid transparent; line-height: 1.2;
}
.mp-alert-medical { background: var(--mp-bad); color: #fff; border: 0; }
.mp-alert-medical:hover { background: #b42318; }
.mp-alert-emergency { background: color-mix(in srgb, var(--mp-bad) 8%, #fff); border-color: color-mix(in srgb, var(--mp-bad) 25%, #fff); color: #7a271a; }
.mp-alert-emergency:hover { background: color-mix(in srgb, var(--mp-bad) 14%, #fff); color: #7a271a; }
.mp-alert-emergency > i { color: var(--mp-bad); }
.mp-alert-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; opacity: .75; margin-right: 4px; }

/* ── Tiles ──────────────────────────────────────────────────────── */
.mp-tile { width: 100%; height: 100%; border: 0; text-align: left; padding-bottom: 16px; cursor: pointer; color: var(--cd-ink);
		   transition: transform .15s, box-shadow .15s; }
.mp-tile:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cd-accent) 35%, transparent), var(--cd-shadow); }
.mp-tile:disabled { opacity: .5; cursor: default; }
.mp-tile .cd-kpi-value { font-size: 1.75rem; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-tile .cd-kpi-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-warn-text { color: #a15c00; font-weight: 700; }

/* ── Cards ──────────────────────────────────────────────────────── */
.mp-stack { display: flex; flex-direction: column; gap: 16px; }
.mp-card { scroll-margin-top: 16px; }
.mp-card .cd-card-head { margin-bottom: 10px; }
.mp-accent::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--cd-accent); }
.mp-flash { animation: mp-flash 1.4s ease-out; }
@keyframes mp-flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(43, 128, 255, .45), var(--cd-shadow); } 100% { box-shadow: var(--cd-shadow); } }

.mp-link { border: 0; background: var(--cd-soft); color: var(--cd-ink); border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }
.mp-link:hover { background: var(--cd-line); }
.mp-sub-head { margin: 16px 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--cd-muted); }
.mp-empty { color: var(--cd-muted); font-size: .9rem; margin: 4px 0 0; }
.mp-note { color: var(--cd-muted); font-size: .8rem; }
.mp-ok-text { color: #12895b; font-weight: 700; }
.mp-bad-text { color: #b42318; font-weight: 700; }

/* Medical */
.mp-medical { background: radial-gradient(320px 160px at 100% 0%, rgba(217, 45, 32, .08), transparent 70%), var(--cd-card); }
.mp-medical-title { color: #b42318; }
.mp-medical-text { font-size: 1.08rem; font-weight: 700; line-height: 1.45; margin: 0 0 12px; }

/* Facts row (membership) */
.mp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mp-facts > div { background: var(--cd-soft); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mp-facts strong { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-k { display: block; font-size: .7rem; color: var(--cd-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 2px; }
.mp-info { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cd-line); }
.mp-info :last-child { margin-bottom: 0; }
.mp-edit { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--cd-soft); }
.mp-edit-title { font-weight: 800; margin-bottom: 12px; }

/* Lists of items: icon, title + meta, optional action */
.mp-list { list-style: none; padding: 0; margin: 0; }
.mp-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--cd-line); font-size: .9rem; }
.mp-list > .mp-item:first-child { border-top: 0; }
.mp-item-top { align-items: flex-start; }
.mp-item-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mp-item-title { display: block; font-weight: 700; }
.mp-item-meta { display: block; color: var(--cd-muted); font-size: .8rem; }
.mp-item-body a { color: inherit; font-weight: 600; }
.mp-item-meta a { color: var(--cd-muted); }
.mp-faded { opacity: .6; }
.mp-ico { flex: 0 0 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: .9rem;
		  color: var(--cd-accent); background: color-mix(in srgb, var(--cd-accent) 13%, transparent); }
.mp-icon-btn { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--cd-soft); color: var(--cd-muted); font-size: .8rem; }
.mp-icon-btn:hover { background: var(--cd-line); color: var(--cd-ink); }
.mp-pill { flex: 0 0 auto; border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 700; background: color-mix(in srgb, #eda100 16%, #fff); color: #7a4a00; text-decoration: none; }
.mp-inline-edit { display: flex; gap: 6px; margin-top: 2px; }
.mp-inline-edit .form-control { min-width: 0; }
.mp-inline-edit .btn { flex: 0 0 auto; white-space: nowrap; }
.mp-add { margin-top: 10px; }

/* Drill-downs */
.mp-more-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #1a5fd0; font-weight: 700; font-size: .84rem; padding: 8px 0 0; }
.mp-more-btn:hover { text-decoration: underline; }
.mp-more-btn i { font-size: .7rem; }   /* turned over when open by layout.css's [data-bs-toggle="collapse"] rule */
.mp-page .mp-link[data-bs-toggle] i { transform: none; }
.mp-more-btn .mp-more-hide, .mp-more-btn[aria-expanded="true"] .mp-more-show { display: none; }
.mp-more-btn[aria-expanded="true"] .mp-more-hide { display: inline; }
.mp-drill { margin-top: 8px; border-radius: 12px; background: var(--cd-soft); padding: 4px 12px; }
.mp-drill-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--cd-line); font-size: .84rem; }
.mp-drill-row:first-child { border-top: 0; }

/* Awards bar */
.mp-award-bar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--cd-line); }
.mp-award-bar > span { display: block; height: 100%; }
.mp-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .8rem; color: var(--cd-muted); }
.mp-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; }

/* Groups: avatars as in the group list */
.mp-group-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-group-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--cd-soft); max-width: 100%; font-weight: 700; font-size: .86rem; }
.mp-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mp-group-chip { color: var(--cd-ink); text-decoration: none; transition: background .15s; }
a.mp-group-chip:hover { background: var(--cd-line); color: var(--cd-ink); }
a.mp-group-chip:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
.mp-group-admin { color: var(--cd-muted); font-size: .75rem; }
.gl-avatar.mp-gav { width: 32px; height: 32px; margin: 2px; font-size: .72rem; outline-width: 2px; outline-offset: 1px; flex: 0 0 auto; grid-area: auto; }
.gl-avatar.mp-gav-sm { width: 30px; height: 30px; outline: 0; margin: 0 2px; font-size: .68rem; }

/* People (family, connection) */
.mp-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mp-person { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--cd-soft); color: var(--cd-ink); text-decoration: none; min-width: 0; transition: background .15s; }
.mp-person:hover { background: var(--cd-line); color: var(--cd-ink); }
.mp-person-avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: #fff; color: var(--cd-ink); box-shadow: inset 0 0 0 2px var(--cd-line); }
.mp-person-body { flex: 1 1 auto; min-width: 0; }
.mp-person-name { display: block; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-person-meta { display: block; color: var(--cd-muted); font-size: .78rem; }
.mp-person-go { color: var(--cd-muted); font-size: .75rem; }

/* ── Membership information cards (MemberInfoCards, /modules/Members/member-info.js) ── */
.mpi-summary:empty { display: none; }
.mpi-summary { margin-bottom: 14px; }
.mpi-sum-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; }
.mpi-sum-bar { height: 8px; border-radius: 999px; background: var(--cd-line); overflow: hidden; margin-top: 8px; }
.mpi-sum-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--mp-ok); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.mpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mpi-card {
	display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left;
	border: 1px solid var(--cd-line); border-radius: 14px; background: #fff; padding: 12px; color: var(--cd-ink);
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mpi-card:hover { border-color: #d6dae1; box-shadow: var(--cd-shadow); transform: translateY(-1px); }
.mpi-card:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
.mpi-missing { border-color: color-mix(in srgb, var(--mp-warn) 45%, #fff); background: color-mix(in srgb, var(--mp-warn) 6%, #fff); }
.mpi-ico { flex: 0 0 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: .95rem;
		   color: var(--cd-accent); background: color-mix(in srgb, var(--cd-accent) 13%, transparent); }
.mpi-body { flex: 1 1 auto; min-width: 0; }
.mpi-title { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cd-muted);
			 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpi-req { font-size: .62rem; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--cd-soft); color: var(--cd-muted); margin-left: 2px; vertical-align: 1px; }
.mpi-answer { display: block; margin-top: 2px; font-weight: 700; font-size: .98rem; overflow: hidden; text-overflow: ellipsis;
			  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.mpi-yes .mpi-answer { color: #12895b; }
.mpi-no .mpi-answer { color: #b42318; }
.mpi-none { color: var(--cd-muted); font-weight: 600; font-style: italic; }
.mpi-missing .mpi-none { color: #a15c00; font-style: normal; }
.mpi-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; font-style: normal;
		   color: color-mix(in srgb, var(--cd-accent) 75%, #000); background: color-mix(in srgb, var(--cd-accent) 14%, #fff); }
.mpi-go { flex: 0 0 auto; color: #b3b9c4; font-size: .85rem; }
.mpi-card:hover .mpi-go { color: #2B80FF; }

/* The shared modal */
.mpi-modal .modal-content { border: 0; border-radius: 20px; overflow: hidden; }
.mpi-modal .modal-header { border-bottom: 1px solid var(--cd-line, #eef0f3); align-items: flex-start; }
.mpi-modal .modal-header > div { min-width: 0; }
.mpi-modal .modal-title { font-weight: 800; letter-spacing: -.01em; }
.mpi-modal-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; }
.mpi-explain { white-space: pre-line; font-size: 1.05rem; line-height: 1.6; color: #1d2433; background: #f6f7f9; border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.mpi-gov { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; font-size: .88rem;
		   background: color-mix(in srgb, var(--cd-accent) 9%, #fff); border: 1px solid color-mix(in srgb, var(--cd-accent) 25%, #fff); }
.mpi-gov > i { color: var(--cd-accent); font-size: 1.2rem; margin-top: 2px; }
.mpi-modal-k { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6b7280; margin-bottom: 8px; }
.mpi-modal-answer { font-size: 1.3rem; font-weight: 800; }
.mpi-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.mpi-choice { border: 1px solid #e3e6eb; background: #fff; border-radius: 12px; padding: 10px 18px; font-weight: 700; min-width: 96px; color: #1d2433; }
.mpi-choice:hover { background: #f6f7f9; }
.mpi-choice.is-on { background: #2B80FF; border-color: #2B80FF; color: #fff; }
.mpi-choice:focus-visible, .mpi-nav-btn:focus-visible { outline: 2px solid #2B80FF; outline-offset: 2px; }
.mpi-switch { display: flex; align-items: center; gap: 12px; padding-left: 0; font-size: 1.1rem; font-weight: 700; }
.mpi-switch .form-check-input { float: none; margin: 0; width: 2.6em; height: 1.4em; }
.mpi-date { max-width: 260px; }
.mpi-help { font-size: .8rem; color: #6b7280; margin-top: 8px; }
.mpi-modal .modal-footer { justify-content: space-between; border-top: 1px solid #eef0f3; }
.mpi-nav { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #6b7280; }
.mpi-nav-btn { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f6f7f9; color: #1d2433; }
.mpi-nav-btn:disabled { opacity: .35; }
.mpi-actions { display: flex; gap: 8px; }

@media (max-width: 575.98px) {
	.mpi-grid { grid-template-columns: minmax(0, 1fr); }
	.mpi-modal .modal-content { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.mpi-card, .mpi-sum-bar > span { transition: none; }
}

/* ── Member detail modal on the group pages (/modules/Groups/member-detail-modal.js) ── */
.md-modal .modal-content { border: 0; border-radius: 22px; overflow: hidden; background: #f6f7f9; position: relative; }
.md-modal .modal-body { padding: 16px; }
.md-modal .modal-footer { background: #f6f7f9; border-top: 1px solid #eef0f3; }
.md-close { position: absolute; top: 28px; right: 28px; z-index: 3; background-color: #fff; border-radius: 50%; padding: 8px; opacity: .8; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.md-wrap.cd-wrap { max-width: none; min-width: 0; margin: 0; padding: 0; --mp-ok: #1baf7a; --mp-warn: #eda100; --mp-bad: #d92d20; }
.md-hero { padding-right: 56px; }
.md-avatar { width: 72px; height: 72px; font-size: 1.6rem; }
.md-name { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.md-chip-bad { background: color-mix(in srgb, #d92d20 12%, #fff) !important; color: #b42318 !important; }
.md-chip-bad i { color: #d92d20 !important; }
.md-tiles .mp-tile { padding: 14px 14px 12px; }
.md-tiles .mp-tile .cd-kpi-value { font-size: 1.45rem; margin-top: 8px; }
.md-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.md-pre { white-space: pre-line; }
.md-people { display: flex; flex-direction: column; gap: 8px; }
.md-person-row { display: flex; align-items: center; gap: 8px; }
.md-person-row > .mp-person { flex: 1 1 auto; }
.md-contacts { display: flex; gap: 6px; flex: 0 0 auto; }
.md-contact-btn { display: grid; place-items: center; width: 38px; height: 38px; text-decoration: none; }
.md-more[aria-expanded="true"] i { transform: rotate(180deg); }
@media (max-width: 767.98px) {
	.md-modal .modal-content { border-radius: 0; }
	.md-modal .modal-body { padding: 12px; }
	.md-grid { grid-template-columns: minmax(0, 1fr); }
	.md-avatar { width: 56px; height: 56px; font-size: 1.25rem; }
	.md-tiles .mp-tile .cd-kpi-value { font-size: 1.2rem; }
	.md-tiles .cd-kpi-icon { width: 30px; height: 30px; border-radius: 9px; font-size: .85rem; }
}

/* ── Phones ─────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
	.mp-hero { padding: 20px 18px 16px; border-radius: 18px; }
	.mp-hero-main { gap: 14px; }
	.mp-avatar { width: 64px; height: 64px; font-size: 1.45rem; }
	.mp-id { flex-basis: calc(100% - 90px); }
	.mp-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
	.mp-actions .mp-btn { justify-content: center; }
	.mp-actions .mp-btn-primary { grid-column: 1 / -1; }
	.mp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mp-tile .cd-kpi-value { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	.mp-tile, .mp-btn { transition: none; }
	.mp-flash { animation: none; }
}

/* ── Help button and help video modal (platform wide) ─────────────
   Used by the <cmc-help> tag (modules/Utils/cmc-help.js). */
:root { --cmc-yellow: #f0c636; --cmc-yellow-dark: #ddb01f; }

/* The round "?" button: CMC yellow with a dark icon (white on this yellow is hard to read) */
.cmc-help-btn {
	--bs-btn-color: #1d2433;
	--bs-btn-bg: var(--cmc-yellow);
	--bs-btn-border-color: var(--cmc-yellow);
	--bs-btn-hover-color: #1d2433;
	--bs-btn-hover-bg: var(--cmc-yellow-dark);
	--bs-btn-hover-border-color: var(--cmc-yellow-dark);
	--bs-btn-active-color: #1d2433;
	--bs-btn-active-bg: var(--cmc-yellow-dark);
	--bs-btn-active-border-color: var(--cmc-yellow-dark);
	--bs-btn-focus-shadow-rgb: 240, 198, 54;
}
/* Win over lib-circle-btn or any other style that sets its own background */
.btn.cmc-help-btn { background-color: var(--cmc-yellow); border-color: var(--cmc-yellow); color: #1d2433; }
.btn.cmc-help-btn:hover, .btn.cmc-help-btn:focus-visible, .btn.cmc-help-btn:active { background-color: var(--cmc-yellow-dark); border-color: var(--cmc-yellow-dark); color: #1d2433; }

/* The modal */
.cmc-help-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.cmc-help-modal .modal-header { border: 0; padding: 14px 18px; }
.cmc-help-modal .modal-title { font-size: 1.05rem; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.cmc-help-modal .modal-title i { color: var(--cmc-yellow-dark); }
.cmc-help-modal iframe { background: #000; }
.cmc-help-modal .modal-title { flex: 1 1 auto; min-width: 0; }
.cmc-help-more { border: 0; background: #f3f4f6; color: #374151; border-radius: 999px; padding: 5px 12px; font-size: .8rem; font-weight: 700; margin-right: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.cmc-help-more:hover { background: #e5e7eb; }
.cmc-help-more i { font-size: .7rem; transition: transform .2s; }
.cmc-help-more:not(.collapsed) i { transform: rotate(180deg); }
.cmc-help-more .cmc-help-more-hide, .cmc-help-more:not(.collapsed) .cmc-help-more-show { display: none; }
.cmc-help-more:not(.collapsed) .cmc-help-more-hide { display: inline; }
.cmc-help-text { padding: 16px 20px 18px; font-size: .92rem; line-height: 1.55; color: #374151; max-height: 32vh; overflow-y: auto; }
.cmc-help-text p { margin: 0 0 .7em; }
.cmc-help-text p:last-child { margin-bottom: 0; }
.cmc-help-text a { word-break: break-word; }

/* ── Sub-nav buttons (platform wide) ──────────────────────────────
   The round buttons for a page's own actions and shortcuts, top right (waiting list,
   archive, settings, info...). Softer than the outlined back button, firmer than a
   plain shadow: white, a light grey ring and a grey icon that turns black on hover.
   <a class="btn cmc-subnav-btn lib-circle-btn" href="..." title="Waiting list" aria-label="Waiting list"><i class="fa fa-hourglass-half"></i></a>
   For the main action on a page (e.g. "+ New group") add .is-primary for the dark filled version. */
.cmc-subnav-btn {
	--bs-btn-color: #6b7280;
	--bs-btn-bg: #fff;
	--bs-btn-border-color: #d5d9e0;
	--bs-btn-hover-color: #000;
	--bs-btn-hover-bg: #f3f4f6;
	--bs-btn-hover-border-color: #aeb4bf;
	--bs-btn-active-color: #000;
	--bs-btn-active-bg: #e9ebef;
	--bs-btn-active-border-color: #aeb4bf;
	--bs-btn-focus-shadow-rgb: 29, 36, 51;
}
/* Win over lib-circle-btn or any other style that sets its own colours */
.btn.cmc-subnav-btn { background-color: #fff; border: 1px solid #d5d9e0; color: #6b7280; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.btn.cmc-subnav-btn:hover, .btn.cmc-subnav-btn:focus-visible { background-color: #f3f4f6; border-color: #aeb4bf; color: #000; }
.btn.cmc-subnav-btn:active { background-color: #e9ebef; border-color: #aeb4bf; }
.btn.cmc-subnav-btn.is-primary { background-color: #1d2433; border-color: #1d2433; color: #fff; }
.btn.cmc-subnav-btn.is-primary:hover, .btn.cmc-subnav-btn.is-primary:focus-visible { background-color: #333c4f; border-color: #333c4f; color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   Member list (view-member-list.php) — phone first
   Sits inside .cd-wrap, so it shares the dashboard's colours and type.
   ═══════════════════════════════════════════════════════════════════ */
.ml-wrap { max-width: 980px; }
.ml-min0 { min-width: 0; }

/* Header */
/* The header is a .cd-hero (same padding, corners, colours and shadow as the
   dashboard and waiting list); these only add what the list needs. */
.ml-head {
	overflow: visible;   /* .cd-hero hides overflow, which would cut off the ⋯ menu */
	z-index: 30;
}
.ml-head-top { display: flex; align-items: flex-start; gap: 10px; }
.ml-head .cd-title { margin-bottom: 0; }
.ml-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; flex: 0 0 auto; text-decoration: none; transition: background .15s; }
.ml-icon-btn:hover, .ml-icon-btn:focus-visible { background: rgba(255, 255, 255, .24); color: #fff; }
/* Page buttons above the header (back, help, member archive) use the site's lib-circle-btn */
.ml-topnav { display: flex; align-items: center; gap: 10px; }

.ml-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ml-count { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; line-height: .9; }
.ml-count small { font-size: .85rem; font-weight: 600; opacity: .7; letter-spacing: 0; margin-left: 5px; }
.ml-count-lab { white-space: nowrap; display: inline-block; }
.ml-count-info { border: 0; background: none; color: inherit; opacity: .6; font-size: .85rem; padding: 2px 4px; margin-left: 2px; vertical-align: 1px; letter-spacing: 0; }
.ml-count-info:hover, .ml-count-info:not(.collapsed) { opacity: 1; }
.ml-count-help { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); font-size: .82rem; line-height: 1.45; color: rgba(255, 255, 255, .85); max-width: 640px; }
.ml-count-help strong { color: #fff; }
.ml-email { background: #fff; color: var(--cd-ink); border: 0; border-radius: 12px; padding: 9px 14px; font-weight: 800; font-size: .88rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.ml-menu { border-radius: 14px; padding: 6px; border: 0; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); min-width: 230px; }
.ml-menu .dropdown-item { border-radius: 9px; padding: 9px 12px; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.ml-menu .dropdown-item i { width: 18px; text-align: center; color: var(--cd-muted); }
.ml-menu-note { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--cd-muted); }

/* Search + filter bar: stays at the top while scrolling */
/* Header to search box: 24px, the same as the waiting list's header to its filters */
.ml-head { margin-bottom: 14px; }
/* The search bar only gets its background once it's stuck to the top, so it doesn't cut a
   straight line through the header's shadow (member-list.js sets .is-stuck) */
.ml-bar { position: sticky; top: 0; z-index: 20; background: transparent; padding: 10px 0 8px; transition: background-color .15s; }
.ml-bar.is-stuck { background: rgba(244, 245, 247, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#ml-bar-sentinel { height: 1px; margin-bottom: -1px; }
.ml-bar-row { display: flex; gap: 8px; }
.ml-search { position: relative; flex: 1; min-width: 0; }
.ml-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.ml-search input { padding-left: 38px; border-radius: 12px; height: 44px; border: 1px solid #e5e7eb; font-size: 16px; /* no zoom on iPhone */ }
.ml-fbtn { height: 44px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; padding: 0 14px; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--cd-ink); }
.ml-fbtn .badge { background: #2B80FF; border-radius: 999px; font-size: .7rem; }
.ml-pills { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; }
.ml-pills::-webkit-scrollbar { display: none; }
.ml-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; font-size: .78rem; font-weight: 600; color: var(--cd-ink); white-space: nowrap; }
.ml-pill .fa-xmark { color: #9ca3af; margin-left: 2px; }
.ml-pill.is-sum { background: transparent; border: 0; color: var(--cd-muted); padding-left: 2px; }
.ml-pill.is-sort { color: var(--cd-muted); }

/* Member cards */
.ml-list { background: #fff; border-radius: 16px; box-shadow: var(--cd-shadow); overflow: hidden; transition: opacity .15s; }
.ml-list.is-reloading { opacity: .5; }
/* Cloud loader over the list while it loads or reloads (first load, filters, search, sort) */
.ml-list-wrap { position: relative; }
.ml-list-wrap.is-loading .ml-list:empty { min-height: 220px; }
.ml-loading { display: flex; position: absolute; left: 0; right: 0; top: 0; height: 220px; max-height: 100%; align-items: center; justify-content: center; pointer-events: none; z-index: 2; }
.ml-loading[hidden] { display: none !important; }
.ml-row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-bottom: 1px solid var(--cd-line); color: inherit; text-decoration: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ml-row:last-child { border-bottom: 0; }
.ml-row:hover { background: var(--cd-soft); color: inherit; }
.ml-row.is-sel, .ml-row.is-sel:hover { background: #eff6ff; }
.ml-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: #fff; flex: 0 0 auto; position: relative; background: #9ca3af; }
.ml-tick { position: absolute; inset: 0; border-radius: 50%; background: #2B80FF; display: none; place-items: center; font-size: .9rem; }
.is-selecting .ml-av { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d1d5db; }
.ml-row.is-sel .ml-tick { display: grid; }
.ml-main { flex: 1; min-width: 0; display: block; }
.ml-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ml-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-ic-med { color: #dc2626; font-size: .8rem; flex: 0 0 auto; }
.ml-ic-soft { color: #9ca3af; font-size: .75rem; flex: 0 0 auto; }
.ml-l2, .ml-l3 { display: block; font-size: .78rem; color: var(--cd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ml-l3 > span { margin-right: 10px; }
.ml-l3 i { color: #9ca3af; margin-right: 4px; font-size: .72rem; }
.ml-l3 .ml-roles { color: var(--cd-ink); font-weight: 600; }
.ml-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.ml-sep { margin: 0 5px; color: #d1d5db; }
.ml-dob { font-variant-numeric: tabular-nums; display: none; }
.ml-info { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: .74rem; color: var(--cd-muted); }
.ml-info strong { color: var(--cd-ink); font-weight: 600; }
.ml-info .is-missing { opacity: .55; font-style: italic; }
.ml-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; max-width: 46%; }
.ml-gb { font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ml-gb.ok { background: #dcfce7; color: #166534; }
.ml-gb.warn { background: #fef3c7; color: #92400e; }
.ml-gb.bad { background: #fee2e2; color: #991b1b; }
.ml-gb.missing { background: transparent; color: #9ca3af; border: 1px dashed #d1d5db; }
.ml-st { font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--cd-muted); }
.ml-st.ok { color: #6b7280; }
.ml-st.warn { color: #b45309; }
.ml-st.bad { color: #b91c1c; }
.ml-apps { display: flex; gap: 6px; font-size: .72rem; color: #d1d5db; }
.ml-apps .on { color: #1FA971; }
.ml-apps .ml-seen { color: #c2410c; }
.ml-empty { padding: 36px 16px; text-align: center; color: var(--cd-muted); }
.ml-empty i { display: block; font-size: 2rem; opacity: .35; margin-bottom: 8px; }
.ml-foot { text-align: center; color: var(--cd-muted); font-size: .82rem; padding: 14px 0 6px; min-height: 20px; }
.ml-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #d1d5db; border-top-color: #2B80FF; border-radius: 50%; margin-right: 8px; vertical-align: -2px; animation: ml-spin .7s linear infinite; }
@keyframes ml-spin { to { transform: rotate(360deg); } }
#ml-sentinel { height: 1px; }

/* Loading placeholders */
.ml-skel .ml-av { background: #eef0f3; }
.ml-skel-line { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #eef0f3 0%, #f6f7f9 50%, #eef0f3 100%); background-size: 200% 100%; animation: ml-shimmer 1.2s infinite; margin: 5px 0; }
@keyframes ml-shimmer { to { background-position: -200% 0; } }

/* Selection bar */
.ml-selbar { position: sticky; bottom: 10px; z-index: 25; margin-top: 10px; background: #1d2433; color: #fff; border-radius: 16px; padding: 9px 10px; display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(16, 24, 40, .35); }
.ml-selbar.d-none { display: none !important; }
.ml-selbar button { border: 0; border-radius: 10px; padding: 8px 12px; font-size: .84rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ml-sel-x { background: rgba(255, 255, 255, .12); color: #fff; }
.ml-sel-light { background: #fff; color: var(--cd-ink); }
.ml-sel-go { background: #2B80FF; color: #fff; }

/* Filter sheet (Bootstrap offcanvas-bottom) */
.ml-sheet.offcanvas-bottom { height: auto; max-height: 88vh; border-radius: 22px 22px 0 0; border: 0; box-shadow: 0 -10px 40px rgba(16, 24, 40, .25); }
.ml-sheet .offcanvas-header { padding: 6px 18px 8px; justify-content: space-between; }
.ml-sheet .offcanvas-title { font-weight: 800; }
.ml-sheet .offcanvas-body { padding: 0 18px 8px; }
.ml-sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #d1d5db; margin: 8px auto 2px; }
.ml-sec { padding: 20px 0; border-top: 1px solid #eef0f3; }
.ml-sec:first-child { border-top: 0; padding-top: 6px; }
.ml-sec-t { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin-bottom: 11px; display: flex; justify-content: space-between; align-items: center; }
.ml-sec-t .btn-link { font-size: .8rem; letter-spacing: 0; text-transform: none; font-weight: 600; }
.ml-sec-note { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ml-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ml-chip { border: 1.5px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 6px 11px; font-size: .84rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--cd-ink); }
.ml-chip .n { color: #9ca3af; font-weight: 700; font-variant-numeric: tabular-nums; }
.ml-chip .ml-dot { margin-right: 0; }
.ml-chip-note { color: #9ca3af; font-size: .72rem; }
.ml-chip.is-on { border-color: #2B80FF; background: #eff6ff; color: #1d4ed8; }
.ml-chip.is-on .n { color: #1d4ed8; opacity: .7; }
.ml-seg { display: flex; background: #f1f3f6; border-radius: 10px; padding: 3px; gap: 2px; }
.ml-seg button { flex: 1; border: 0; background: transparent; padding: 7px 4px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: #6b7280; white-space: nowrap; }
.ml-seg button.is-on { background: #fff; color: var(--cd-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.ml-seg-wrap { flex-wrap: wrap; }
.ml-seg-wrap button { flex: 1 1 30%; }
.ml-sheet input.form-control { border-radius: 10px; font-size: 16px; }
.ml-switch { display: flex; align-items: center; gap: 10px; padding-left: 0; }
.ml-switch .form-check-input { float: none; margin: 0; width: 2.4em; height: 1.3em; flex-shrink: 0; }
.ml-sheet-foot { display: flex; gap: 10px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #eef0f3; }
.ml-sheet-foot button { height: 46px; border-radius: 12px; font-weight: 800; border: 0; }
.ml-btn-soft { flex: 0 0 34%; background: #f1f3f6; color: var(--cd-ink); }
.ml-btn-go { flex: 1; background: #2B80FF; color: #fff; }

/* Additional info questions in the filter sheet */
.ml-q-field { border: 1px solid #eef0f3; border-radius: 12px; margin-bottom: 8px; background: #fff; }
.ml-q-field > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.ml-q-field > summary::-webkit-details-marker { display: none; }
.ml-q-field > summary .fa-chevron-down { color: #9ca3af; font-size: .75rem; transition: transform .15s; }
.ml-q-field[open] > summary .fa-chevron-down { transform: rotate(180deg); }
.ml-q-title { font-weight: 700; font-size: .9rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-q-tag { font-size: .62rem; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: #eef4ff; color: #1d4ed8; vertical-align: 2px; }
.ml-q-sum { font-size: .75rem; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.ml-q-sum.is-on { color: #1d4ed8; font-weight: 700; }
.ml-q-body { padding: 0 12px 12px; }
.ml-q-body .form-control { border-radius: 10px; font-size: 16px; }

/* Folded groups in the filter sheet (awards, additional info) */
.ml-group { border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; margin: 18px 0; }
.ml-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; }
.ml-group > summary::-webkit-details-marker { display: none; }
.ml-group > summary > .fa-chevron-down { color: #9ca3af; font-size: .75rem; transition: transform .15s; }
.ml-group[open] > summary > .fa-chevron-down { transform: rotate(180deg); }
.ml-group-t { flex: 1; font-weight: 800; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.ml-group-t i { color: #6b7280; width: 16px; text-align: center; }
.ml-group-sum { font-size: .78rem; color: #9ca3af; white-space: nowrap; }
.ml-group-sum.is-on { color: #1d4ed8; font-weight: 700; }
.ml-group-body { padding: 0 14px 14px; }
.ml-group-note { font-size: .78rem; color: #6b7280; margin-bottom: 8px; }
.ml-group .ml-chip, .ml-group .ml-q-field { background: #fff; }
.ml-col-more .ml-group:first-child { margin-top: 0; }
.ml-col-more .ml-group + .ml-group { margin-top: 12px; }
.ml-sec-pair > div + div { margin-top: 20px; }
.ml-sheet .d-flex > .form-control { flex: 1 1 0; min-width: 0; }
.ml-sec-display .ml-switch { margin-top: 18px; }
/* Sort sits at the top of the sheet: a line under it rather than over it */
.ml-sec.ml-sec-display { border-top: 0; border-bottom: 1px solid #eef0f3; padding-top: 6px; margin-bottom: 4px; }
.ml-sec-display + .ml-sheet-cols .ml-col > .ml-sec:first-child { padding-top: 16px; }

/* Wider screens: badges in a row, the sheet as a wide centred panel in two columns */
@media (min-width: 768px) {
	.ml-row { padding: 11px 18px; }
	.ml-name { font-size: 1rem; }
	.ml-dob { display: inline; }
	.ml-side { flex-direction: row; align-items: center; gap: 12px; max-width: none; }
	.ml-sheet.offcanvas-bottom { max-width: 940px; max-height: 86vh; margin: 0 auto; }
	.ml-sheet .offcanvas-header { padding: 10px 26px 10px; }
	.ml-sheet .offcanvas-body { padding: 0 26px 6px; display: flex; flex-direction: column; overflow: hidden; }
	.ml-sheet-cols { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 0 28px; }
	.ml-col { overflow-y: auto; min-height: 0; padding-right: 4px; overscroll-behavior: contain; }
	.ml-col-more { padding-top: 4px; }
	.ml-sec-display { flex: 0 0 auto; }
	.ml-col-more .ml-group:first-child { margin-top: 0; }
	.ml-sec-display { display: flex; align-items: flex-end; gap: 28px; }
	.ml-sec-display .ml-seg-wrap { flex-wrap: nowrap; }
	.ml-sec-display .ml-seg-wrap button { flex: 1 1 0; }
	.ml-sec-display > div:first-child { flex: 1; }
	.ml-sec-display .ml-switch { margin: 0 0 6px; flex: 0 0 auto; }
	.ml-sheet-foot { justify-content: flex-end; padding: 12px 26px 16px; }
	.ml-sheet-foot .ml-btn-soft { flex: 0 0 140px; }
	.ml-sheet-foot .ml-btn-go { flex: 0 0 240px; }
}
@media (min-width: 1200px) {
	.ml-sheet.offcanvas-bottom { max-width: 1060px; }
	.ml-sec-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
	.ml-sec-pair > div + div { margin-top: 0; }
}

/* Filter sheet: a section still loading, or one that couldn't be loaded */
.ml-sec-wait, .ml-sec-fail { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--cd-muted); }
.ml-sec-fail { color: #b42318; }
.ml-sec-fail .btn-link { font-size: inherit; font-weight: 700; }
/* Awards search (shown when there are more than 10 awards) */
.ml-awards-q { position: relative; margin-bottom: 10px; }
.ml-awards-q i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: .8rem; pointer-events: none; }
.ml-awards-q input { padding-left: 30px; border-radius: 10px; background: #fff; }
.ml-awards-none { font-size: .85rem; color: var(--cd-muted); padding: 4px 2px; }

/* Categories: waiting-list categories start a new line, with a little gap above */
.ml-chips-break { flex-basis: 100%; height: 4px; }

/* Cards while filtering by award: the awards held and when they expire */
.ml-held { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 5px; }
.ml-aw { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: #12603f; background: #e8f6ef; border-radius: 999px; padding: 2px 9px 2px 8px; white-space: nowrap; }
.ml-aw i { font-size: .68rem; }
.ml-aw strong { font-weight: 700; }
.ml-aw.is-soon { color: #8a4b00; background: #fff4e5; }

/* Sort pill: a quick menu of sorts */
.ml-pill-caret { font-size: .6rem; opacity: .6; margin-left: 2px; }
.ml-pill.is-sort.is-expiry { color: #8a4b00; background: #fff4e5; border-color: #f6dcb0; }
.ml-sort-menu .dropdown-item i { width: 18px; color: #b26b00; }

/* Lapsed: how far back to look */
.ml-lapsed-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ml-lapsed-wrap.d-none { display: none !important; }
.ml-lapsed-lab { font-size: .82rem; color: var(--cd-muted); margin: 0; }
.ml-lapsed-wrap .form-select { width: auto; }

/* Category name on each card: bold, no colour dot */
.ml-cat { font-weight: 700; color: var(--cd-ink); }
/* Never signed in: a grey cloud with a line through */
.ml-nocloud { position: relative; display: inline-block; line-height: 1; color: #9ca3af; }
.ml-nocloud::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.3em; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 0 0 1.5px #fff; transform: translate(-50%, -50%) rotate(-40deg); }
.ml-apps .ml-seen-never { color: #9ca3af; }
.ml-chip .ml-nocloud, .ml-pill .ml-nocloud { margin-right: 2px; }
.ml-chip.is-on .ml-nocloud::after { box-shadow: 0 0 0 1.5px #eff6ff; }
/* Not current members (lapsed, waiting list): faded */
.ml-row.is-faded { opacity: .5; }
.ml-row.is-faded:hover, .ml-row.is-faded:focus-visible, .ml-row.is-faded.is-sel { opacity: .8; }

/* ── Member profile additions (users/club-member-profile.php) ──────
   Paste into member-profile.css (or layout.css). */
.mp-page { max-width: 980px; }                       /* same width as the member list */
.mp-item-inactive { opacity: .5; }                   /* inactive subscriptions */
.mp-key-ok   { background: var(--mp-ok); }            /* awards bar key */
.mp-key-warn { background: var(--mp-warn); }
.mp-key-bad  { background: var(--mp-bad); }

/* App activity card */
#mp-activity .cd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mp-act-seg { display: inline-flex; background: #f3f4f6; border-radius: 999px; padding: 2px; }
.mp-act-seg button { border: 0; background: none; font-size: .75rem; font-weight: 700; color: #6b7280; padding: 3px 10px; border-radius: 999px; }
.mp-act-seg button.is-on { background: #fff; color: #1d2433; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.mp-act-sum { font-size: .9rem; color: #374151; margin: 4px 0 10px; }
.mp-act-bars { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding-bottom: 1px; border-bottom: 1px solid #e5e7eb; }
.mp-act-bar { flex: 1 1 0; min-width: 2px; height: var(--h); background: #2a78d6; border-radius: 3px 3px 0 0; cursor: default; }
.mp-act-bar.is-zero { background: #e5e7eb; }
.mp-act-bar.is-untracked { background: repeating-linear-gradient(45deg, #f3f4f6 0 3px, #fff 3px 6px); height: 100%; opacity: .7; }
.mp-act-bar:hover, .mp-act-bar:focus-visible { filter: brightness(.85); outline: none; }
.mp-act-axis { display: flex; justify-content: space-between; font-size: .72rem; color: #9ca3af; margin-top: 4px; }

/* Small round "?" with a tooltip, next to a section heading */
.mp-sub-head-help { display: flex; align-items: center; gap: 8px; }
.mp-help-tip { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #d5d9e0; background: #fff; color: #6b7280; display: inline-grid; place-items: center; font-size: .62rem; padding: 0; line-height: 1; cursor: help; }
.mp-help-tip:hover, .mp-help-tip:focus-visible { color: #000; border-color: #aeb4bf; }
.mp-help-tip-chip { cursor: help; }
/* Not a current member: how their last membership ended */
.mp-past { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; font-size: .9rem; line-height: 1.4; }
.mp-past i { margin-top: 3px; }
.mp-past-ok { background: #e8f6ef; color: #12603f; }
.mp-past-warn { background: #fff4e5; color: #8a4b00; }
.mp-past-bad { background: #fdecec; color: #9b1c1c; }
.mp-past-muted { background: #f3f4f6; color: #4b5563; }

/* Membership card: Renewal links down to the Subscriptions card */
.mp-fact-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: inherit; text-align: left; }
.mp-fact-link > i { font-size: .7rem; color: #9ca3af; }
.mp-fact-linked { cursor: pointer; }   /* the whole box is clickable (stretched-link) */