/* Shared owner-approved palette and layout; sizing policy: docs/development/css-units.md. */
:root {
	--welmana-brand-orange: #eb681f;
	--welmana-brand-green: #308608;
	--welmana-state-green: #239d54;
	--welmana-green-soft: #edf7ef;
	--welmana-green-hover: #fbfdfb;
	--welmana-orange-soft: #fff3e8;
	--welmana-line: #dde5ea;
	--welmana-text-primary: #17375e;
	--welmana-text-body: #2e4668;
	--welmana-text-muted: #6b7280;
	/* Public and member headers share the same navigation treatment. */
	--welmana-nav-hover-background: rgb(48 134 8 / 5%);
	--welmana-nav-radius: 0.375rem;
	--welmana-nav-transition-duration: 180ms;
	--welmana-nav-panel-radius: 0.625rem;
	--welmana-nav-panel-shadow: 0 8px 24px rgb(23 55 94 / 8%);
	--welmana-content-width: 75rem;
	--welmana-reading-width: 50rem;
	--welmana-content-gutter: 1.5rem;
	--welmana-logo-height: 5rem;
	--welmana-logo-width: calc(var(--welmana-logo-height) * 298.1 / 170.78);
	/* 固定へ戻すときは、以下の3箇所で一時指定を削除して元の指定を有効にする。 */
	/* --welmana-header-position: sticky; */
	--welmana-header-position: relative;
}

/* The corporate color band is a border so its height stays exactly 10px. */
.site-footer, .members-footer {
	border-top: 10px solid var(--welmana-brand-orange);
}

/* Reserve the measured header height for anchors and keyboard focus. */
html {
	/* scroll-padding-top: calc(var(--welmana-header-offset, 8rem) + 1rem); */
	scroll-padding-top: 1rem;
}

/* Only shared navigation appearance lives here; each header owns its layout. */
.public-menu, .members-header-standard .members-menu {
	min-width: 0;
}

.public-menu summary, .members-header-standard .members-menu summary {
	padding: 0.75rem;
	color: var(--welmana-brand-green);
	font-weight: 700;
	border-radius: var(--welmana-nav-radius);
	cursor: pointer;
	transition: background-color var(--welmana-nav-transition-duration) ease;
}

.public-menu summary:is(:hover, :focus-visible), .members-header-standard .members-menu summary:is(:hover, :focus-visible) {
	background: var(--welmana-nav-hover-background);
}

.global-nav__link, .members-header-standard .members-nav a {
	align-items: center;
	min-width: 5em;
	min-height: 2.75rem;
	padding: 0.5rem 0.625rem;
	border-radius: var(--welmana-nav-radius);
	white-space: nowrap;
	transition: color var(--welmana-nav-transition-duration) ease, background-color var(--welmana-nav-transition-duration) ease;
}

.site-header .global-nav__link:is(:hover, :focus-visible), .members-header.members-header-standard .members-nav a:is(:hover, :focus-visible) {
	color: var(--welmana-brand-green);
	background: var(--welmana-nav-hover-background);
}

@media (prefers-reduced-motion: reduce) {
	.global-nav__link, .public-menu summary, .members-header-standard .members-nav a, .members-header-standard .members-menu summary {
		transition: none;
	}
}

/* Public and member footers share the same menu layout. */
.members-footer-links, .site-footer__links {
	--members-footer-link-gap: 2rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--members-footer-link-gap);
	padding: 0;
	margin: 0;
	list-style: none;
	font-size: 0.875rem;
}

.members-footer-links > li + li, .site-footer__links > li + li {
	position: relative;
}

/* Decorative separators stay outside the link and are not read aloud. */
.members-footer-links > li + li::before, .site-footer__links > li + li::before {
	content: "";
	position: absolute;
	left: calc(var(--members-footer-link-gap) / -2);
	top: 50%;
	height: 1em;
	border-left: 1px solid currentColor;
	transform: translateY(-50%);
}

/* Fill short pages without fixing the footer over longer content. */
body {
	--welmana-admin-bar-height: 0px;
	/* --welmana-header-top: var(--welmana-admin-bar-height); */
	--welmana-header-top: 0px;
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--welmana-admin-bar-height));
	min-height: calc(100dvh - var(--welmana-admin-bar-height));
}

/* WordPress owns these pixel-based admin-bar dimensions and breakpoint. */
body.admin-bar {
	--welmana-admin-bar-height: 32px;
}

body > main {
	flex: 1 0 auto;
}

body > header, body > footer {
	flex-shrink: 0;
}

@media (max-width: 782px) {
	body.admin-bar {
		--welmana-admin-bar-height: 46px;
	}
}

/* WordPress scrolls its admin bar out of view at this core breakpoint. */
@media (max-width: 600px) {
	body.admin-bar {
		--welmana-header-top: 0px;
	}
}

/* Leave room for reading in landscape and zoomed, short viewports. */
@media (max-height: 30em) {
	:root {
		--welmana-header-position: relative;
	}

	body.admin-bar, body {
		--welmana-header-top: 0px;
	}

	html {
		scroll-padding-top: 1rem;
	}
}

.site-shell, .management-archive, .management-single, .member-service, .kawaraban, .real-event {
	width: var(--welmana-member-page-width, min(var(--welmana-content-width), calc(100% - 2 * var(--welmana-content-gutter))));
	margin-inline: auto;
}

.site-main .entry--page, .site-main .comments-area, .single .site-main .entry-content, .member-service:not(.member-service-archive) .entry-content, .member-service .comments-area, .management-single .description {
	max-width: var(--welmana-reading-width);
	margin-inline: auto;
}

@media (max-width: 43.75em) {
	:root {
		--welmana-content-gutter: 1rem;
	}
}

.welmana-back-to-top {
	position: fixed;
	right: calc(1rem + env(safe-area-inset-right, 0px));
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 4.25rem;
	height: 4.25rem;
	padding: 0.5rem;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgb(251 230 216 / 65%);
	color: #855334;
	box-shadow: 0 3px 12px rgb(0 0 0 / 8%);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	animation: welmana-back-to-top-appear 500ms ease-out;
}

.welmana-back-to-top[hidden] {
	display: none;
}

.welmana-back-to-top:hover {
	background: rgb(245 211 187 / 80%);
	color: #855334;
}

.welmana-back-to-top:focus-visible {
	outline: 3px solid #176f0d;
	outline-offset: 3px;
}

.welmana-back-to-top__arrow {
	font-size: 1.75rem;
	line-height: 1;
}

@keyframes welmana-back-to-top-appear {
	from {
		opacity: 0;
		transform: translateY(0.5rem);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.welmana-back-to-top {
		animation: none;
	}
}
