.apsad-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border: 0;
	border-radius: 999px;
	padding: 0.72rem 1.3rem;
	background: #38338a;
	box-shadow: 0 6px 18px rgba(56, 51, 138, 0.2);
	color: #fff;
	font-family: "Outfit", system-ui, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.apsad-button:hover {
	transform: translateY(-1px);
	background: #2e2a72;
	box-shadow: 0 10px 24px rgba(56, 51, 138, 0.27);
	color: #fff;
}

.apsad-button-secondary {
	border: 1px solid #d9d9e3;
	background: #fff;
	box-shadow: none;
	color: #38338a;
}

.apsad-button-secondary:hover {
	background: #f2f2fa;
	color: #2e2a72;
}

.apsad-text-link {
	color: #3a6197;
	font-size: 0.9rem;
	font-weight: 650;
}

.apsad-icon {
	display: inline-block;
	width: 1.12em;
	height: 1.12em;
	vertical-align: -0.18em;
}

.apsad-empty {
	border: 1px solid #e2e2eb;
	border-radius: 16px;
	padding: 2rem;
	background: #fff;
	color: #6b6b85;
	text-align: center;
}

.apsad-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	overflow: hidden;
	border: 1px solid #e2e2eb;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(56, 51, 138, 0.1);
}

.apsad-stats > div {
	display: flex;
	min-height: 8rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	text-align: center;
}

.apsad-stats > div + div {
	border-left: 1px solid #e2e2eb;
}

.apsad-stats strong {
	color: #38338a;
	font-family: "Outfit", system-ui, sans-serif;
	font-size: clamp(2rem, 4vw, 3.2rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
}

.apsad-stats span {
	margin-top: 0.55rem;
	color: #6b6b85;
	font-size: 0.86rem;
}

.apsad-family-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
}

.apsad-family-tile {
	display: grid;
	min-height: 11rem;
	grid-template-columns: auto 1fr;
	align-content: end;
	align-items: center;
	gap: 0.45rem 0.85rem;
	overflow: hidden;
	border: 1px solid #e2e2eb;
	border-radius: 18px;
	padding: 1.5rem;
	background:
		linear-gradient(140deg, color-mix(in srgb, var(--apsad-family-color) 14%, #fff), #fff 68%);
	box-shadow: 0 4px 16px rgba(56, 51, 138, 0.09);
	color: #16162a;
	text-decoration: none;
	transition: transform 180ms cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 180ms ease;
}

.apsad-family-tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 40px rgba(56, 51, 138, 0.14);
	color: #16162a;
}

.apsad-family-icon {
	display: grid;
	width: 3rem;
	height: 3rem;
	grid-row: span 2;
	place-items: center;
	border-radius: 14px;
	background: var(--apsad-family-color);
}

.apsad-family-icon .apsad-icon {
	width: 1.55rem;
	height: 1.55rem;
	filter: brightness(0) invert(1);
}

.apsad-family-tile strong {
	font-family: "Outfit", system-ui, sans-serif;
	font-size: 1.08rem;
}

.apsad-family-tile > span:last-child {
	color: #6b6b85;
	font-size: 0.82rem;
}

.apsad-directory {
	margin-top: 2rem;
}

.apsad-directory-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}

.apsad-search {
	position: relative;
	display: block;
	width: min(100%, 34rem);
}

.apsad-search .apsad-icon {
	position: absolute;
	top: 50%;
	left: 1rem;
	width: 1.2rem;
	height: 1.2rem;
	transform: translateY(-50%);
	opacity: 0.58;
}

.apsad-search input {
	width: 100%;
	min-height: 48px;
	border: 1px solid #d9d9e3;
	border-radius: 999px;
	padding: 0.75rem 1rem 0.75rem 2.85rem;
	background: #fff;
	color: #16162a;
	font: inherit;
}

.apsad-view-tabs {
	display: inline-flex;
	flex: none;
	gap: 0.25rem;
	border: 1px solid #e2e2eb;
	border-radius: 999px;
	padding: 0.25rem;
	background: #fff;
}

.apsad-view-tabs button,
.apsad-filter-row button {
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #4e4e68;
	cursor: pointer;
	font-family: "Outfit", system-ui, sans-serif;
	font-weight: 650;
}

.apsad-view-tabs button {
	padding: 0.62rem 0.9rem;
}

.apsad-view-tabs button[aria-selected="true"] {
	background: #38338a;
	color: #fff;
}

.apsad-filter-row {
	display: flex;
	gap: 0.55rem;
	overflow-x: auto;
	padding: 0.15rem 0 0.65rem;
	scrollbar-width: thin;
}

.apsad-filter-row button {
	flex: none;
	border: 1px solid #e2e2eb;
	padding: 0.5rem 0.85rem;
	background: #fff;
}

.apsad-filter-row button.is-active {
	border-color: #38338a;
	background: #f2f2fa;
	color: #2e2a72;
}

.apsad-filter-row button span {
	margin-left: 0.25rem;
	color: #9494a8;
	font-size: 0.75rem;
}

.apsad-result-count {
	margin: 0.4rem 0 1.15rem;
	color: #6b6b85;
	font-size: 0.85rem;
}

.apsad-view-panel[hidden],
.apsad-activity-card[hidden],
.apsad-activity-group[hidden] {
	display: none !important;
}

.apsad-activity-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.4rem;
}

.apsad-activity-card {
	overflow: hidden;
	border: 1px solid #e2e2eb;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(56, 51, 138, 0.08);
	transition: transform 180ms cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 180ms ease;
}

.apsad-activity-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 40px rgba(56, 51, 138, 0.14);
}

.apsad-activity-card > a {
	display: flex;
	height: 100%;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.apsad-activity-media {
	display: grid;
	aspect-ratio: 16 / 8.5;
	place-items: center;
	overflow: hidden;
	background:
		radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.48) 0 12%, transparent 13%),
		linear-gradient(135deg, color-mix(in srgb, var(--apsad-family-color) 64%, #fff), var(--apsad-family-color));
}

.apsad-activity-media > img:not(.apsad-icon) {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.apsad-activity-media > span {
	display: grid;
	width: 4.6rem;
	height: 4.6rem;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(8px);
}

.apsad-activity-media .apsad-icon {
	width: 2.35rem;
	height: 2.35rem;
	filter: brightness(0) invert(1);
}

.apsad-activity-card-body {
	display: flex;
	height: 100%;
	flex-direction: column;
	padding: 1.25rem;
}

.apsad-family-label {
	color: var(--apsad-family-color);
	font-family: "Outfit", system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.apsad-activity-card h3 {
	margin: 0.35rem 0 0.55rem;
	color: #16162a;
	font-family: "Outfit", system-ui, sans-serif;
	font-size: 1.3rem;
	font-weight: 750;
	line-height: 1.15;
}

.apsad-activity-card p {
	margin: 0 0 1rem;
	color: #6b6b85;
	font-size: 0.88rem;
	line-height: 1.55;
}

.apsad-card-meta {
	display: grid;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 0.85rem;
	border-top: 1px solid #ececf2;
	color: #4e4e68;
	font-size: 0.78rem;
}

.apsad-card-meta span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apsad-activity-group {
	margin: 2.25rem 0 3.5rem;
}

.apsad-activity-group > header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1.15rem;
	border-left: 5px solid var(--apsad-family-color);
	padding-left: 1rem;
}

.apsad-activity-group > header h2 {
	margin: 0;
	font-size: 1.65rem;
}

.apsad-activity-group > header span {
	color: #6b6b85;
	font-size: 0.82rem;
}

body.apsad-dialog-open {
	overflow: hidden;
}

.apsad-dialog {
	width: min(920px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow: auto;
	border: 0;
	border-radius: 24px;
	padding: 0;
	background: #fff;
	box-shadow: 0 24px 60px rgba(36, 33, 89, 0.24);
	color: #16162a;
}

.apsad-location-dialog {
	width: min(620px, calc(100vw - 2rem));
	padding: 2rem;
}

.apsad-dialog::backdrop {
	background: rgba(22, 22, 42, 0.62);
	backdrop-filter: blur(5px);
}

.apsad-dialog-close {
	position: sticky;
	z-index: 3;
	top: 1rem;
	float: right;
	display: grid;
	width: 2.75rem;
	height: 2.75rem;
	margin: 1rem 1rem -3.75rem 0;
	place-items: center;
	border: 1px solid #e2e2eb;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 8px rgba(56, 51, 138, 0.12);
	cursor: pointer;
}

.apsad-activity-detail {
	padding: clamp(1.5rem, 5vw, 3.5rem);
}

.apsad-detail-illustration {
	overflow: hidden;
	margin: calc(clamp(1.5rem, 5vw, 3.5rem) * -1) calc(clamp(1.5rem, 5vw, 3.5rem) * -1) 2rem;
	aspect-ratio: 16 / 7;
	background: #eff3f9;
}

.apsad-detail-illustration img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.apsad-activity-detail h2 {
	margin: 0.25rem 0 0.75rem;
	font-size: clamp(2rem, 5vw, 3rem);
}

.apsad-detail-lead {
	max-width: 65ch;
	color: #4e4e68;
	font-size: 1.06rem;
}

.apsad-detail-content {
	margin-top: 1.5rem;
}

.apsad-practical,
.apsad-schedule {
	margin-top: 2rem;
	border-top: 1px solid #e2e2eb;
	padding-top: 1.75rem;
}

.apsad-practical h3,
.apsad-schedule h3 {
	margin-top: 0;
}

.apsad-practical dl {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.apsad-practical dl > div {
	border-radius: 12px;
	padding: 1rem;
	background: #f8f8fb;
}

.apsad-practical dt {
	margin-bottom: 0.25rem;
	color: #6b6b85;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.apsad-practical dd {
	margin: 0;
}

.apsad-location-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1rem;
}

.apsad-location-buttons button {
	border: 1px solid #d9d9e3;
	border-radius: 999px;
	padding: 0.55rem 0.85rem;
	background: #fff;
	color: #38338a;
	cursor: pointer;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 650;
}

.apsad-slot-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.apsad-slot {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.15rem 0.75rem;
	border: 1px solid #e2e2eb;
	border-radius: 14px;
	padding: 1rem;
	background: #fff;
}

.apsad-slot-time {
	color: #38338a;
	font-family: "DM Mono", ui-monospace, monospace;
	font-weight: 500;
}

.apsad-slot > span:not(.apsad-slot-time),
.apsad-slot small {
	grid-column: 1 / -1;
	color: #6b6b85;
}

.apsad-detail-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 2rem;
	border-top: 1px solid #e2e2eb;
	padding-top: 1.5rem;
}

.apsad-location-dialog img {
	width: 100%;
	max-height: 60vh;
	border-radius: 14px;
	object-fit: contain;
	background: #f1f1f6;
}

.apsad-planning-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.apsad-planning-actions > span {
	margin-right: auto;
	color: #6b6b85;
	font-size: 0.82rem;
}

.apsad-planning-frame {
	overflow: hidden;
	border: 1px solid #e2e2eb;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(56, 51, 138, 0.1);
}

.apsad-planning-frame iframe {
	display: block;
	width: 100%;
	height: min(900px, 78vh);
	border: 0;
}

@media (max-width: 1000px) {
	.apsad-family-tiles,
	.apsad-activity-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.apsad-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.apsad-stats > div + div {
		border-left: 0;
	}

	.apsad-stats > div:nth-child(even) {
		border-left: 1px solid #e2e2eb;
	}

	.apsad-stats > div:nth-child(n+3) {
		border-top: 1px solid #e2e2eb;
	}

	.apsad-family-tiles,
	.apsad-activity-grid,
	.apsad-practical dl,
	.apsad-slot-list {
		grid-template-columns: 1fr;
	}

	.apsad-directory-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.apsad-view-tabs {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.apsad-view-tabs button {
		padding-inline: 0.4rem;
		font-size: 0.82rem;
	}

	.apsad-activity-group > header {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.25rem;
	}

	.apsad-planning-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.apsad-planning-actions > span {
		margin-right: 0;
	}

	.apsad-planning-frame iframe {
		height: 78vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.apsad-button,
	.apsad-family-tile,
	.apsad-activity-card {
		transition: none;
	}
}
