:root {
	--aoki-focus: #1769aa;
	--aoki-text: #222;
}

.aoki-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	transform: translateY(-160%);
	padding: 10px 16px;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.aoki-skip-link:focus {
	transform: translateY(0);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.screen-reader-text:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto !important;
	height: auto !important;
	padding: 10px 16px !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: normal !important;
	background: #fff;
	color: #111;
}

html {
	overflow-x: clip;
}

body,
button,
input,
select,
textarea {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

body {
	color: var(--aoki-text);
	line-height: 1.7;
}

.post p,
.entry-content p,
.st-kaiwa-hukidashi {
	line-height: 1.8;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--aoki-focus);
	outline-offset: 3px;
}

/* 主要操作はタッチ端末でも押しやすい44pxを確保する。 */
nav.smanone > ul.menu > li > a,
.wp-block-search__input,
.wp-block-search__button,
#searchform input,
#searchform button,
#side select,
#footer select {
	min-height: 44px;
	box-sizing: border-box;
}

#searchform .aoki-search-input {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

#searchform .aoki-search-submit {
	display: inline-flex;
	flex: 0 0 56px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid #e1e5e3;
	background: #fff;
	color: #24322c;
	cursor: pointer;
}

#searchform .aoki-search-submit:hover {
	background: #edf7f1;
}

#page-top .aoki-page-top-link {
	display: flex;
	align-items: center;
	justify-content: center;
}

nav.smanone > ul.menu > li > a {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sns li a,
.st-author-profile .sns li a {
	min-width: 44px;
	min-height: 44px;
}

/* 密集した収穫カレンダーも最低限のタップ余白を持たせる。 */
.aoki-fm-cal-vname {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding-block: 4px;
}

/* 明るいフッター写真の上でも文字を読めるよう、背景だけを暗くする。 */
#footer {
	position: relative;
}

#footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(7, 26, 18, .72);
	pointer-events: none;
}

#footer > * {
	position: relative;
	z-index: 1;
}

#footer a {
	text-decoration-thickness: .08em;
	text-underline-offset: .2em;
}

#footer a:hover,
#footer a:focus-visible {
	text-decoration: underline;
}

.js-scrollable {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
}

.js-scrollable[data-scroll-hint="true"]::before {
	content: "横にスクロールできます →";
	display: block;
	position: sticky;
	left: 0;
	width: max-content;
	margin: 0 0 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #1f2937;
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
}

@media only screen and (min-width: 600px) {
	#st-magazine .kanren .st-top-box,
	.kanren dl.heightLine,
	.st-cardstyle .shortcode-kanren > dl {
		display: flex;
		flex-direction: column;
	}

	#st-magazine .kanren .st-top-box dd,
	.kanren dl.heightLine dd,
	.st-cardstyle .shortcode-kanren > dl > dd {
		flex: 1 1 auto;
	}

	/*
	 * トップページの2列記事カードを等高化する。
	 * タイトルは省略せず、画像比率と本文の最低高だけを揃える。
	 */
	.st-cardstyle .shortcode-kanren > dl > dt {
		aspect-ratio: 16 / 9;
		height: auto;
		overflow: hidden;
		background: #eef3ef;
	}

	.st-cardstyle .shortcode-kanren > dl > dt > a {
		display: block;
		width: 100%;
		height: 100%;
	}

	.st-cardstyle .shortcode-kanren > dl > dt img {
		display: block;
		width: 100% !important;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	.st-cardstyle .shortcode-kanren > dl > dd {
		min-height: 128px;
		box-sizing: border-box;
	}
}

/* H2直下の記事カード見出しをH3へ直しても旧H5と同じ見た目を保つ。 */
.shortcode-kanren .kanren-t.st-css-no {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.55;
}

.shortcode-kanren .kanren-t.st-css-no::before,
.shortcode-kanren .kanren-t.st-css-no::after {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
