/**
 * Te Hiku Events Calendar — front-end styles.
 *
 * Scoped under .thce-app / .thce- prefixes so the plugin sits inside any theme
 * without leaking styles.
 */

.thce-app,
.thce-single,
.thce-form,
.thce-daybox,
.thce-lightbox,
.thce-carousel,
.thce-tip {
	/*
	 * Design tokens. Each reads a --thce-brand-* / --thce-corner* value that
	 * Events → Settings writes onto :root, falling back to the defaults here.
	 * (Defining them directly on these elements used to shadow the :root
	 * values, which is why the colour settings had no visible effect.)
	 */
	--thce-dark: var(--thce-brand-dark, #14401f);
	--thce-accent: var(--thce-brand-accent, #3f7d41);
	--thce-highlight: var(--thce-brand-highlight, var(--thce-dark));
	--thce-highlight-ink: var(--thce-brand-highlight-ink, #fff);
	--thce-tint: var(--thce-brand-tint, var(--thce-tint));
	--thce-tint-soft: color-mix(in srgb, var(--thce-tint) 55%, #fff);
	--thce-ink: #1c2419;
	--thce-muted: #6b7566;
	--thce-line: #e3e6dd;
	--thce-bg: var(--thce-brand-bg, #faf9f4);
	--thce-card: #ffffff;
	--thce-radius: var(--thce-corner, 12px);
	--thce-radius-sm: var(--thce-corner-sm, 8px);
	--thce-radius-xs: var(--thce-corner-xs, 4px);
	--thce-radius-btn: var(--thce-button-corner, var(--thce-radius-sm));
	--thce-radius-pill: var(--thce-button-corner, 999px);
	--thce-shadow: var(--thce-brand-shadow, 0 1px 2px rgba(20, 40, 20, .06), 0 8px 24px rgba(20, 40, 20, .05));

	box-sizing: border-box;
	color: var(--thce-ink);
	font-size: 15px;
	line-height: 1.5;
}

.thce-app *,
.thce-app *::before,
.thce-app *::after,
.thce-form *,
.thce-single * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ layout */

.thce-app {
	position: relative;
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr) 280px;
	gap: 24px;
	align-items: start;
	background: var(--thce-bg);
	padding: 24px;
	border-radius: var(--thce-radius);
}

.thce-app--no-sidebar {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.thce-app--no-rail {
	grid-template-columns: 250px minmax(0, 1fr);
}

.thce-app--no-sidebar.thce-app--no-rail {
	grid-template-columns: minmax(0, 1fr);
}

.thce-main {
	min-width: 0;
}

/* ----------------------------------------------------------------- sidebar */

.thce-sidebar__inner {
	background: var(--thce-card);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	padding: 18px;
	box-shadow: var(--thce-shadow);
}

.thce-sidebar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.thce-sidebar__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-sidebar__close {
	display: none;
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: var(--thce-muted);
}

.thce-search {
	position: relative;
	margin-bottom: 20px;
}

.thce-search__input {
	width: 100%;
	padding: 9px 34px 9px 12px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	font-size: 14px;
	background: #fff;
	color: inherit;
}

.thce-search__input:focus {
	outline: 2px solid var(--thce-accent);
	outline-offset: 1px;
	border-color: var(--thce-accent);
}

.thce-search__icon {
	position: absolute;
	right: 10px;
	top: 50%;
	width: 17px;
	height: 17px;
	transform: translateY(-50%);
	color: var(--thce-muted);
	pointer-events: none;
}

.thce-facet {
	margin-bottom: 20px;
}

.thce-facet__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.thce-facet__title {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.thce-checklist__item + .thce-checklist__item {
	margin-top: 2px;
}

.thce-checklist__item--rule {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--thce-line);
}

.thce-checklist label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 2px;
	cursor: pointer;
	font-size: 14px;
	border-radius: var(--thce-radius-xs);
}

.thce-checklist label:hover {
	background: rgba(63, 125, 65, .06);
}

.thce-checklist__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thce-checklist input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.thce-check {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	border: 1.5px solid var(--thce-line);
	border-radius: var(--thce-radius-xs);
	background: #fff;
	position: relative;
}

.thce-checklist input:checked + .thce-check {
	background: var(--thce-accent);
	border-color: var(--thce-accent);
}

.thce-checklist input:checked + .thce-check::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.thce-checklist input:focus-visible + .thce-check {
	outline: 2px solid var(--thce-accent);
	outline-offset: 2px;
}

.thce-dot {
	flex: 0 0 auto;
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--thce-cat, var(--thce-accent));
}

.thce-dot--hollow {
	background: transparent;
	border: 1.5px solid var(--thce-muted);
}

.thce-daterange {
	display: flex;
	align-items: center;
	gap: 6px;
}

.thce-daterange input {
	flex: 1 1 0;
	min-width: 0;
	padding: 7px 8px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	font-size: 13px;
	background: #fff;
	color: inherit;
}

.thce-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	font-size: 14px;
	background: #fff;
	color: inherit;
}

.thce-filter-summary {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--thce-line);
	font-size: 13px;
	color: var(--thce-muted);
	display: grid;
	gap: 2px;
}

.thce-link {
	border: 0;
	background: none;
	padding: 0;
	font-size: 13px;
	color: var(--thce-accent);
	text-decoration: underline;
	cursor: pointer;
}

.thce-link--center {
	display: block;
	margin: 12px auto 0;
}

/* -------------------------------------------------------------- main head */

.thce-title {
	margin: 0;
	font-size: 34px;
	line-height: 1.15;
	font-weight: 800;
	color: var(--thce-dark);
	letter-spacing: -.01em;
}

.thce-subtitle {
	margin: 4px 0 0;
	color: var(--thce-muted);
	font-size: 15px;
}

.thce-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 18px 0 14px;
}

.thce-views {
	display: inline-flex;
	gap: 4px;
	background: var(--thce-tint);
	padding: 4px;
	border-radius: var(--thce-radius-pill);
}

.thce-views__btn {
	border: 0;
	background: none;
	padding: 7px 18px;
	border-radius: var(--thce-radius-pill);
	font-size: 14px;
	font-weight: 600;
	color: var(--thce-muted);
	cursor: pointer;
}

.thce-views__btn.is-active {
	background: var(--thce-dark);
	color: #fff;
}

.thce-nav {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.thce-nav__label {
	min-width: 168px;
	text-align: center;
	font-size: 19px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-nav__arrow {
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--thce-line);
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	color: var(--thce-ink);
}

.thce-nav__arrow svg {
	width: 16px;
	height: 16px;
}

.thce-nav__arrow:hover {
	border-color: var(--thce-accent);
	color: var(--thce-accent);
}

.thce-nav__jump {
	order: 3;
	padding: 6px 14px;
	border: 1px solid var(--thce-line);
	background: #fff;
	border-radius: var(--thce-radius-btn);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: var(--thce-ink);
}

/* ------------------------------------------------------------- viewport */

.thce-viewport {
	background: var(--thce-card);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	overflow: hidden;
	box-shadow: var(--thce-shadow);
	transition: opacity .15s ease;
	container: thce-view / inline-size;
}

.thce-viewport.is-loading {
	opacity: .55;
}

.thce-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 60px 20px;
	color: var(--thce-muted);
	font-size: 14px;
}

.thce-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--thce-line);
	border-top-color: var(--thce-accent);
	border-radius: 50%;
	animation: thce-spin .8s linear infinite;
}

@keyframes thce-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.thce-spinner { animation-duration: 3s; }
}

.thce-empty {
	padding: 56px 24px;
	text-align: center;
	color: var(--thce-muted);
}

.thce-empty__title {
	margin: 0 0 4px;
	font-weight: 600;
	color: var(--thce-ink);
}

.thce-empty__hint {
	margin: 0 0 16px;
	font-size: 14px;
}

/* ---------------------------------------------------------------- month */

.thce-month__head {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	background: var(--thce-tint-soft);
	border-bottom: 1px solid var(--thce-line);
}

.thce-month__dow {
	padding: 9px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--thce-muted);
	text-align: center;
}

.thce-month__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	grid-auto-rows: minmax(96px, auto);
}

.thce-month__cell {
	border-right: 1px solid var(--thce-line);
	border-bottom: 1px solid var(--thce-line);
	padding: 6px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.thce-month__cell:nth-child(7n) {
	border-right: 0;
}

.thce-month__cell.is-outside {
	background: #fbfbf8;
	color: #b6bcb0;
}

.thce-month__cell.is-today .thce-month__num {
	background: var(--thce-highlight);
	color: var(--thce-highlight-ink);
}

.thce-month__num {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: inherit;
	cursor: pointer;
}

.thce-month__num:hover {
	background: color-mix(in srgb, var(--thce-accent) 14%, transparent);
}

.thce-month__summary {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
	margin: 0;
	padding: 2px 4px 4px;
	border: 0;
	border-radius: var(--thce-radius-xs);
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.thce-month__summary:hover,
.thce-month__summary:focus-visible {
	background: var(--thce-tint-soft);
}

.thce-month__summary:hover .thce-month__count {
	text-decoration: underline;
}

.thce-month__cell.has-events {
	cursor: pointer;
}

.thce-month__count {
	font-size: 12px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-month__dots {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
}

.thce-month__items {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.thce-month__item {
	display: flex;
	align-items: center;
	gap: 5px;
	border: 0;
	background: none;
	padding: 1px 2px;
	text-align: left;
	font-size: 11.5px;
	line-height: 1.25;
	color: var(--thce-cat, var(--thce-ink));
	cursor: pointer;
	border-radius: var(--thce-radius-xs);
	min-width: 0;
}

.thce-month__item:hover {
	background: rgba(63, 125, 65, .1);
	background: color-mix(in srgb, var(--thce-cat, #3f7d41) 12%, transparent);
}

.thce-month__item-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.thce-month__more {
	font-size: 11px;
	color: var(--thce-muted);
	padding-left: 2px;
}

/* ----------------------------------------------------------------- week */

/*
 * Agenda week: seven day columns, each a stacked list of cards in time order.
 * Columns wrap onto further rows as space runs out, so nothing is ever squeezed
 * into slivers or forced to overlap.
 */
.thce-wk {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	background: var(--thce-card);
}

.thce-wk__day {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 220px;
	border-right: 1px solid var(--thce-line);
}

.thce-wk__day:last-child {
	border-right: 0;
}

.thce-wk__day.is-today {
	background: var(--thce-tint-soft);
}

.thce-wk__head {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "dow count" "date count";
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 10px 10px 8px;
	border: 0;
	border-bottom: 1px solid var(--thce-line);
	border-radius: 0;
	background: var(--thce-tint);
	color: var(--thce-dark);
	font: inherit;
	text-align: left;
}

button.thce-wk__head {
	cursor: pointer;
}

button.thce-wk__head:hover,
button.thce-wk__head:focus-visible {
	background: color-mix(in srgb, var(--thce-tint) 70%, var(--thce-accent) 30%);
}

.thce-wk__dow {
	grid-area: dow;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--thce-muted);
}

.thce-wk__date {
	grid-area: date;
	display: inline-flex;
	align-items: center;
	height: 34px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.thce-wk__day.is-today .thce-wk__date {
	justify-self: start;
	justify-content: center;
	width: 34px;
	font-size: 18px;
	background: var(--thce-highlight);
	color: var(--thce-highlight-ink);
	border-radius: 50%;
}

.thce-wk__count {
	grid-area: count;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: 50%;
	line-height: 1;
	background: var(--thce-dark);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.thce-wk__count:empty {
	display: none;
}

.thce-wk__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
}

.thce-wk__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	margin: 0;
	padding: 7px 8px 8px 9px;
	border: 0;
	border-left: 3px solid var(--thce-cat, var(--thce-accent));
	border-radius: var(--thce-radius-xs);
	background: color-mix(in srgb, var(--thce-cat, #3f7d41) 9%, #fff);
	color: var(--thce-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background .12s;
}

.thce-wk__item:hover,
.thce-wk__item:focus-visible {
	background: color-mix(in srgb, var(--thce-cat, #3f7d41) 20%, #fff);
}

.thce-wk__item:focus-visible {
	outline: 2px solid var(--thce-accent);
	outline-offset: 1px;
}

.thce-wk__time {
	font-size: 11px;
	font-weight: 700;
	color: var(--thce-dark);
	white-space: nowrap;
}

.thce-wk__name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: break-word;
	hyphens: auto;
}

.thce-wk__more {
	align-self: flex-start;
	margin: 2px 0 0;
	padding: 4px 8px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-pill);
	background: var(--thce-card);
	color: var(--thce-accent);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.thce-wk__more:hover {
	border-color: var(--thce-accent);
}

.thce-wk__none {
	padding: 4px 2px;
	font-size: 12px;
	color: #b6bcb0;
}

/* Narrower containers: two rows of days, then a single readable column. */
@container thce-view (max-width: 760px) {
	.thce-wk {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.thce-wk__day {
		border-bottom: 1px solid var(--thce-line);
	}
}

@container thce-view (max-width: 480px) {
	.thce-wk {
		grid-template-columns: minmax(0, 1fr);
	}

	.thce-wk__day {
		min-height: 0;
		border-right: 0;
	}

	.thce-wk__day.is-empty {
		display: none;
	}
}

/* ---- hover tooltip ---------------------------------------------------- */

.thce-tip {
	position: fixed;
	z-index: 10002;
	max-width: 260px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--thce-line, #e3e6dd);
	border-left: 3px solid var(--thce-cat, #3f7d41);
	border-radius: var(--thce-radius-sm);
	box-shadow: 0 6px 24px rgba(20, 40, 20, .16);
	font-size: 12.5px;
	line-height: 1.35;
	color: #1c2419;
	pointer-events: none;
}

.thce-tip[hidden] {
	display: none;
}

.thce-tip__title {
	font-size: 13.5px;
	font-weight: 700;
	color: #14401f;
}

.thce-tip__row {
	color: #6b7566;
}

/* ----------------------------------------------------------------- list */

.thce-list__group {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	border-bottom: 1px solid var(--thce-line);
}

.thce-list__group:last-child {
	border-bottom: 0;
}

.thce-list__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 14px 8px;
	background: #f7f8f3;
	border-right: 1px solid var(--thce-line);
	position: sticky;
	top: 0;
	align-self: start;
}

.thce-list__dow {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--thce-muted);
}

.thce-list__day {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.05;
	color: var(--thce-dark);
}

.thce-list__month {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--thce-muted);
}

.thce-list__rows {
	min-width: 0;
}

.thce-list__row {
	display: grid;
	grid-template-columns: 118px 132px minmax(0, 1fr) 150px 72px;
	gap: 12px;
	align-items: center;
	width: 100%;
	padding: 11px 14px;
	border: 0;
	border-bottom: 1px solid var(--thce-line);
	background: none;
	text-align: left;
	cursor: pointer;
	font-size: 13px;
	color: inherit;
}

.thce-list__rows > .thce-list__row:last-child {
	border-bottom: 0;
}

.thce-list__row:hover {
	background: rgba(63, 125, 65, .05);
}

.thce-list__time {
	font-weight: 600;
	color: var(--thce-muted);
	white-space: nowrap;
}

.thce-list__main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.thce-list__title {
	font-weight: 700;
	color: var(--thce-ink);
}

.thce-list__excerpt {
	color: var(--thce-muted);
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thce-list__where {
	color: var(--thce-muted);
	font-size: 12.5px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thce-list__meta {
	text-align: right;
}

/* ---------------------------------------------------------- pills, badges */

.thce-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--thce-cat, var(--thce-accent));
	white-space: nowrap;
}

.thce-badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: var(--thce-radius-xs);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .03em;
	background: var(--thce-tint);
	color: var(--thce-muted);
}

.thce-badge--free {
	background: #e3f2e0;
	color: #2c6b2f;
}

.thce-badge--featured {
	background: var(--thce-brand-highlight, #fdf3d6);
	color: var(--thce-brand-highlight-ink, #8a6a10);
}

.thce-tag {
	display: inline-block;
	padding: 3px 9px;
	border-radius: var(--thce-radius-pill);
	background: var(--thce-tint);
	color: var(--thce-muted);
	font-size: 11.5px;
	margin: 0 4px 4px 0;
}

.thce-chip {
	display: inline-block;
	padding: 5px 11px;
	margin: 0 5px 5px 0;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-pill);
	background: #fff;
	font-size: 12px;
	cursor: pointer;
	color: inherit;
}

.thce-chip:hover {
	border-color: var(--thce-accent);
	color: var(--thce-accent);
}

/* ---------------------------------------------------------------- legend */

.thce-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 12px 4px 0;
	font-size: 12px;
	color: var(--thce-muted);
}

.thce-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* --------------------------------------------------------------- weekend */

.thce-weekend {
	margin-top: 22px;
}

.thce-weekend__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
}

.thce-weekend__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-weekend__title span {
	font-weight: 500;
	color: var(--thce-muted);
	font-size: 13px;
}

.thce-weekend__scroller {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(190px, 1fr);
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 6px;
	scroll-snap-type: x proximity;
}

.thce-ecard {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	background: #fff;
	overflow: hidden;
	padding: 0;
	cursor: pointer;
	text-align: left;
	scroll-snap-align: start;
	color: inherit;
	box-shadow: var(--thce-shadow);
}

.thce-ecard:hover {
	border-color: var(--thce-accent);
}

.thce-ecard__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--thce-tint);
	overflow: hidden;
}

.thce-ecard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.thce-ecard__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 12px 12px;
}

.thce-ecard__date {
	font-size: 11px;
	font-weight: 700;
	color: var(--thce-muted);
	letter-spacing: .04em;
}

.thce-ecard__date strong {
	font-size: 15px;
	color: var(--thce-dark);
}

.thce-ecard__title {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	color: var(--thce-ink);
}

.thce-ecard__meta {
	font-size: 12px;
	color: var(--thce-muted);
}

/* ------------------------------------------------------------------ rail */

.thce-rail {
	display: grid;
	gap: 16px;
}

.thce-card {
	background: var(--thce-card);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	padding: 16px;
	box-shadow: var(--thce-shadow);
}

.thce-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}

.thce-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-card__text {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--thce-muted);
}

/* --------------------------------------------------- upcoming highlights */

/*
 * A dark brand band with image-led cards. Two placements share the cards:
 * --rail (stacked in the right-hand column) and --top (a full-width row above
 * the calendar). --standalone is the [te_hiku_event_highlights] shortcode.
 */
.thce-highlights {
	background: var(--thce-dark);
	border-radius: var(--thce-radius);
	box-shadow: var(--thce-shadow);
	overflow: hidden;
	color: #fff;
}

.thce-highlights[hidden] {
	display: none;
}

.thce-highlights__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px;
}

.thce-highlights__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
}

.thce-highlights__title svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	color: var(--thce-brand-highlight, #f2c94c);
}

.thce-highlights__all {
	padding: 0;
	border: 0;
	background: none;
	color: var(--thce-brand-highlight, #fff);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	white-space: nowrap;
}

.thce-highlights__all:hover {
	color: #fff;
}

.thce-highlights__list {
	display: grid;
	gap: 12px;
	padding: 0 12px 12px;
}

.thce-hcard {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--thce-radius-sm);
	background: var(--thce-card);
	color: var(--thce-ink);
	font: inherit;
	text-align: left;
	text-decoration: none;
	overflow: hidden;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}

.thce-hcard:hover,
.thce-hcard:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.thce-hcard:focus-visible {
	outline: 3px solid var(--thce-brand-highlight, #fff);
	outline-offset: 2px;
}

.thce-hcard__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: color-mix(in srgb, var(--thce-cat, var(--thce-accent)) 75%, #000);
}

.thce-hcard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.thce-hcard:hover .thce-hcard__media img {
	transform: scale(1.05);
}

.thce-hcard__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(circle at 75% 25%, rgba(255, 255, 255, .18), transparent 55%),
		linear-gradient(135deg, var(--thce-cat, var(--thce-accent)), color-mix(in srgb, var(--thce-cat, var(--thce-accent)) 55%, #000));
	color: rgba(255, 255, 255, .9);
}

.thce-hcard__placeholder svg {
	width: 44px;
	height: 44px;
	fill: currentColor;
}

.thce-hcard__date {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	padding: 5px 6px 6px;
	border-radius: var(--thce-radius-xs);
	background: var(--thce-brand-highlight, #fff);
	color: var(--thce-brand-highlight-ink, var(--thce-dark));
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .08em;
	line-height: 1;
	font-variant-numeric: lining-nums;
}

.thce-hcard__date strong {
	margin-top: 2px;
	font-size: 22px;
	letter-spacing: 0;
}

.thce-hcard__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 11px 13px 13px;
	border-top: 3px solid var(--thce-cat, var(--thce-accent));
}

.thce-hcard__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--thce-muted);
}

.thce-hcard__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--thce-dark);
}

.thce-hcard__meta {
	overflow: hidden;
	font-size: 12.5px;
	color: var(--thce-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Right-hand column: a compact heading and shorter images keep it in proportion. */
.thce-highlights--rail .thce-highlights__all-more {
	display: none;
}

.thce-highlights--rail .thce-hcard__media {
	aspect-ratio: 2 / 1;
}

.thce-highlights--rail .thce-highlights__head {
	padding: 13px 14px 11px;
}

.thce-highlights--rail .thce-highlights__title {
	font-size: 15px;
	white-space: nowrap;
}

/* Full-width row above the calendar. */
.thce-highlights--top {
	margin: 18px 0 2px;
}

.thce-highlights--top .thce-highlights__head {
	padding: 16px 18px 12px;
}

.thce-highlights--top .thce-highlights__title {
	font-size: 19px;
}

.thce-highlights--top .thce-highlights__list {
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	padding: 0 16px 16px;
}

.thce-highlights--top .thce-hcard__media {
	aspect-ratio: auto;
	height: 170px;
}

/* Narrow screens: a swipeable row rather than a tall stack. */
@container thce-hl (max-width: 560px) {
	.thce-highlights--top .thce-highlights__list {
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: 78%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		overscroll-behavior-x: contain;
	}

	.thce-highlights--top .thce-hcard {
		scroll-snap-align: start;
	}
}

.thce-highlights--top {
	container: thce-hl / inline-size;
}

.thce-highlights--standalone .thce-highlights__list {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.thce-plan {
	/* Light, so the Upcoming Highlights band is the one dark block. */
	background: var(--thce-tint);
	color: var(--thce-dark);
	border-color: var(--thce-tint);
	text-align: left;
}

.thce-plan__icon svg {
	width: 34px;
	height: 34px;
	color: var(--thce-dark);
}

.thce-plan__title {
	margin: 8px 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-plan__blurb {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--thce-ink);
	line-height: 1.4;
}

.thce-plan .thce-btn--light {
	background: var(--thce-dark);
	color: #fff;
}

.thce-plan .thce-btn--light:hover {
	background: var(--thce-accent);
	color: #fff;
}

/* --------------------------------------------------------------- buttons */

.thce-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: var(--thce-radius-btn);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
}

.thce-btn--primary {
	background: var(--thce-dark);
	color: #fff;
}

.thce-btn--primary:hover {
	background: var(--thce-accent);
	color: #fff;
}

.thce-btn--ghost {
	background: #fff;
	border-color: var(--thce-line);
	color: var(--thce-ink);
}

.thce-btn--ghost:hover {
	border-color: var(--thce-accent);
	color: var(--thce-accent);
}

.thce-btn--light {
	background: #fff;
	color: var(--thce-dark);
}

.thce-btn--block {
	display: flex;
	width: 100%;
}

.thce-btn--sm {
	padding: 7px 13px;
	font-size: 13px;
}

.thce-btn[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

/* ----------------------------------------------------------------- panel */

.thce-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100%);
	background: #fff;
	border-left: 1px solid var(--thce-line);
	box-shadow: -12px 0 40px rgba(20, 40, 20, .12);
	padding: 22px 22px 40px;
	overflow-y: auto;
	z-index: 10000;
}

.thce-panel__close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: var(--thce-muted);
	cursor: pointer;
}

.thce-panel__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
	padding-right: 30px;
}

.thce-panel__title {
	margin: 0 0 14px;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 800;
	color: var(--thce-dark);
}

.thce-panel__title:focus {
	outline: none;
}

.thce-panel {
	container-type: inline-size;
}

/* Details and gallery stack by default. They only sit side by side when the
   event actually has images and the panel is wide enough for both — on
   desktop the panel lives in the ~280px rail column, where a reserved 150px
   image column left the dates and address about 56px to wrap into. */
.thce-panel__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

@container (min-width: 400px) {
	.thce-panel__top:has(.thce-panel__media) {
		grid-template-columns: minmax(0, 1fr) 150px;
	}
}

.thce-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 9px;
	font-size: 13.5px;
}

.thce-facts li {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 7px;
	align-items: start;
}

.thce-facts__icon {
	font-size: 13px;
	line-height: 1.4;
}

.thce-facts a {
	color: var(--thce-accent);
}

.thce-panel__media {
	position: relative;
	border-radius: var(--thce-radius-sm);
	overflow: hidden;
	background: var(--thce-tint);
}

.thce-panel__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.thce-panel__dots {
	position: absolute;
	bottom: 6px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 5px;
}

.thce-panel__dot {
	width: 6px;
	height: 6px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	cursor: pointer;
}

.thce-panel__dot.is-active {
	background: #fff;
}

.thce-costbox {
	display: grid;
	gap: 2px;
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: var(--thce-radius-sm);
	background: var(--thce-tint-soft);
	font-size: 13px;
}

.thce-costbox strong {
	color: var(--thce-dark);
}

.thce-costbox span {
	color: var(--thce-muted);
}

.thce-panel__section {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--thce-line);
}

.thce-panel__h3 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-panel__content {
	font-size: 14px;
	line-height: 1.6;
}

.thce-panel__content p {
	margin: 0 0 10px;
}

.thce-panel__note {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--thce-muted);
}

.thce-tags {
	margin-top: 10px;
}

.thce-organiser {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	margin-bottom: 12px;
}

.thce-organiser__logo {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--thce-tint);
	display: block;
}

.thce-organiser__body {
	display: grid;
	gap: 3px;
	font-size: 13px;
	min-width: 0;
}

.thce-organiser__body a {
	color: var(--thce-accent);
	word-break: break-word;
}

.thce-share {
	display: flex;
	gap: 8px;
}

.thce-share__btn {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--thce-line);
	border-radius: 50%;
	background: #fff;
	color: var(--thce-ink);
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}

.thce-share__btn:hover {
	border-color: var(--thce-accent);
	color: var(--thce-accent);
}

.thce-panel__actions {
	display: grid;
	gap: 8px;
	margin-top: 22px;
}

.thce-addcal {
	position: relative;
}

.thce-addcal__menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	background: #fff;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	box-shadow: var(--thce-shadow);
	overflow: hidden;
	z-index: 5;
}

.thce-addcal__menu a {
	display: block;
	padding: 9px 14px;
	font-size: 13.5px;
	color: var(--thce-ink);
	text-decoration: none;
}

.thce-addcal__menu a:hover {
	background: var(--thce-tint-soft);
	color: var(--thce-dark);
}

.thce-otherdates {
	display: flex;
	flex-wrap: wrap;
}

.thce-scrim {
	position: fixed;
	inset: 0;
	background: rgba(16, 26, 16, .38);
	z-index: 9999;
}

/* ------------------------------------------------------------------- map */

.thce-map {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 268px;
	min-height: 520px;
}

.thce-map__stage {
	position: relative;
	min-height: 520px;
	container: thce-mapstage / inline-size;
}

/* The "Key" button only appears on narrow maps (see the container query below). */
.thce-map__keytoggle {
	display: none;
}

.thce-map__keytoggle:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.thce-map__keytoggle:focus-visible {
	outline: 2px solid var(--thce-accent);
	outline-offset: -2px;
}

@container thce-mapstage (max-width: 560px) {
	.thce-map__stage .thce-map__controls {
		top: 10px;
		left: 10px;
		max-width: min(240px, calc(100% - 20px));
		padding: 0;
		overflow: hidden;
	}

	.thce-map__keytoggle {
		display: flex;
		align-items: center;
		gap: 7px;
		margin: 0;
		padding: 8px 11px;
		border: 0;
		background: none;
		color: var(--thce-dark);
		font: inherit;
		font-size: 13px;
		font-weight: 700;
		cursor: pointer;
	}

	.thce-map__keytoggle svg {
		width: 16px;
		height: 16px;
		transition: transform .15s;
	}

	.thce-map__stage .thce-map__controls.is-open .thce-map__keytoggle svg {
		transform: rotate(180deg);
	}

	.thce-map__keydots {
		display: inline-flex;
		gap: 3px;
	}

	.thce-map__keydots .thce-dot {
		width: 8px;
		height: 8px;
	}

	.thce-map__stage .thce-map__controlsbody {
		display: none;
		padding: 0 12px 10px;
		border-top: 1px solid var(--thce-line);
	}

	.thce-map__stage .thce-map__controls.is-open .thce-map__controlsbody {
		display: block;
		padding-top: 8px;
	}

	.thce-map__stage .thce-map__controls.is-open .thce-map__legend {
		max-height: 40vh;
	}
}

.thce-map__canvas {
	position: absolute;
	inset: 0;
	background: #e8eef1;
}

.thce-map__controls {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: rgba(255, 255, 255, .96);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	padding: 10px 12px;
	box-shadow: var(--thce-shadow);
	max-width: 210px;
	font-size: 12px;
}

.thce-map__toggle {
	display: flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	font-weight: 600;
	color: var(--thce-dark);
}

.thce-map__toggle--switch {
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--thce-line);
}

.thce-map__toggle--switch input {
	position: absolute;
	opacity: 0;
}

.thce-switch {
	width: 32px;
	height: 18px;
	border-radius: 999px;
	background: #ccd2c6;
	position: relative;
	transition: background .15s ease;
	flex: 0 0 auto;
}

.thce-switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
}

.thce-map__toggle--switch input:checked ~ .thce-switch {
	background: var(--thce-accent);
}

.thce-map__toggle--switch input:checked ~ .thce-switch::after {
	transform: translateX(14px);
}

.thce-map__legend {
	display: grid;
	gap: 5px;
	margin-top: 10px;
	max-height: 190px;
	overflow-y: auto;
}

.thce-map__side {
	border-left: 1px solid var(--thce-line);
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: #fcfcf9;
}

.thce-map__sidehead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--thce-line);
}

.thce-map__sidehead h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-map__count {
	font-size: 12px;
	color: var(--thce-muted);
	white-space: nowrap;
}

.thce-map__list {
	overflow-y: auto;
	max-height: 520px;
	padding: 8px;
	display: grid;
	gap: 8px;
	align-content: start;
}

.thce-map__empty {
	padding: 20px 12px;
	color: var(--thce-muted);
	font-size: 13px;
	text-align: center;
}

.thce-mcard {
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr);
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	background: #fff;
	text-align: left;
	cursor: pointer;
	color: inherit;
}

.thce-mcard:hover {
	border-color: var(--thce-accent);
}

.thce-mcard__media {
	display: block;
	width: 62px;
	height: 56px;
	border-radius: var(--thce-radius-xs);
	overflow: hidden;
	background: var(--thce-tint);
}

.thce-mcard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.thce-mcard__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.thce-mcard__title {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
}

.thce-mcard__meta {
	font-size: 11.5px;
	color: var(--thce-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thce-mcard .thce-badge {
	align-self: flex-start;
	margin-top: 2px;
}

/* Map marker elements (advanced markers render these as marker content). */
.thce-pin {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--thce-cat, #3f7d41);
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
	cursor: pointer;
}

.thce-cluster {
	min-width: 36px;
	height: 36px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--thce-cat, #3f7d41);
	border: 3px solid #fff;
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
	cursor: pointer;
}

/* --------------------------------------------------------- filter toggle */

.thce-filter-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-btn);
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: var(--thce-ink);
}

.thce-filter-toggle svg {
	width: 18px;
	height: 18px;
}

.thce-filter-toggle__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	background: var(--thce-accent);
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	line-height: 1;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1200px) {
	.thce-app {
		grid-template-columns: 230px minmax(0, 1fr);
	}

	.thce-rail {
		grid-column: 1 / -1;
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}

	.thce-list__row {
		grid-template-columns: 106px 118px minmax(0, 1fr) 120px;
	}

	.thce-list__meta {
		display: none;
	}
}

@media (max-width: 900px) {
	.thce-app {
		grid-template-columns: minmax(0, 1fr);
		padding: 16px;
		gap: 16px;
	}

	.thce-filter-toggle {
		display: inline-flex;
	}

	.thce-sidebar {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(320px, 88vw);
		z-index: 10001;
		transform: translateX(-102%);
		transition: transform .2s ease;
		overflow-y: auto;
		padding: 12px;
		background: var(--thce-bg);
	}

	.thce-filters-open .thce-sidebar {
		transform: translateX(0);
	}

	.thce-sidebar__close {
		display: block;
	}

	.thce-title {
		font-size: 26px;
	}

	.thce-toolbar {
		gap: 10px;
	}

	.thce-nav__label {
		min-width: 130px;
		font-size: 16px;
	}

	.thce-month__grid {
		grid-auto-rows: minmax(74px, auto);
	}

	.thce-month__item-title,
	.thce-month__count {
		font-size: 10.5px;
	}

	.thce-list__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
		padding: 12px 14px;
	}

	.thce-list__where,
	.thce-list__excerpt {
		white-space: normal;
	}

	.thce-map {
		grid-template-columns: minmax(0, 1fr);
	}

	.thce-map__side {
		border-left: 0;
		border-top: 1px solid var(--thce-line);
	}

	.thce-map__list {
		max-height: 320px;
	}

	.thce-panel {
		width: 100%;
		top: auto;
		height: 88vh;
		border-radius: var(--thce-radius) var(--thce-radius) 0 0;
		border-left: 0;
	}
}

@media (min-width: 901px) {
	.thce-scrim {
		display: none;
	}

	.thce-panel {
		position: sticky;
		top: calc(var(--thce-sticky-offset, 0px) + 20px);
		height: calc(100vh - var(--thce-sticky-offset, 0px) - 40px);
		grid-column: 3;
		grid-row: 1 / span 3;
		border-radius: var(--thce-radius);
		box-shadow: var(--thce-shadow);
		z-index: 5;
	}

	.thce-panel-open .thce-rail {
		display: none;
	}

	.thce-app--no-rail .thce-panel,
	.thce-app--no-sidebar .thce-panel {
		position: fixed;
		top: 0;
		height: 100vh;
		border-radius: 0;
	}
}

/* ---------------------------------------------------------- search bar */

.thce-findbar {
	position: relative;
	margin: 18px 0 0;
}

.thce-findbar__row {
	display: flex;
	gap: 10px;
}

.thce-findbar__search {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.thce-findbar__icon {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 18px;
	height: 18px;
	color: var(--thce-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.thce-findbar__input {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px 0 42px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	background: var(--thce-card);
	color: var(--thce-ink);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}

.thce-findbar__input:focus {
	outline: 2px solid var(--thce-accent);
	outline-offset: -1px;
	border-color: transparent;
}

.thce-findbar__toggle {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--thce-dark);
	border-radius: var(--thce-radius-btn);
	background: var(--thce-card);
	color: var(--thce-dark);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.thce-findbar__toggle svg {
	width: 18px;
	height: 18px;
}

.thce-findbar__toggle:hover,
.thce-findbar__toggle[aria-expanded="true"] {
	background: var(--thce-dark);
	color: #fff;
}

.thce-findbar__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--thce-highlight);
	color: var(--thce-highlight-ink);
	font-size: 11px;
	line-height: 1;
}

.thce-findbar__count[hidden] {
	display: none;
}

/* Active filter chips */
.thce-findbar__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}

.thce-findbar__chips[hidden] {
	display: none;
}

.thce-fchip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 8px 5px 11px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-pill);
	background: var(--thce-card);
	color: var(--thce-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.thce-fchip:hover {
	border-color: var(--thce-dark);
}

.thce-fchip__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--thce-tint);
	color: var(--thce-dark);
	font-size: 14px;
	line-height: 1;
}

.thce-fchip:hover .thce-fchip__x {
	background: var(--thce-dark);
	color: #fff;
}

.thce-fchip__clear {
	margin-left: 4px;
}

/* The dropdown panel */
.thce-findbar__panel {
	display: none;
	position: absolute;
	top: calc(46px + 8px);
	right: 0;
	left: 0;
	z-index: 30;
	padding: 20px 22px 16px;
	background: var(--thce-card);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	box-shadow: 0 18px 40px rgba(10, 30, 10, .16);
}

.thce-filters-open .thce-findbar__panel {
	display: block;
}

.thce-findbar__panelhead {
	display: none;
}

.thce-findbar__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 22px 28px;
}

.thce-findbar__side {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.thce-findbar__group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.thce-findbar__label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--thce-muted);
}

/* Toggle pills: a visually hidden checkbox inside a label */
.thce-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.thce-pick {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.thce-pick input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.thce-pick__body {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-pill);
	background: var(--thce-card);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--thce-ink);
	transition: background .12s, border-color .12s;
}

.thce-pick:hover .thce-pick__body {
	border-color: var(--thce-cat, var(--thce-dark));
}

.thce-pick input:checked + .thce-pick__body {
	border-color: var(--thce-cat, var(--thce-dark));
	background: color-mix(in srgb, var(--thce-cat, var(--thce-dark)) 14%, #fff);
	color: var(--thce-dark);
}

.thce-pick input:checked + .thce-pick__body::after {
	content: "\2713";
	font-size: 12px;
	font-weight: 800;
	color: var(--thce-cat, var(--thce-dark));
}

.thce-pick input:focus-visible + .thce-pick__body {
	outline: 2px solid var(--thce-accent);
	outline-offset: 2px;
}

.thce-findbar__foot {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid var(--thce-line);
}

.thce-findbar__showing {
	flex: 1 1 auto;
	font-size: 13px;
	color: var(--thce-muted);
}

.thce-findbar__showing span + span::before {
	content: " · ";
}

.thce-findbar__foot .thce-btn {
	margin-left: auto;
}

/* Bar layout: no sidebar column, so the event panel takes the rail's place. */
@media (min-width: 1201px) {
	.thce-app--filterbar.thce-app--no-sidebar .thce-panel {
		position: sticky;
		top: calc(var(--thce-sticky-offset, 0px) + 20px);
		height: calc(100vh - var(--thce-sticky-offset, 0px) - 40px);
		grid-column: 2;
		border-radius: var(--thce-radius);
	}
}

@media (max-width: 1200px) {
	.thce-app--filterbar {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Phones: the panel becomes a sheet over the page. */
@media (max-width: 900px) {
	.thce-findbar__toggle span:not(.thce-findbar__count) {
		display: none;
	}

	.thce-findbar__toggle {
		padding: 0 14px;
	}

	.thce-findbar__panel {
		position: fixed;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 10001;
		max-height: 88vh;
		overflow-y: auto;
		padding: 0 18px 18px;
		border: 0;
		border-radius: var(--thce-radius) var(--thce-radius) 0 0;
	}

	.thce-findbar__panelhead {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 -18px 14px;
		padding: 14px 18px;
		background: var(--thce-card);
		border-bottom: 1px solid var(--thce-line);
	}

	.thce-findbar__paneltitle {
		margin: 0;
		font-size: 18px;
		font-weight: 800;
		color: var(--thce-dark);
	}

	.thce-findbar__close {
		border: 0;
		background: none;
		font-size: 28px;
		line-height: 1;
		color: var(--thce-muted);
		cursor: pointer;
	}

	.thce-findbar__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.thce-findbar__foot {
		position: sticky;
		bottom: -18px;
		margin: 18px -18px -18px;
		padding: 12px 18px 18px;
		background: var(--thce-card);
	}
}

/* ------------------------------------------------------------ carousel */

/*
 * [te_hiku_events_carousel]. Colours for the heading and the "see all" link
 * come from the surrounding section (so it sits on light or dark
 * backgrounds); the cards are always white.
 */
.thce-carousel {
	--thce-carousel-gap: 22px;
	position: relative;
	container: thce-carousel / inline-size;
	color: inherit;
}

.thce-carousel *,
.thce-carousel *::before,
.thce-carousel *::after {
	box-sizing: border-box;
}

.thce-carousel__head {
	margin: 0 auto 26px;
	max-width: 760px;
	text-align: center;
}

.thce-carousel__title {
	margin: 0 0 8px;
	color: inherit;
	font-size: clamp(26px, 4vw, 40px);
	font-weight: 800;
	line-height: 1.15;
}

.thce-carousel__subtitle {
	margin: 0;
	color: inherit;
	opacity: .85;
	font-size: 17px;
	line-height: 1.5;
}

.thce-carousel__viewport {
	position: relative;
}

.thce-carousel__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * var(--thce-carousel-gap)) / 4);
	gap: var(--thce-carousel-gap);
	margin: 0;
	padding: 4px 2px 14px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 2px;
	scrollbar-width: none;
}

.thce-carousel__track::-webkit-scrollbar {
	display: none;
}

.thce-carousel__track:focus-visible {
	outline: 2px solid var(--thce-brand-highlight, currentColor);
	outline-offset: 4px;
}

.thce-ccard {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: var(--thce-radius);
	background: #fff;
	color: var(--thce-ink);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .14);
	scroll-snap-align: start;
	list-style: none;
}

.thce-ccard__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--thce-tint);
}

.thce-ccard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.thce-ccard:hover .thce-ccard__media img {
	transform: scale(1.04);
}

.thce-ccard__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	/* Extra room at the top so the category chip never sits on the weekday. */
	padding: 46px 18px 16px;
	color: #fff;
	text-align: center;
	font-variant-numeric: lining-nums;
	background:
		radial-gradient(circle at 80% 15%, rgba(255, 255, 255, .22), transparent 50%),
		linear-gradient(140deg, var(--thce-cat, var(--thce-accent)), color-mix(in srgb, var(--thce-cat, var(--thce-accent)) 50%, #000));
}

.thce-ccard__ph-dow,
.thce-ccard__ph-month {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .92;
}

.thce-ccard__ph-day {
	margin: 2px 0 4px;
	font-size: 76px;
	font-weight: 800;
	line-height: 1;
	text-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.thce-ccard__cat {
	position: absolute;
	top: 12px;
	left: 12px;
	max-width: calc(100% - 24px);
	padding: 4px 10px;
	overflow: hidden;
	border-radius: var(--thce-radius-pill);
	background: color-mix(in srgb, var(--thce-cat, var(--thce-accent)) 22%, #fff);
	color: color-mix(in srgb, var(--thce-cat, var(--thce-accent)) 60%, #000);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.thce-ccard__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px;
}

.thce-ccard__date {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: var(--thce-muted);
	font-size: 13px;
	font-variant-numeric: lining-nums;
}

.thce-ccard__date svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

.thce-ccard__title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
}

.thce-ccard__title a {
	color: var(--thce-dark);
	text-decoration: none;
}

.thce-ccard__title a:hover {
	text-decoration: underline;
}

.thce-ccard__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	margin: 0;
	overflow: hidden;
	color: var(--thce-muted);
	font-size: 14px;
	line-height: 1.55;
}

.thce-ccard__button {
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 22px;
	border-radius: var(--thce-radius-btn);
	background: var(--thce-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background .15s;
}

/* A little space above the button even when the text is short. */
.thce-ccard__excerpt {
	margin-bottom: 8px;
}

.thce-ccard__button:hover,
.thce-ccard__button:focus-visible {
	background: var(--thce-dark);
	color: #fff;
}

.thce-carousel__arrow {
	position: absolute;
	top: calc(50% - 7px);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--thce-dark);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity .15s, background .15s;
}

.thce-carousel__arrow svg {
	width: 22px;
	height: 22px;
}

.thce-carousel__arrow:hover {
	background: var(--thce-tint);
}

.thce-carousel__arrow:disabled {
	opacity: 0;
	pointer-events: none;
}

.thce-carousel__arrow[hidden] {
	display: none;
}

.thce-carousel__arrow--prev {
	left: -14px;
}

.thce-carousel__arrow--next {
	right: -14px;
}

.thce-carousel__more {
	margin: 18px 0 0;
	text-align: center;
}

.thce-carousel__more a,
.thce-carousel__empty a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.thce-carousel__empty {
	margin: 0;
	text-align: center;
}

@container thce-carousel (max-width: 1050px) {
	.thce-carousel__track {
		grid-auto-columns: calc((100% - 2 * var(--thce-carousel-gap)) / 3);
	}
}

@container thce-carousel (max-width: 760px) {
	.thce-carousel {
		--thce-carousel-gap: 16px;
	}

	.thce-carousel__track {
		grid-auto-columns: calc((100% - var(--thce-carousel-gap)) / 2);
	}
}

/* Phones: one card with the next peeking in, swipe to move. */
@container thce-carousel (max-width: 520px) {
	.thce-carousel__track {
		grid-auto-columns: 84%;
	}

	.thce-carousel__arrow {
		display: none;
	}
}

/* ------------------------------------------------------------ lightbox */

.thce-panel__zoom,
.thce-single__zoom {
	position: relative;
	display: block;
	cursor: zoom-in;
}

.thce-panel__zoom[hidden] {
	display: none;
}

.thce-zoomhint {
	position: absolute;
	right: 8px;
	bottom: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(10, 25, 10, .62);
	color: #fff;
	opacity: .85;
	transition: opacity .15s, transform .15s;
	pointer-events: none;
}

.thce-zoomhint svg {
	width: 18px;
	height: 18px;
}

.thce-panel__zoom:hover .thce-zoomhint,
.thce-single__zoom:hover .thce-zoomhint,
.thce-panel__zoom:focus-visible .thce-zoomhint,
.thce-single__zoom:focus-visible .thce-zoomhint {
	opacity: 1;
	transform: scale(1.08);
}

/* Keep the slideshow dots above the link. */
.thce-panel__dots {
	z-index: 1;
}

.thce-single__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin: -10px 0 22px;
	padding: 0;
	list-style: none;
}

.thce-single__gallery li {
	margin: 0;
	padding: 0;
}

.thce-single__gallery a {
	display: block;
	overflow: hidden;
	border-radius: var(--thce-radius-sm);
	cursor: zoom-in;
}

.thce-single__gallery img {
	display: block;
	width: 100%;
	height: auto; /* override the width/height attributes so aspect-ratio applies */
	max-width: none;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .2s;
}

.thce-single__gallery a:hover img {
	transform: scale(1.04);
}

.thce-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100010;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
}

.thce-lightbox[hidden] {
	display: none;
}

.thce-lightbox *,
.thce-lightbox *::before,
.thce-lightbox *::after {
	box-sizing: border-box;
}

.thce-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 14, 8, .92);
	animation: thce-fade .15s ease-out;
}

.thce-lightbox__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	pointer-events: none;
}

.thce-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	width: auto;
	height: auto;
	border-radius: var(--thce-radius-sm);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
	background: rgba(255, 255, 255, .04);
	pointer-events: auto;
	animation: thce-rise .18s ease-out;
	transition: opacity .15s;
}

.thce-lightbox.is-loading .thce-lightbox__img {
	opacity: .35;
}

.thce-lightbox__caption {
	max-width: 70ch;
	color: rgba(255, 255, 255, .88);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

.thce-lightbox__caption[hidden] {
	display: none;
}

.thce-lightbox__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #fff;
	font: inherit;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	transition: background .12s;
}

.thce-lightbox__btn:hover,
.thce-lightbox__btn:focus-visible {
	background: rgba(255, 255, 255, .18);
}

.thce-lightbox__btn:focus-visible {
	outline: 2px solid var(--thce-brand-highlight, #fff);
	outline-offset: 2px;
}

.thce-lightbox__btn[hidden] {
	display: none;
}

.thce-lightbox__close {
	top: 14px;
	right: 14px;
}

.thce-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
}

.thce-lightbox__nav--prev {
	left: 14px;
}

.thce-lightbox__nav--next {
	right: 14px;
}

.thce-lightbox__count {
	position: absolute;
	top: 26px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 600px) {
	.thce-lightbox {
		padding: 64px 0 24px;
	}

	.thce-lightbox__img {
		border-radius: 0;
		max-height: calc(100vh - 140px);
	}

	.thce-lightbox__nav {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.thce-lightbox__caption {
		padding: 0 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thce-lightbox__backdrop,
	.thce-lightbox__img {
		animation: none;
	}
}

/* ----------------------------------------------------------- day popup */

html.thce-noscroll {
	overflow: hidden;
}

.thce-daybox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	color: var(--thce-ink);
	font-size: 15px;
	line-height: 1.45;
}

.thce-daybox[hidden] {
	display: none;
}

.thce-daybox *,
.thce-daybox *::before,
.thce-daybox *::after {
	box-sizing: border-box;
}

.thce-daybox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 10, .55);
	animation: thce-fade .15s ease-out;
}

.thce-daybox__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: min(720px, calc(100vh - 48px));
	background: var(--thce-card);
	border-radius: var(--thce-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	overflow: hidden;
	animation: thce-rise .18s ease-out;
}

.thce-daybox__head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 6px;
	padding: 18px 16px 16px;
	background: var(--thce-dark);
	color: #fff;
}

.thce-daybox__heading {
	min-width: 0;
	text-align: center;
}

.thce-daybox__weekday {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--thce-brand-highlight, rgba(255, 255, 255, .75));
}

.thce-daybox__title {
	margin: 2px 0 0;
	padding: 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
}

.thce-daybox__title:focus {
	outline: none;
}

.thce-daybox__count {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: rgba(255, 255, 255, .8);
}

.thce-daybox__step,
.thce-daybox__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: var(--thce-radius-pill);
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.thce-daybox__close {
	border-color: transparent;
	font-size: 28px;
}

.thce-daybox__step:hover:not(:disabled),
.thce-daybox__close:hover {
	background: rgba(255, 255, 255, .12);
}

.thce-daybox__step:disabled {
	opacity: .3;
	cursor: default;
}

.thce-daybox__list {
	flex: 1 1 auto;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.thce-daybox__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.thce-daybox__list li + li {
	border-top: 1px solid var(--thce-line);
}

.thce-daybox__item {
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: start;
	width: 100%;
	margin: 0;
	padding: 13px 18px 13px 16px;
	border: 0;
	border-left: 4px solid var(--thce-cat, var(--thce-accent));
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.thce-daybox__item:hover,
.thce-daybox__item:focus-visible {
	background: var(--thce-tint-soft);
}

.thce-daybox__item:focus-visible {
	outline: 2px solid var(--thce-accent);
	outline-offset: -2px;
}

.thce-daybox__time {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	font-weight: 700;
	color: var(--thce-dark);
	white-space: nowrap;
}

.thce-daybox__time-end {
	font-weight: 400;
	color: var(--thce-muted);
}

.thce-daybox__main {
	min-width: 0;
}

.thce-daybox__name {
	display: block;
	font-weight: 700;
	line-height: 1.3;
	color: var(--thce-ink);
}

.thce-daybox__item:hover .thce-daybox__name {
	color: var(--thce-dark);
	text-decoration: underline;
}

.thce-daybox__meta {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	color: var(--thce-muted);
}

.thce-daybox__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.thce-daybox__cat .thce-dot {
	background: var(--thce-cat, var(--thce-accent));
}

.thce-daybox__badge {
	padding-top: 1px;
}

.thce-panel__back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--thce-accent);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.thce-panel__back:hover {
	text-decoration: underline;
}

@keyframes thce-fade {
	from { opacity: 0; }
}

@keyframes thce-rise {
	from { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 600px) {
	.thce-daybox {
		align-items: flex-end;
		padding: 0;
	}

	.thce-daybox__dialog {
		width: 100%;
		max-height: 88vh;
		border-radius: var(--thce-radius) var(--thce-radius) 0 0;
	}

	.thce-daybox__item {
		grid-template-columns: 62px minmax(0, 1fr);
		gap: 10px;
	}

	.thce-daybox__badge {
		grid-column: 2;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thce-daybox__backdrop,
	.thce-daybox__dialog {
		animation: none;
	}
}

/* ------------------------------------------------------- accessibility */

.thce-app .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.thce-app :focus-visible {
	outline: 2px solid var(--thce-accent);
	outline-offset: 2px;
}

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

.thce-form {
	max-width: 780px;
	margin: 0 auto;
	background: var(--thce-card);
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius);
	padding: 26px;
	box-shadow: var(--thce-shadow);
}

.thce-form__title {
	margin: 0 0 6px;
	font-size: 28px;
	font-weight: 800;
	color: var(--thce-dark);
}

.thce-form__subtitle {
	margin: 0 0 4px;
	color: var(--thce-muted);
}

.thce-form__intro {
	font-size: 14px;
	color: var(--thce-muted);
}

.thce-form__message {
	margin: 16px 0;
	padding: 12px 14px;
	border-radius: var(--thce-radius-sm);
	font-size: 14px;
	font-weight: 600;
}

.thce-form__message.is-error {
	background: #fdeaea;
	color: #8c2020;
}

.thce-form__message.is-success {
	background: #e3f2e0;
	color: #26602a;
}

.thce-fieldset {
	border: 0;
	border-top: 1px solid var(--thce-line);
	margin: 22px 0 0;
	padding: 18px 0 0;
}

.thce-fieldset legend {
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-field {
	margin-top: 14px;
}

.thce-field label,
.thce-field__label {
	display: block;
	margin-bottom: 5px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--thce-ink);
}

.thce-field input[type="text"],
.thce-field input[type="url"],
.thce-field input[type="email"],
.thce-field input[type="tel"],
.thce-field input[type="date"],
.thce-field input[type="time"],
.thce-field input[type="number"],
.thce-field input[type="file"],
.thce-field select,
.thce-field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-sm);
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: inherit;
}

.thce-field textarea {
	resize: vertical;
}

.thce-field input:focus,
.thce-field select:focus,
.thce-field textarea:focus {
	outline: 2px solid var(--thce-accent);
	outline-offset: 1px;
	border-color: var(--thce-accent);
}

.thce-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 500;
	font-size: 14px;
}

.thce-field--check input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.thce-field--error input,
.thce-field--error select,
.thce-field--error textarea {
	border-color: #c0392b;
	background: #fffafa;
}

.thce-error {
	margin: 5px 0 0;
	font-size: 12.5px;
	color: #c0392b;
}

.thce-req {
	color: #c0392b;
}

.thce-hint {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--thce-muted);
}

.thce-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 0 14px;
}

.thce-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.thce-chipbox {
	display: inline-flex;
	margin: 0 !important;
}

.thce-chipbox input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.thce-chipbox span {
	display: inline-block;
	padding: 6px 13px;
	border: 1px solid var(--thce-line);
	border-radius: var(--thce-radius-pill);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	background: #fff;
	line-height: 1.3;
}

.thce-chipbox input:checked + span {
	background: var(--thce-cat, var(--thce-accent));
	border-color: var(--thce-cat, var(--thce-accent));
	color: #fff;
}

.thce-chipbox input:focus-visible + span {
	outline: 2px solid var(--thce-accent);
	outline-offset: 2px;
}

.thce-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.thce-form__actions {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--thce-line);
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.thce-form__actions .thce-hint {
	margin: 0;
}

/* --------------------------------------------------------- single event */

.thce-single {
	max-width: 1080px;
	margin: 0 auto;
	padding: calc(var(--thce-page-offset, 0px) + 28px) 20px 48px;
}

/*
 * Themes with a fixed or transparent header that overlays the page (Divi's
 * Theme Builder headers, for example) can push the plugin's own templates
 * clear of it without overriding them:
 *
 *   body { --thce-page-offset: 140px; --thce-sticky-offset: 140px; }
 *
 * --thce-page-offset pads the top of the event archive and single event page;
 * --thce-sticky-offset keeps the desktop event panel below the header while
 * the page scrolls.
 */
.thce-archive {
	padding-top: var(--thce-page-offset, 0px);
}

.thce-single__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.thce-single__title {
	margin: 0 0 8px;
	font-size: 36px;
	line-height: 1.15;
	font-weight: 800;
	color: var(--thce-dark);
}

.thce-single__when {
	margin: 0;
	color: var(--thce-muted);
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 15px;
}

.thce-single__when strong {
	color: var(--thce-ink);
}

.thce-single__media {
	margin: 22px 0;
	border-radius: var(--thce-radius);
	overflow: hidden;
}

.thce-single__media img {
	width: 100%;
	height: auto;
	display: block;
}

.thce-single__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
	margin-top: 22px;
}

.thce-single__aside {
	display: grid;
	gap: 16px;
	position: sticky;
	top: 24px;
}

.thce-single__section {
	margin-top: 28px;
}

.thce-single__section h2 {
	font-size: 18px;
	color: var(--thce-dark);
	margin: 0 0 10px;
}

.thce-single__note {
	margin-top: 18px;
	padding: 12px 14px;
	background: var(--thce-tint-soft);
	border-radius: var(--thce-radius-sm);
	font-size: 14px;
	color: var(--thce-muted);
}

.thce-single__cal {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--thce-muted);
	text-align: center;
}

.thce-single .thce-card + .thce-btn {
	margin-top: 0;
}

@media (max-width: 860px) {
	.thce-single__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.thce-single__aside {
		position: static;
	}

	.thce-single__title {
		font-size: 27px;
	}
}

/* ---------------------------------------------------------- simple list */

.thce-simplelist__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
	color: var(--thce-dark);
}

.thce-simplelist__items {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.thce-simplelist__item {
	border-bottom: 1px solid var(--thce-line);
}

.thce-simplelist__item:last-child {
	border-bottom: 0;
}

.thce-simplelist__item a {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 10px 0;
	text-decoration: none;
	color: inherit;
}

.thce-simplelist__item a:hover .thce-simplelist__name {
	color: var(--thce-accent);
}

.thce-simplelist__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	border-left: 3px solid var(--thce-cat, var(--thce-accent));
	padding-left: 8px;
}

.thce-simplelist__month {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--thce-muted);
	text-transform: uppercase;
}

.thce-simplelist__date strong {
	font-size: 18px;
	line-height: 1.1;
	color: var(--thce-dark);
}

.thce-simplelist__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.thce-simplelist__name {
	font-weight: 700;
	font-size: 14px;
}

.thce-simplelist__meta {
	font-size: 12.5px;
	color: var(--thce-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thce-simplelist__empty {
	color: var(--thce-muted);
	font-size: 14px;
}


