body.temple-site.temple-rites {
	background: #fff;
	display: block;
	font-family: "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
}

body.temple-site.temple-rites #page,
body.temple-site.temple-rites .site,
body.temple-site.temple-rites .site-header,
body.temple-site.temple-rites .site-header .inside-header {
	background: #fff !important;
}

body.temple-site.temple-rites #page {
	max-width: none;
	width: 100%;
}

body.temple-site.temple-rites .site-content,
body.temple-site.temple-rites .inside-article,
body.temple-site.temple-rites .entry-content {
	background: transparent;
	padding: 0;
}

body.temple-site.temple-rites .site-content {
	align-self: stretch;
	flex: 0 0 100%;
	margin-left: 0;
	margin-right: 0;
	max-width: none;
	min-width: 100%;
	width: 100%;
}

body.temple-site.temple-rites .site-main {
	background: transparent;
	border: 0;
	box-shadow: none;
	margin: 0;
	width: 100%;
}

.temple-rites-page {
	--rites-red: #a7352b;
	--rites-event: #986a50;
	--rites-ink: #231f1b;
	--rites-muted: #6d625a;
	--rites-line: rgba(167, 53, 43, 0.18);
	--rites-font: "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
	background: #fff;
	box-sizing: border-box;
	color: var(--rites-ink);
	font-family: var(--rites-font);
	min-height: calc(100vh - 80px);
	padding: clamp(18px, 2.6vw, 34px) clamp(18px, 5vw, 78px) clamp(44px, 6vw, 78px);
	width: 100%;
}

.temple-rites-hero,
.temple-rites-section {
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	max-width: 1180px;
	width: 100%;
}

.temple-rites-hero {
	border-bottom: 1px solid var(--rites-line);
	margin-bottom: clamp(22px, 3.4vw, 42px);
	padding-bottom: clamp(14px, 2.8vw, 28px);
}

body.temple-site.temple-rites .temple-rites-hero h1 {
	color: var(--rites-red);
	font-size: clamp(42px, 8vw, 86px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.05;
	margin: 0;
}

.temple-rites-lead {
	color: var(--rites-muted);
	font-size: clamp(18px, 2.4vw, 25px);
	line-height: 1.7;
	margin: 10px 0 0;
}

.temple-rites-section + .temple-rites-section {
	margin-top: clamp(28px, 4.8vw, 56px);
}

.temple-rites-section-head {
	display: grid;
	gap: 10px;
	margin-bottom: clamp(18px, 3vw, 30px);
}

.temple-rites-section-head p {
	color: var(--rites-red);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	margin: 0;
}

body.temple-site.temple-rites .temple-rites-section-head h2 {
	color: var(--rites-ink);
	font-size: clamp(24px, 4vw, 40px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0;
}

.temple-rites-cards {
	display: grid;
	gap: 0;
	margin-left: auto;
	margin-right: auto;
	max-width: 860px;
}

.temple-rites-card {
	background: #fff;
	border: 0;
	border-bottom: 1px solid rgba(35, 31, 27, 0.12);
	border-radius: 0;
	min-width: 0;
	overflow: hidden;
}

body.temple-site.temple-rites .temple-rites-card-toggle {
	appearance: none;
	align-items: center;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--rites-ink) !important;
	cursor: pointer;
	display: grid;
	font-family: var(--rites-font);
	gap: clamp(14px, 3vw, 34px);
	grid-template-columns: minmax(132px, 0.24fr) minmax(0, 1fr);
	min-height: 76px;
	padding: clamp(14px, 2.2vw, 22px) 0;
	text-align: left;
	text-transform: none;
	width: 100%;
}

body.temple-site.temple-rites .temple-rites-card-toggle:hover,
body.temple-site.temple-rites .temple-rites-card-toggle:focus,
body.temple-site.temple-rites .temple-rites-card-toggle:focus-visible {
	background: transparent !important;
	color: var(--rites-ink) !important;
	outline: none;
}

body.temple-site.temple-rites .temple-rites-card-toggle:focus-visible {
	box-shadow: inset 0 -1px 0 var(--rites-red) !important;
}

.temple-rites-card-date {
	color: rgba(152, 106, 80, 0.82);
	display: grid;
	font-size: clamp(15px, 1.8vw, 17px);
	font-weight: 400;
	line-height: 1.3;
	transition: color 260ms ease;
	white-space: nowrap;
}

.temple-rites-card-date small {
	color: rgba(109, 98, 90, 0.72);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	margin-top: 3px;
	transition: color 260ms ease;
}

.temple-rites-card-title {
	color: var(--rites-ink);
	font-size: clamp(22px, 2.7vw, 30px);
	font-weight: 500;
	line-height: 1.38;
	min-width: 0;
	overflow-wrap: anywhere;
	transition: color 260ms ease;
}

.temple-rites-card.is-open .temple-rites-card-date,
.temple-rites-card.is-open .temple-rites-card-date small,
.temple-rites-card.is-open .temple-rites-card-title {
	color: var(--rites-red);
}

.temple-rites-card-panel {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 320ms ease, opacity 220ms ease;
}

.temple-rites-card.is-open .temple-rites-card-panel {
	opacity: 1;
}

.temple-rites-card-detail {
	border-top: 1px solid rgba(167, 53, 43, 0.12);
	margin-left: min(178px, 24vw);
	padding: 12px 0 18px;
}

.temple-rites-card dl {
	display: grid;
	gap: 8px;
	margin: 0;
}

.temple-rites-card dl > div {
	display: grid;
	gap: 10px;
	grid-template-columns: 44px minmax(0, 1fr);
}

.temple-rites-card dt {
	color: var(--rites-event);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.8;
	margin: 0;
}

.temple-rites-card dd {
	color: var(--rites-muted);
	font-size: 16px;
	line-height: 1.8;
	margin: 0;
	min-width: 0;
}

.temple-rites-calendar-section {
	border-top: 1px solid var(--rites-line);
	padding-top: clamp(18px, 3.6vw, 34px);
}

.temple-rites-calendar-shell {
	align-items: center;
	box-sizing: border-box;
	display: grid;
	gap: clamp(12px, 2.4vw, 22px);
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	margin-left: auto;
	margin-right: auto;
	max-width: none;
	width: min(100%, 860px);
}

.temple-rites-calendar {
	box-sizing: border-box;
	min-width: 0;
	overflow: visible;
	width: 100%;
}

.temple-rites-month {
	background: #fff;
	border: 1px solid var(--rites-red);
	border-radius: 0;
	box-sizing: border-box;
	color: var(--rites-red);
	min-width: 0;
	overflow: visible;
	padding: clamp(12px, 2vw, 18px);
	width: 100%;
}

body.temple-site.temple-rites .temple-rites-month h3 {
	color: var(--rites-red);
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0 0 12px;
}

body.temple-site.temple-rites .temple-rites-calendar-nav {
	appearance: none;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--rites-red) !important;
	cursor: pointer;
	display: block !important;
	font-family: var(--rites-font);
	font-size: 42px;
	font-weight: 300;
	height: 52px;
	line-height: 1;
	padding: 0;
	transition: color 180ms ease, opacity 180ms ease;
	width: 44px;
}

body.temple-site.temple-rites .temple-rites-calendar-nav:hover,
body.temple-site.temple-rites .temple-rites-calendar-nav:focus {
	background: transparent !important;
	color: var(--rites-event) !important;
	outline: none;
}

body.temple-site.temple-rites .temple-rites-calendar-nav:disabled {
	color: rgba(167, 53, 43, 0.24) !important;
	cursor: default;
	opacity: 1;
}

.temple-rites-weekdays,
.temple-rites-month-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.temple-rites-weekdays {
	border-bottom: 1px solid rgba(167, 53, 43, 0.22);
	color: var(--rites-red);
	font-size: 13px;
	line-height: 1;
	padding-bottom: 8px;
	text-align: center;
}

.temple-rites-month-grid {
	gap: 0;
	overflow: visible;
	padding-top: 8px;
	width: 100%;
}

.temple-rites-day {
	aspect-ratio: 1 / 0.86;
	background: #fff;
	border-bottom: 1px solid rgba(167, 53, 43, 0.18);
	border-left: 1px solid rgba(167, 53, 43, 0.18);
	box-sizing: border-box;
	color: var(--rites-red);
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 66px;
	min-width: 0;
	overflow: visible;
	padding: 6px;
	position: relative;
}

.temple-rites-day.is-empty {
	background: #fff;
}

.temple-rites-day.is-past:not(.has-event) {
	background: #fff;
}

.temple-rites-day.is-today {
	box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--rites-red);
}

.temple-rites-day-number {
	flex: 0 0 auto;
	font-size: 13px;
	line-height: 1;
}

.temple-rites-calendar-event {
	background: #2f8f83;
	box-sizing: border-box;
	color: #fff;
	display: block;
	font-size: clamp(11px, 1.2vw, 13px);
	font-weight: 500;
	line-height: 1.28;
	margin-top: 3px;
	max-width: 100%;
	min-width: 0;
	padding: 3px 5px;
	position: relative;
	text-overflow: ellipsis;
	white-space: nowrap;
	z-index: 1;
}

.temple-rites-calendar-event:focus {
	outline: none;
}

.temple-rites-calendar-event:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(47, 143, 131, 0.55);
}

.temple-rites-calendar-event-title {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.temple-rites-calendar-popover {
	background: #fff;
	border: 1px solid rgba(47, 143, 131, 0.28);
	box-shadow: 0 14px 34px rgba(35, 31, 27, 0.16);
	box-sizing: border-box;
	color: var(--rites-ink);
	display: grid;
	font-size: 13px;
	gap: 6px;
	left: 50%;
	line-height: 1.55;
	max-width: min(280px, calc(100vw - 42px));
	min-width: 220px;
	opacity: 0;
	padding: 12px 14px;
	pointer-events: none;
	position: absolute;
	top: calc(100% + 8px);
	transform: translateX(-50%) translateY(-4px);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
	visibility: hidden;
	white-space: normal;
	z-index: 20;
}

.temple-rites-calendar-popover::before {
	background: #fff;
	border-left: 1px solid rgba(47, 143, 131, 0.28);
	border-top: 1px solid rgba(47, 143, 131, 0.28);
	content: "";
	height: 10px;
	left: 50%;
	position: absolute;
	top: -6px;
	transform: translateX(-50%) rotate(45deg);
	width: 10px;
}

.temple-rites-calendar-popover strong {
	color: #2f8f83;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.temple-rites-calendar-popover span {
	color: var(--rites-muted);
	display: block;
}

.temple-rites-calendar-popover small {
	color: var(--rites-ink);
	display: block;
	font-size: 13px;
	line-height: 1.65;
}

.temple-rites-calendar-event:hover,
.temple-rites-calendar-event:focus,
.temple-rites-calendar-event:focus-within {
	z-index: 30;
}

.temple-rites-calendar-event:hover .temple-rites-calendar-popover,
.temple-rites-calendar-event:focus .temple-rites-calendar-popover,
.temple-rites-calendar-event:focus-within .temple-rites-calendar-popover {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	visibility: visible;
}

.temple-rites-empty {
	background: #fff;
	border: 1px solid var(--rites-line);
	border-radius: 0;
	color: var(--rites-muted);
	font-size: 19px;
	line-height: 1.8;
	margin: 0;
	padding: 22px 24px;
}

@media (max-width: 980px) {
	.temple-rites-calendar-shell {
		grid-template-columns: 36px minmax(0, 1fr) 36px;
	}
}

@media (max-width: 640px) {
	.temple-rites-page {
		padding-top: 22px;
		padding-left: 14px;
		padding-right: 14px;
		padding-bottom: 38px;
	}

	.temple-rites-card-toggle {
		grid-template-columns: 1fr;
		gap: 7px 12px;
		min-height: 0;
		padding: 14px 0;
	}

	.temple-rites-card-date {
		grid-column: 1 / -1;
		white-space: normal;
	}

	.temple-rites-card-title {
		grid-column: 1;
	}

	.temple-rites-card dl > div {
		gap: 4px;
		grid-template-columns: 1fr;
	}

	.temple-rites-card-detail {
		margin-left: 0;
	}

	.temple-rites-month {
		border-radius: 0;
		margin-left: -6px;
		margin-right: -6px;
		padding: 10px;
	}

	.temple-rites-calendar-shell {
		gap: 4px;
		grid-template-columns: 26px minmax(0, 1fr) 26px;
	}

	body.temple-site.temple-rites .temple-rites-calendar-nav {
		font-size: 30px;
		width: 26px;
	}

	.temple-rites-day {
		aspect-ratio: auto;
		min-height: 56px;
		padding: 5px;
	}

	.temple-rites-calendar-popover {
		left: auto;
		min-width: min(230px, calc(100vw - 36px));
		right: -8px;
		transform: translateY(-4px);
	}

	.temple-rites-calendar-popover::before {
		left: auto;
		right: 14px;
		transform: rotate(45deg);
	}

	.temple-rites-calendar-event:hover .temple-rites-calendar-popover,
	.temple-rites-calendar-event:focus .temple-rites-calendar-popover,
	.temple-rites-calendar-event:focus-within .temple-rites-calendar-popover {
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.temple-rites-card-panel {
		transition: none;
	}

	.temple-rites-card-date,
	.temple-rites-card-date small,
	.temple-rites-card-title,
	body.temple-site.temple-rites .temple-rites-calendar-nav,
	.temple-rites-calendar-popover {
		transition: none;
	}
}
