/* AsaYoru（クラシックテーマ）。色は CSS 変数（theme.json とカスタマイズ）。box-shadow は使わない。 */

/* ---------- 全体 ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 1rem;
}
body {
	margin: 0;
	background: var(--ay-bg);
	color: var(--ay-text);
	font-family: var(--ay-font);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	line-height: 1.85;
	letter-spacing: 0.02em;
	overflow-wrap: anywhere;
	line-break: strict;
	-webkit-font-smoothing: antialiased;
}
img,
video,
iframe {
	max-width: 100%;
}
img {
	height: auto;
	vertical-align: middle;
}
a {
	color: var(--ay-link);
}
a:hover {
	text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: 0.01em;
}
:focus-visible {
	outline: 2px solid var(--ay-primary);
	outline-offset: 2px;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.ay-skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	z-index: 100;
	top: 8px;
	left: 8px;
	padding: 0.5rem 1rem;
	background: var(--ay-bg);
	color: var(--ay-text);
}
/* ---------- 枠 ---------- */
.ay-container {
	width: 100%;
	max-width: calc(var(--ay-wide) + var(--ay-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--ay-gutter);
}
.ay-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
	padding-block: 2.5rem 6rem;
}
@media (min-width: 960px) {
	.ay-sidebar-right .ay-layout:not(.is-wide) {
		grid-template-columns: minmax(0, 1fr) var(--ay-sidebar);
	}
	.ay-sidebar-left .ay-layout:not(.is-wide) {
		grid-template-columns: var(--ay-sidebar) minmax(0, 1fr);
	}
	.ay-sidebar-left .ay-layout:not(.is-wide) .ay-sidebar {
		order: -1;
	}
}
/* サイドバーなしの記事・固定ページは、読みやすい幅にする */
.ay-sidebar-none.single .ay-main,
.ay-sidebar-none.page:not(.page-template-page-wide) .ay-main,
.ay-sidebar-none.error404 .ay-main {
	width: 100%;
	max-width: var(--ay-content);
	margin-inline: auto;
}
.ay-main {
	min-width: 0;
}

/* ---------- ヘッダー ---------- */
.ay-header {
	background: var(--ay-header-bg);
	color: var(--ay-header-text);
	border-bottom: 1px solid var(--ay-line);
}
.ay-header-sticky .ay-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
.ay-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	min-height: 64px;
	padding-block: 0.9rem;
}
.ay-branding {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin-right: auto;
}
.ay-site-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
}
.ay-site-title a {
	color: inherit;
	text-decoration: none;
}
.ay-site-logo {
	margin: 0;
	line-height: 1;
}
.ay-branding .custom-logo {
	display: block;
	width: auto;
	max-height: 44px;
}
/* 夜のロゴ：夜の表示のときだけ、朝のロゴ（またはサイト名）と入れ替える */
.ay-logo-night-link {
	display: none;
}
:root[data-ay-theme="night"] .has-night-logo .custom-logo-link,
:root[data-ay-theme="night"] .has-night-logo .ay-logo-day-text {
	display: none;
}
:root[data-ay-theme="night"] .ay-logo-night-link {
	display: block;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-ay-theme]) .has-night-logo .custom-logo-link,
	:root:not([data-ay-theme]) .has-night-logo .ay-logo-day-text {
		display: none;
	}
	:root:not([data-ay-theme]) .ay-logo-night-link {
		display: block;
	}
}
.ay-tagline {
	margin: 0;
	opacity: 0.75;
	font-size: 0.75rem;
	line-height: 1.5;
}
.ay-header-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	order: 2;
}
.ay-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-size: 1.375rem;
	cursor: pointer;
}
/* 朝・夜の切り替えボタン：朝は月、夜は太陽を出す */
.ay-mode-night,
:root[data-ay-theme="night"] .ay-mode-day {
	display: none;
}
:root[data-ay-theme="night"] .ay-mode-night {
	display: inline-flex;
}
.ay-mode-day,
.ay-mode-night {
	align-items: center;
}
.ay-mode-day {
	display: inline-flex;
}
body {
	transition: background-color 0.2s ease, color 0.2s ease;
}
.ay-icon-button:hover {
	background: color-mix(in srgb, currentColor 8%, transparent);
}

/* メニュー：スマホは開け閉め、PC は横並び */
.ay-primary-nav {
	order: 3;
	flex-basis: 100%;
	display: none;
	padding-block: 0.5rem 1rem;
}
.ay-primary-nav.is-open {
	display: block;
}
.ay-menu,
.ay-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ay-menu a {
	display: block;
	padding: 0.6rem 0.25rem;
	color: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid var(--ay-line);
}
.ay-menu .sub-menu a {
	padding-left: 1.25rem;
	font-weight: 400;
}
.ay-menu a:hover,
.ay-menu .current-menu-item > a {
	color: var(--ay-primary);
}
@media (min-width: 960px) {
	.ay-menu-toggle {
		display: none;
	}
	.ay-primary-nav {
		order: 1;
		flex-basis: auto;
		display: block;
		padding: 0;
	}
	.ay-menu {
		display: flex;
		gap: 0.25rem 1.5rem;
	}
	.ay-menu > li {
		position: relative;
	}
	.ay-menu a {
		padding: 0.5rem 0;
		border: 0;
		font-size: 0.875rem;
	}
	.ay-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: -1rem;
		z-index: 60;
		min-width: 13rem;
		padding: 0.5rem 0;
		border: 1px solid var(--ay-line);
		border-radius: 8px;
		background: var(--ay-header-bg);
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.15s ease;
	}
	.ay-menu li:hover > .sub-menu,
	.ay-menu li:focus-within > .sub-menu {
		visibility: visible;
		opacity: 1;
	}
	.ay-menu .sub-menu a {
		padding: 0.4rem 1rem;
	}
}

/* ヘッダーの検索 */
.ay-header-search {
	padding-block: 0.75rem 1rem;
	border-top: 1px solid var(--ay-line);
}
.ay-header-search[hidden] {
	display: none;
}

/* ---------- 検索フォーム ---------- */
.ay-search-form {
	display: flex;
	max-width: 36rem;
	border: 1px solid var(--ay-line);
	border-radius: 999px;
	background: var(--ay-bg);
	overflow: hidden;
}
.ay-search-form:focus-within {
	border-color: var(--ay-primary);
}
.ay-search-input {
	flex: 1;
	min-width: 0;
	padding: 0.6rem 1.1rem;
	border: 0;
	background: transparent;
	font-size: 1rem;
	outline: none;
}
.ay-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	border: 0;
	background: transparent;
	color: var(--ay-muted);
	font-size: 1.25rem;
	cursor: pointer;
}
.ay-search-submit:hover {
	color: var(--ay-primary);
}

/* ---------- パンくず ---------- */
.ay-breadcrumbs {
	margin-bottom: 1.75rem;
	color: var(--ay-muted);
	font-size: 0.8125rem;
}
.ay-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ay-breadcrumbs li {
	display: flex;
	align-items: center;
	min-width: 0;
}
.ay-breadcrumbs li + li::before {
	content: "";
	flex: none;
	width: 0.4em;
	height: 0.4em;
	margin: 0 0.7em;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}
.ay-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}
.ay-breadcrumbs a:hover {
	color: var(--ay-link);
	text-decoration: underline;
}
.ay-breadcrumbs [aria-current] {
	flex: 1 1 0;
	min-width: 6em;
}
.ay-breadcrumbs [aria-current] span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- 一覧の見出し ---------- */
.ay-archive-header {
	margin-bottom: 2.25rem;
}
.ay-archive-title {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--x-large, 1.5rem);
}
.ay-archive-description {
	color: var(--ay-muted);
	font-size: 0.9375rem;
}
.ay-archive-header .ay-search-form {
	margin-block: 1rem;
}
.ay-sort-bar {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.75rem;
}
.ay-front-top {
	margin-bottom: 4rem;
}
.ay-front-bottom {
	margin-top: 4rem;
}
/* 記事・一覧・トップページの上下に置いたウィジェットどうしの間 */
:is(.ay-front-top, .ay-front-bottom, .ay-single-bottom, .ay-archive-bottom) > * + * {
	margin-top: 3rem;
}
.ay-empty {
	color: var(--ay-muted);
}

/* ---------- ページ送り ---------- */
.pagination {
	margin-top: 4rem;
}
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.375rem;
}
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--ay-line);
	border-radius: 8px;
	color: var(--ay-text);
	font-size: 0.875rem;
	text-decoration: none;
}
.pagination a.page-numbers:hover {
	border-color: var(--ay-primary);
	color: var(--ay-primary);
}
.pagination .page-numbers.current {
	border-color: var(--ay-text);
	background: var(--ay-text);
	color: var(--ay-bg);
}
.pagination .page-numbers.dots {
	border: 0;
}

/* ---------- 記事ページ ---------- */
.ay-entry-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}
.ay-entry-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large, 1.75rem);
}
.ay-entry-cat {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: var(--ay-muted);
	font-size: 0.8125rem;
	text-decoration: none;
}
.ay-entry-cat:hover {
	color: var(--ay-link);
}
.ay-entry-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	color: var(--ay-muted);
	font-size: 0.8125rem;
}
.ay-entry-dates time {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
}
.ay-entry-eyecatch {
	margin: 2rem 0 0;
}
.ay-entry-eyecatch img {
	display: block;
	width: 100%;
	border-radius: var(--ay-radius);
}
.page .ay-entry-header,
.page-template-page-wide .ay-entry-header {
	margin-bottom: 0.5rem;
}

/* 本文 */
.ay-entry-content {
	margin-top: 3rem;
}
.ay-entry-content > * {
	margin-block: 0;
}
.ay-entry-content > * + * {
	margin-block-start: 1.75em;
}
.ay-entry-content > h2 {
	margin-block-start: 4.5rem;
	font-size: var(--wp--preset--font-size--x-large, 1.5rem);
}
.ay-entry-content > h3 {
	margin-block-start: 3.25rem;
	font-size: var(--wp--preset--font-size--large, 1.2rem);
}
.ay-entry-content > h4 {
	margin-block-start: 2.5rem;
	font-size: 1rem;
}
.ay-entry-content > h2 + *,
.ay-entry-content > h3 + *,
.ay-entry-content > h4 + * {
	margin-block-start: 1.25rem;
}
.ay-entry-content > h2 + * {
	margin-block-start: 2rem;
}
.ay-entry-content :where(ul, ol):not([class*="kiji-kaizen"]):not([class*="gakku"]) {
	padding-inline-start: 1.5em;
}
.ay-entry-content :where(ul, ol):not([class*="kiji-kaizen"]):not([class*="gakku"]) li + li {
	margin-block-start: 0.35em;
}
.ay-entry-content strong {
	background: linear-gradient(transparent 62%, var(--ay-mark) 62%);
}
.ay-entry-content .wp-block-image img {
	border: 1px solid var(--ay-line);
	border-radius: 8px;
}
.ay-entry-content figcaption {
	color: var(--ay-muted);
	font-size: 0.8125rem;
	text-align: center;
}
.ay-entry-content blockquote {
	margin-inline: 0;
	padding-left: 1.25rem;
	border-left: 4px solid var(--ay-line);
	color: var(--ay-muted);
}
.ay-entry-content .alignwide,
.ay-entry-content .alignfull {
	max-width: 100%;
}
.ay-entry-content .wp-block-button__link {
	background: var(--ay-primary);
	border-radius: 8px;
	font-weight: 700;
}

/* タグ */
.ay-entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 3.5rem;
}
.ay-entry-tags a {
	padding: 0.25em 0.8em;
	border: 1px solid var(--ay-line);
	border-radius: 999px;
	color: var(--ay-muted);
	font-size: 0.8125rem;
	text-decoration: none;
}
.ay-entry-tags a::before {
	content: "#";
}
.ay-entry-tags a:hover {
	border-color: var(--ay-primary);
	color: var(--ay-primary);
}
.ay-single-bottom,
.ay-archive-bottom {
	margin-top: 3.5rem;
}

/* 前後の記事 */
.ay-post-nav {
	margin-top: 3.5rem;
}
.ay-post-nav .nav-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1rem;
}
.ay-post-nav a {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	height: 100%;
	padding: 1rem 1.25rem;
	border: 1px solid var(--ay-line);
	border-radius: var(--ay-radius);
	color: var(--ay-text);
	text-decoration: none;
}
.ay-post-nav .nav-next a {
	align-items: flex-end;
	text-align: right;
}
.ay-post-nav a:hover {
	border-color: var(--ay-primary);
	color: var(--ay-primary);
}
.ay-nav-label {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	color: var(--ay-muted);
	font-size: 0.75rem;
}
.ay-nav-title {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.6;
}

/* 関連記事 */
.ay-related {
	margin-top: 4.5rem;
}
.ay-related-title {
	margin: 0 0 1.5rem;
	font-size: var(--wp--preset--font-size--large, 1.2rem);
}

/* ページ分割 */
.ay-page-links {
	margin-top: 2rem;
	font-weight: 700;
}

/* ---------- サイドバー・ウィジェット ---------- */
.ay-sidebar {
	display: flex;
	flex-direction: column;
	gap: 3rem;
	min-width: 0;
	font-size: 0.875rem;
}
.ay-sidebar-sticky {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem);
	display: flex;
	flex-direction: column;
	gap: 3rem;
}
.ay-header-sticky .ay-sidebar-sticky {
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 5.5rem);
}
.widget-title,
.widget .wp-block-heading {
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ay-text);
	font-size: 0.9375rem;
}
.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.widget li {
	border-bottom: 1px solid var(--ay-line);
}
.widget li a {
	display: block;
	padding: 0.6rem 0.25rem;
	color: var(--ay-text);
	text-decoration: none;
}
.widget li a:hover {
	color: var(--ay-link);
}
.widget .ay-search-form {
	max-width: none;
}

/* ---------- フッター ---------- */
.ay-footer {
	background: var(--ay-footer-bg);
	color: var(--ay-footer-text);
	font-size: 0.875rem;
}
.ay-footer a {
	color: inherit;
}
.ay-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
	padding-block: 4rem 1.5rem;
}
.ay-footer .widget-title,
.ay-footer .widget .wp-block-heading {
	border-bottom-color: currentColor;
}
.ay-footer .widget li {
	border-color: color-mix(in srgb, currentColor 18%, transparent);
}
.ay-footer .widget li a {
	color: inherit;
}
.ay-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 2rem;
}
.ay-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ay-footer-menu a {
	text-decoration: none;
}
.ay-footer-menu a:hover {
	text-decoration: underline;
}
.ay-copyright {
	margin: 0;
	font-size: 0.75rem;
}

/* ---------- コメント ---------- */
.ay-comments {
	margin-top: 4.5rem;
}
.ay-comment-list {
	padding: 0;
	list-style: none;
}
.ay-comment-list .comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--ay-line);
	font-size: 0.9375rem;
}
.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--ay-line);
	border-radius: 8px;
}
.comment-form .submit {
	padding: 0.7rem 1.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--ay-text);
	color: var(--ay-bg);
	font-weight: 700;
	cursor: pointer;
}

/* ---------- 絞り込み検索プラグインの結果の表 ---------- */
/* スマホ：画像と表を半分ずつ並べる */
.table_search_result_sp .layout_sp-row .result_product_img > * {
	flex: 1 1 0;
	min-width: 0;
}
.table_search_result_sp .layout_sp-row .result_product_img img {
	width: 100%;
	height: auto;
}

/* ---------- 夜の表示：白い背景が前提のプラグインの部品は「白いカード」のまま見せる ---------- */
/* 絞り込み検索プラグインの絞り込み・結果（色がプラグインの中で決め打ちのため）。
   テーマの色に自動で合うプラグインは、ここには入れない。 */
:root[data-ay-theme="night"] .ay-entry-content .result_refine,
:root[data-ay-theme="night"] .ay-entry-content form[id^="mpnds"],
:root[data-ay-theme="night"] .ay-entry-content [class*="refine_search"] {
	--wp--preset--color--background: #fff;
	--wp--preset--color--foreground: #1f2328;
	--ay-text: #1f2328;
	--ay-muted: #5f6670;
	--ay-link: var(--ay-link-day);
	color: #1f2328;
	color-scheme: light;
	background-color: #fff;
	border-radius: var(--ay-radius);
}
/* 画像は少しだけ暗くして、まぶしさを抑える */
:root[data-ay-theme="night"] .ay-entry-content img,
:root[data-ay-theme="night"] .ay-card-thumb img {
	filter: brightness(0.92);
}

/* ---------- 動きを減らす設定の人向け ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}
