.tm-header-tools {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: .125rem;
	margin-inline: auto 1.3rem;
}

.tm-header-tool-toggle {
	align-items: center;
	border-radius: 50%;
	color: var(--tm-color-sumi-midori);
	cursor: pointer;
	display: grid;
	height: 2.75rem;
	list-style: none;
	place-items: center;
	touch-action: manipulation;
	width: 2.75rem;
}

.tm-header-tool-toggle::-webkit-details-marker {
	display: none;
}

.tm-header-tool[open] > .tm-header-tool-toggle,
.tm-header-tool-toggle:hover {
	background: color-mix(in srgb, var(--tm-color-sumi-midori) 8%, transparent);
}

.tm-header-panel {
	background: var(--tm-color-kami-shiro);
	border: 1px solid var(--tm-border-subtle);
	box-shadow: 0 .5rem 1.5rem color-mix(in srgb, var(--tm-color-nure-zumi) 10%, transparent);
	box-sizing: border-box;
	font: 400 .875rem/1.4 var(--tm-font-ui, sans-serif);
	inset-block-start: calc(100% + .4rem);
	inset-inline-end: max(1.2rem, calc((100vw - 82rem) / 2));
	max-width: calc(100% - 2.4rem);
	padding: .5rem;
	position: absolute;
	z-index: 1;
}

.tm-header-tool:not([open]) > .tm-header-panel {
	display: none;
}

.tm-language-switches {
	min-width: 10rem;
}

.tm-header-panel .tm-language-switch {
	align-items: center;
	background: transparent;
	border: 0;
	box-sizing: border-box;
	color: var(--tm-color-sumi-midori);
	display: flex;
	font: inherit;
	gap: .75rem;
	justify-content: space-between;
	min-height: 2.75rem;
	padding: .45rem .7rem;
	text-align: start;
	text-decoration: none;
	width: 100%;
}

.tm-header-panel .tm-language-switch[aria-current="true"] {
	background: color-mix(in srgb, var(--tm-color-sumi-midori) 8%, transparent);
	font-weight: 600;
}

.tm-header-panel .tm-language-switch:hover {
	text-decoration: underline;
}

.tm-header-search {
	align-items: stretch;
	display: flex;
	gap: .5rem;
	width: 20rem;
}

.tm-header-search input,
.tm-header-search button {
	border: 1px solid var(--tm-border-subtle);
	border-radius: 0;
	box-sizing: border-box;
	font: inherit;
	min-height: 2.75rem;
	padding: .4rem .7rem;
}

.tm-header-search input {
	background: transparent;
	flex: 1;
	font-size: 1rem;
	min-width: 0;
}

.tm-header-search button {
	background: var(--tm-color-sumi-midori);
	color: var(--tm-color-kami-shiro);
	cursor: pointer;
	white-space: nowrap;
}

.tm-header-tool :focus-visible {
	outline: 2px solid var(--tm-color-sumi-midori);
	outline-offset: 2px;
}

.tm-header-tools + .tm-menu-toggle {
	align-content: center;
	min-height: 2.75rem;
	min-width: 2.75rem;
}

@media (max-width: 48rem) {
	.tm-header-tools {
		gap: 0;
		margin-inline-end: 1.05rem;
	}
}

.tm-edition-hero .tm-image-credit {
	display: block;
}

.tm-edition-content {
	overflow-wrap: anywhere;
}

.tm-edition-content figure,
.tm-edition-content img {
	max-width: 100%;
}

.tm-edition-content img {
	height: auto;
}

.tm-edition-content .wp-block-table {
	overflow-x: auto;
}

.tm-edition-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin-block: 1.5rem 2rem;
}

.tm-edition-search input {
	box-sizing: border-box;
	width: min(100%, 20rem);
}

.tm-edition-pages {
	display: flex;
	gap: 1.5rem;
	margin-block: 2rem;
}

/* 本番旧版の美濃茶陶の扉絵は左右端の茶碗まで含む。 */
.single-post .tm-edition-hero--contain img {
	object-fit: contain !important;
}

/* 英語版Aboutのステートメントは本文幅で折り返す。 */
html[lang="en"] .tm-edition.page .tm-about-page .tm-about-statement-line {
	white-space: normal;
}
