/* Retain the original desktop design; reflow the shared shell on smaller screens. */
.site-navigation > summary {
	display: none;
}

@media (max-width: 919px) {
	.site-page *,
	.site-page *::before,
	.site-page *::after {
		box-sizing: border-box;
	}

	body {
		font-size: 14.4px;
		line-height: 1.7;
	}

	#wrap,
	#content-outer,
	#content-wrap,
	#content,
	#left,
	#right,
	#footer-outer,
	#footer-wrap,
	#footer-bottom {
		float: none;
		width: 100%;
		min-width: 0;
		margin-left: 0;
		margin-right: 0;
	}

	#header {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 92px;
		align-items: center;
		gap: 8px 16px;
		height: auto;
		padding: 24px 16px 20px;
	}

	#header h1#logo-text a {
		position: static;
		display: block;
		width: auto;
		padding: 0;
		font-size: clamp(26px, 4.5vw, 40px);
		line-height: 1.15;
		letter-spacing: -1.2px;
	}

	#header p#slogan {
		position: static;
		grid-column: 1;
		padding: 0;
		font-size: 16px;
		line-height: 1.5;
		color: #666;
	}

	#header #header-image {
		position: static;
		grid-column: 2;
		grid-row: 1 / span 2;
		width: 92px;
		height: 114px;
		background-size: contain;
	}

	#content-outer {
		display: block;
		background: none;
	}

	#content {
		display: flex;
		flex-direction: column;
		padding: 0 18px 21.6px;
	}

	#right {
		order: -1;
		position: static;
		margin-top: 0;
		margin-bottom: 16px;
		border-color: #e4d7d3;
		border-radius: 4px;
		background: #faf8f6;
		touch-action: pan-y pinch-zoom;
		overscroll-behavior: auto;
	}

	.site-navigation > summary {
		display: flex;
		align-items: center;
		gap: 12px;
		min-height: 52px;
		padding: 10px 14px;
		color: #93190c;
		cursor: pointer;
		list-style: none;
	}

	.site-navigation > summary::-webkit-details-marker {
		display: none;
	}

	.site-navigation > summary:focus-visible {
		outline: 2px solid #93190c;
		outline-offset: 2px;
	}

	.menu-label {
		font-weight: bold;
	}

	.menu-current {
		margin-left: auto;
		font-size: 13px;
		color: #666;
	}

	.menu-indicator {
		width: 9px;
		height: 9px;
		flex-shrink: 0;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: translateY(-2px) rotate(45deg);
	}

	.site-navigation[open] .menu-indicator {
		transform: translateY(2px) rotate(225deg);
	}

	/* Avoid showing the expanded SSR menu while mobile JavaScript is loading.
	   Without JavaScript, the native disclosure remains expanded and usable. */
	.js-enabled .site-navigation:not(.navigation-ready):not(:focus-within) .sidemenu {
		display: none;
	}

	.js-enabled .site-navigation:not(.navigation-ready) .menu-indicator {
		transform: translateY(-2px) rotate(45deg);
	}

	.sidemenu {
		position: static;
		height: auto;
		max-height: none;
		overflow: visible;
		touch-action: pan-y pinch-zoom;
		overscroll-behavior: auto;
		border-top: 1px solid #e4d7d3;
	}

	.sidemenu ul li,
	.sidemenu ul li.last {
		padding: 0;
	}

	.sidemenu ul li a,
	.sidemenu ul li a:visited {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 8px 10px;
		font-size: 16px;
		line-height: 1.5;
	}

	.sidemenu a[aria-current='page'] {
		background: #f4e8e2;
	}

	#left {
		padding-top: 0;
		overflow-wrap: anywhere;
	}

	#left h1,
	#left h2,
	#left h3,
	#left h4,
	#left p,
	#left dl,
	.course-schedule {
		margin-left: 0;
		margin-right: 0;
	}

	#left h1 {
		font-size: 2em;
		letter-spacing: -1px;
	}

	#left h2 {
		font-size: 1.7em;
	}

	#left h3 {
		font-size: 1.5em;
	}

	#left ul,
	#left ol {
		margin-left: 0;
		margin-right: 0;
		padding-left: 21.6px;
	}

	#left img {
		max-width: 100%;
		height: auto;
	}

	#left iframe,
	#left audio,
	#left video {
		max-width: 100%;
	}

	#front-page-text {
		width: 100%;
		font-size: clamp(18px, 3.6vw, 25.2px);
	}

	#left table {
		max-width: 100%;
		font-size: 12.6px;
	}

	.camp-years td {
		min-width: 64px;
		white-space: nowrap;
	}

	#home #left table,
	#home #left tbody,
	#home #left tr,
	#home #left td,
	#studentfeedback #left table,
	#studentfeedback #left tbody,
	#studentfeedback #left tr,
	#studentfeedback #left td {
		display: block;
		width: 100%;
	}

	#home #left td,
	#studentfeedback #left td {
		padding: 7.2px;
	}

	#home #left td:last-child {
		text-align: center;
	}

	#left blockquote {
		margin: 0;
		padding-right: 10.8px;
		font-size: 15.3px;
	}

	#home #left blockquote {
		background-size: 16px 16px;
		background-position: 8px 10px;
	}

	#studentfeedback #left blockquote {
		font-size: 14.4px;
	}

	.course-schedule {
		font-size: 1.2em;
	}

	.schedule-table {
		max-width: 100%;
		overflow-x: auto;
		overscroll-behavior-x: contain;
	}

	.schedule-table table {
		min-width: 560px;
	}

	#left .gallery {
		width: 100% !important;
	}

	.gallery tbody {
		display: block;
	}

	.gallery tr {
		display: flex;
		flex-wrap: wrap;
	}

	.gallery td {
		flex: 1 1 220px;
		width: auto !important;
		min-width: 0;
		max-width: 100%;
	}

	.page-navigation {
		width: auto;
		margin: 10px 0;
	}

	#footer-bottom,
	#footer-outer {
		font-size: 13px;
	}

	#footer-bottom {
		padding: 12px 16px;
		margin-top: 16px;
		border-bottom-width: 16px;
	}

	#footer-bottom a {
		display: inline-block;
		padding: 8px 2px;
	}
}
