:root {
	--site-shell-left: max(clamp(16px, 3vw, 120px), calc((100vw - 1680px) / 2));
	--kanamex-sidebar-width: 240px;
	--kanamex-shell-gap: 28px;
	--kanamex-shell-background: #18262f;
	--kanamex-shell-border: #30434e;
	--kanamex-shell-text: #e9f0f3;
	--kanamex-shell-muted: #a9bdc7;
	--kanamex-shell-hover: #243943;
	--kanamex-shell-active: #264239;
	--kanamex-shell-accent: #43c39e;
	--kanamex-shell-focus: #f2ad3c;
	--kanamex-button-min-height: 44px;
	--kanamex-button-padding: 9px 16px;
	--kanamex-button-radius: 6px;
	--kanamex-button-font-weight: 700;
}

body.kanamex-shell-enabled .site-footer,
body.kanamex-shell-enabled .site-info {
	background: #0a1119;
}

body.kanamex-shell-enabled .site-info {
	color: var(--kanamex-shell-text);
}

body.kanamex-shell-enabled .site-info a {
	color: var(--kanamex-shell-accent);
}

.kanamex-mobile-header,
.kanamex-shell-panel,
.kanamex-shell-panel *,
.kanamex-shell-overlay {
	box-sizing: border-box;
}

.kanamex-shell-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	z-index: 1200;
	width: var(--kanamex-sidebar-width);
	height: 100vh;
	height: 100dvh;
	padding: 22px 16px;
	overflow: hidden;
	color: var(--kanamex-shell-text);
	background: var(--kanamex-shell-background);
	border-right: 1px solid var(--kanamex-shell-border);
	border-radius: 0;
	font-size: 16px;
	line-height: 1.4;
}

.kanamex-shell-layout {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 18px;
	height: 100%;
	min-height: 0;
}

.kanamex-panel-top,
.kanamex-services-navigation {
	min-width: 0;
	flex: none;
}

.kanamex-services-navigation,
.kanamex-service-switcher {
	position: relative;
}

.kanamex-local-navigation {
	min-width: 0;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #58707d transparent;
}

.kanamex-current-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 172px;
	min-height: 52px;
	margin: 0 auto;
	padding: 4px 6px;
	border-radius: 6px;
}

.kanamex-service-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.kanamex-current-logo {
	width: 160px;
	max-width: 160px;
}

.kanamex-panel-heading {
	margin: 0 0 8px;
	color: var(--kanamex-shell-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.09em;
}

.kanamex-service-list,
.kanamex-local-list,
.kanamex-mediamex-menu {
	display: grid;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kanamex-contact-list {
	margin-top: 5px;
}

.kanamex-service-item,
.kanamex-local-item,
.kanamex-mediamex-menu > .menu-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kanamex-service-link,
.kanamex-service-static,
.kanamex-local-link,
.kanamex-mediamex-menu > .menu-item > a {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 8px 11px;
	color: var(--kanamex-shell-text);
	background: transparent;
	border: 0;
	border-left: 3px solid transparent;
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: background-color 140ms ease, color 140ms ease;
}

.kanamex-service-switcher,
.kanamex-service-switcher-toggle,
.kanamex-service-switcher-current,
.kanamex-service-popover,
.kanamex-service-list,
.kanamex-service-item,
.kanamex-service-link,
.kanamex-service-static {
	min-width: 0;
	max-width: 100%;
}

.kanamex-service-switcher-toggle {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 18px;
	align-items: center;
	gap: 7px;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 8px 10px;
	color: var(--kanamex-shell-text);
	background: var(--kanamex-shell-active);
	border: 1px solid var(--kanamex-shell-border);
	border-radius: 6px;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color 140ms ease, border-color 140ms ease;
}

.kanamex-service-switcher-current {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 6px;
}

.kanamex-service-switcher-logo {
	width: min(112px, 100%);
	min-width: 0;
}

.kanamex-service-switcher-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 0.84rem;
	transition: transform 140ms ease;
}

.kanamex-service-switcher-toggle[aria-expanded="true"] .kanamex-service-switcher-chevron {
	transform: rotate(180deg);
}

.kanamex-service-switcher-toggle:hover,
.kanamex-service-switcher-toggle[aria-expanded="true"] {
	background: var(--kanamex-shell-hover);
	border-color: #58707d;
}

.kanamex-service-popover {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	left: 0;
	z-index: 2;
	width: 100%;
	max-height: min(320px, calc(100dvh - 96px));
	padding: 7px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #132029;
	border: 1px solid var(--kanamex-shell-border);
	border-radius: 7px;
	box-shadow: 0 -12px 28px rgb(0 0 0 / 26%);
}

.kanamex-service-popover[hidden] {
	display: none;
}

.kanamex-service-link,
.kanamex-service-static {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 6px;
}

.kanamex-service-list-logo {
	width: min(118px, 100%);
	min-width: 0;
	max-width: 100%;
}

.kanamex-service-label {
	display: block;
	max-width: 100%;
	padding: 2px 5px;
	color: var(--kanamex-shell-muted);
	border: 1px solid #4a616d;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.kanamex-service-link:hover,
.kanamex-local-link:hover,
.kanamex-mediamex-menu > .menu-item > a:hover,
.kanamex-current-brand:hover {
	color: #fff;
	background: var(--kanamex-shell-hover);
}

.kanamex-service-link.is-current-service,
.kanamex-service-static.is-current-service,
.kanamex-local-link.is-current-page,
.kanamex-mediamex-menu > .current-menu-item > a,
.kanamex-mediamex-menu > .current-menu-parent > a,
.kanamex-mediamex-menu > .current-menu-ancestor > a,
.kanamex-mediamex-menu > .current_page_parent > a,
.kanamex-mediamex-menu > .current_page_ancestor > a,
.kanamex-mediamex-menu > .current-post-ancestor > a {
	color: #fff;
	background: var(--kanamex-shell-active);
	border-left-color: var(--kanamex-shell-accent);
}

.kanamex-service-link.is-current-service .kanamex-service-label,
.kanamex-service-static.is-current-service .kanamex-service-label {
	color: #d5e3e8;
}

.kanamex-service-link:focus-visible,
.kanamex-local-link:focus-visible,
.kanamex-mediamex-menu > .menu-item > a:focus-visible,
.kanamex-current-brand:focus-visible,
.kanamex-mobile-brand:focus-visible,
.kanamex-menu-button:focus-visible,
.kanamex-drawer-close:focus-visible,
.kanamex-service-switcher-toggle:focus-visible {
	outline: 3px solid var(--kanamex-shell-focus);
	outline-offset: 2px;
}

.kanamex-mobile-header,
.kanamex-shell-overlay,
.kanamex-drawer-close {
	display: none;
}

@media (min-height: 700px) and (max-height: 899px) {
	.kanamex-shell-panel {
		padding: 14px 16px;
	}

	.kanamex-shell-layout {
		gap: 10px;
	}

	.kanamex-current-brand {
		min-height: 46px;
		padding: 2px 6px;
	}

	.kanamex-current-logo {
		width: 144px;
		max-width: 144px;
	}

	.kanamex-panel-heading {
		margin-bottom: 5px;
	}

	.kanamex-local-link,
	.kanamex-mediamex-menu > .menu-item > a {
		min-height: 40px;
		padding: 6px 10px;
	}

	.kanamex-contact-list {
		margin-top: 3px;
	}

	.kanamex-service-switcher-toggle {
		min-height: 44px;
		padding: 6px 9px;
	}

	.kanamex-drawer-close {
		margin-bottom: 8px;
	}
}

@media (min-width: 901px) {
	body.kanamex-shell-enabled {
		padding-right: var(--site-shell-left);
		padding-left: calc(var(--site-shell-left) + var(--kanamex-sidebar-width) + var(--kanamex-shell-gap));
	}

	.kanamex-shell-panel {
		left: var(--site-shell-left);
	}

	body.admin-bar .kanamex-shell-panel {
		top: 32px;
		height: calc(100dvh - 32px);
	}
}

@media (max-width: 900px) {
	body.kanamex-shell-enabled {
		padding-top: 64px;
	}

	.kanamex-mobile-header {
		position: fixed;
		top: 0;
		right: 0;
		left: 0;
		z-index: 1190;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 64px;
		padding: 10px 16px;
		color: var(--kanamex-shell-text);
		background: var(--kanamex-shell-background);
		border-bottom: 1px solid var(--kanamex-shell-border);
	}

	.kanamex-mobile-brand {
		display: flex;
		align-items: center;
		width: min(132px, calc(100vw - 136px));
		min-width: 0;
		border-radius: 4px;
	}

	.kanamex-mobile-logo {
		width: min(132px, calc(100vw - 136px));
		max-height: 42px;
	}

	.kanamex-menu-button,
	.kanamex-drawer-close {
		appearance: none;
		color: var(--kanamex-shell-text);
		background: transparent;
		border: 1px solid #58707d;
		border-radius: 6px;
		font: inherit;
		font-weight: 650;
		line-height: 1;
		cursor: pointer;
	}

	.kanamex-menu-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 7px;
		min-width: 44px;
		min-height: 44px;
		padding: 8px 12px;
	}

	.kanamex-menu-icon {
		display: grid;
		gap: 3px;
		width: 18px;
	}

	.kanamex-menu-icon > span {
		display: block;
		height: 2px;
		background: currentcolor;
		border-radius: 2px;
	}

	.kanamex-shell-panel {
		left: 0;
		width: min(86vw, 320px);
		max-width: 320px;
		padding: 16px;
		box-shadow: 12px 0 30px rgb(0 0 0 / 22%);
		transform: translateX(-102%);
		transition: transform 180ms ease;
	}

	.kanamex-shell-panel.is-open {
		transform: translateX(0);
	}

	.kanamex-drawer-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 5px;
		min-width: 44px;
		min-height: 44px;
		margin: 0 0 12px auto;
		padding: 8px 12px;
	}

	.kanamex-drawer-close [aria-hidden="true"] {
		font-size: 1.4em;
		font-weight: 400;
	}

	.kanamex-shell-overlay {
		position: fixed;
		inset: 0;
		z-index: 1180;
		display: block;
		background: rgb(4 12 17 / 58%);
	}

	.kanamex-shell-overlay[hidden] {
		display: none;
	}

	body.kanamex-drawer-open {
		overflow: hidden;
	}

	body.admin-bar .kanamex-mobile-header,
	body.admin-bar .kanamex-shell-panel {
		top: 32px;
	}

	body.admin-bar .kanamex-shell-panel {
		height: calc(100dvh - 32px);
	}

	body.admin-bar .kanamex-shell-overlay {
		top: 32px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .kanamex-mobile-header,
	body.admin-bar .kanamex-shell-panel {
		top: 46px;
	}

	body.admin-bar .kanamex-shell-panel {
		height: calc(100dvh - 46px);
	}

	body.admin-bar .kanamex-shell-overlay {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kanamex-shell-panel,
	.kanamex-service-link,
	.kanamex-local-link,
	.kanamex-mediamex-menu > .menu-item > a,
	.kanamex-service-switcher-toggle,
	.kanamex-service-switcher-chevron {
		transition: none;
	}
}
