/* =========================================================
   なんでもDIY Child — 作業ノート デザイン
   ベース: ネイビー #1F2A37 / アクセント: オレンジ #E8772E
   親テーマ（AFFINGER）の CSS より後に読み込む。
   #st-ami を頭に付けて、親テーマの指定より優先させている。
   ========================================================= */

:root {
	--diy-navy: #1F2A37;
	--diy-navy-2: #2E3B4C;
	--diy-accent: #E8772E;
	--diy-accent-text: #B4531A; /* 白背景の上で文字に使うオレンジ（4.5:1 以上） */
	--diy-bg: #F6F5F2;
	--diy-line: #E3E1DB;
	--diy-text: #2B2B2B;
	--diy-sub: #5F6672;
	--diy-soft: #E4E2DC;
	--diy-radius: 10px;
}

/* ---------- 全体 ---------- */
body {
	background: var(--diy-bg);
	color: var(--diy-text);
}
#st-ami #wrapper,
#st-ami #wrapper-in,
#st-ami #content-w {
	background: transparent;
}
#st-ami a {
	color: var(--diy-navy);
}
#st-ami a:hover {
	color: var(--diy-accent-text);
}

/* ---------- ヘッダー ---------- */
#st-ami #headbox-bg,
#st-ami #header-full,
#st-ami #gazou-wide,
#st-ami #st-menubox,
#st-ami #st-menuwide {
	background: var(--diy-navy);
	background-image: none;
	border: 0;
}
#st-ami #st-text-logo .sitename a {
	color: #FFFFFF;
	font-weight: 900;
	letter-spacing: 0.04em;
}
#st-ami #st-text-logo .descr {
	color: #C9D1DB;
	font-weight: 400;
}
#st-ami #st-menuwide {
	border-top: 1px solid var(--diy-navy-2);
}
#st-ami #st-menuwide .menu > li {
	border: 0;
	background: transparent;
}
#st-ami #st-menuwide .menu > li > a {
	color: #C9D1DB;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	font-size: 14px;
}
#st-ami #st-menuwide .menu > li > a:hover,
#st-ami #st-menuwide .menu > li.current-menu-item > a {
	color: #FFFFFF;
	border-bottom-color: var(--diy-accent);
}
/* スマホ: ハンバーガーとサイト名 */
#st-ami #s-navi dt.trigger {
	background: var(--diy-navy);
}
#st-ami #s-navi .acordion_button .op,
#st-ami #s-navi .acordion_button i {
	color: #FFFFFF;
}
#st-ami #st-mobile-logo #st-text-logo .descr {
	color: #C9D1DB;
	font-size: 11px;
	line-height: 1.5;
	margin: 0;
}
/* AFFINGER がスマホでサイト名を出さない設定のときの補い */
#st-ami #st-mobile-logo #st-text-logo::before {
	content: "なんでもDIY";
	display: block;
	color: #FFFFFF;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0.04em;
	line-height: 1.4;
}
#st-ami #st-mobile-logo #st-text-logo:has(.sitename)::before {
	content: none;
}

/* ヘッダー下のカテゴリ画像カード（トップページは独自の「カテゴリから探す」を出すので隠す） */
.diy-front-page #st-header-cardlink-wrapper {
	display: none;
}

/* ---------- 本文エリア ---------- */
#st-ami #contentInner main {
	background: #FFFFFF;
	border: 1px solid var(--diy-line);
	border-radius: 12px;
}
#st-ami .entry-content p,
#st-ami .entry-content li {
	font-size: 17px;
	line-height: 1.9;
	color: var(--diy-text);
}
#st-ami .entry-title {
	color: var(--diy-navy);
	font-weight: 900;
	line-height: 1.5;
}
#st-ami #breadcrumb,
#st-ami #breadcrumb a,
#st-ami .blogbox,
#st-ami .kdate {
	color: var(--diy-sub);
	font-size: 12px;
}
#st-ami .st-catgroup .catname {
	background: var(--diy-navy);
	color: #FFFFFF;
	border-radius: 4px;
	padding: 2px 10px;
	font-weight: 700;
}

/* 見出し（AFFINGER の「カスタム見出し」スタイルを選んだものは除く） */
#st-ami .entry-content h2:not([class*="is-style-st-heading-custom-"]):not(.st-css-no) {
	background: none;
	background-image: none;
	color: var(--diy-navy);
	border: 0;
	border-left: 6px solid var(--diy-navy);
	border-radius: 0;
	padding: 4px 0 4px 14px;
	margin: 2.2em 0 1em;
	font-size: 22px;
	line-height: 1.5;
	font-weight: 900;
}
#st-ami .entry-content h3:not([class*="is-style-st-heading-custom-"]):not(.st-css-no) {
	background: none;
	background-image: none;
	color: var(--diy-navy);
	border: 0;
	border-bottom: 2px solid var(--diy-line);
	border-radius: 0;
	padding: 0 0 6px 18px;
	margin: 1.8em 0 0.8em;
	font-size: 19px;
	line-height: 1.5;
	position: relative;
}
#st-ami .entry-content h2:not([class*="is-style-st-heading-custom-"]):not(.st-css-no)::before,
#st-ami .entry-content h2:not([class*="is-style-st-heading-custom-"]):not(.st-css-no)::after,
#st-ami .entry-content h3:not([class*="is-style-st-heading-custom-"]):not(.st-css-no)::after {
	content: none;
	display: none;
}
#st-ami .entry-content h3:not([class*="is-style-st-heading-custom-"]):not(.st-css-no)::before {
	content: "";
	display: block;
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 8px;
	height: 0.9em;
	border-radius: 2px;
	background: var(--diy-accent);
	border: 0;
}
#st-ami .entry-content h4 {
	color: var(--diy-navy);
	font-size: 17px;
}

/* 表 */
#st-ami .entry-content table {
	border-collapse: collapse;
}
#st-ami .entry-content th,
#st-ami .entry-content td {
	border: 1px solid var(--diy-line);
	padding: 8px 12px;
	font-size: 15px;
}
#st-ami .entry-content thead th,
#st-ami .entry-content thead td {
	background: var(--diy-navy);
	color: #FFFFFF;
}

/* ---------- 共通ボックス（リライト案・ブロックパターンで使用） ---------- */
#st-ami .diy-box {
	border: 2px solid var(--diy-navy);
	border-radius: 8px;
	padding: 0 20px 12px;
	margin: 1.5em 0;
}
#st-ami .diy-box .diy-box-label,
#st-ami .diy-conclusion .diy-box-label {
	background: var(--diy-navy);
	color: #FFFFFF;
	margin: 0 -20px 12px;
	padding: 6px 16px;
	font-size: 0.9em;
	line-height: 1.6;
	border-radius: 5px 5px 0 0;
}
#st-ami .diy-box ul {
	margin-bottom: 0;
}
#st-ami .diy-spec .diy-spec-list {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 16px;
}
#st-ami .diy-conclusion {
	background: var(--diy-bg);
	border-radius: var(--diy-radius);
	padding: 0 20px 6px;
	margin: 1.5em 0;
	overflow: hidden;
}
#st-ami .diy-conclusion .diy-box-label {
	background: transparent;
	color: var(--diy-navy);
	margin: 0;
	padding: 12px 0 0;
}
#st-ami .diy-caution {
	background: #FDF1E8;
	border: 1px solid var(--diy-accent);
	border-radius: var(--diy-radius);
	padding: 12px 18px;
	margin: 1.5em 0;
}
#st-ami .diy-caution p {
	margin: 0;
	font-size: 15px;
}

/* ---------- サイドバー ---------- */
#st-ami #side aside .side-widgets,
#st-ami #side #mybox .side-widgets {
	background: #FFFFFF;
	border: 1px solid var(--diy-line);
	border-radius: var(--diy-radius);
	padding: 16px 18px;
	margin-bottom: 20px;
}
#st-ami #side .st-widgets-title,
#st-ami #side .st-widgets-title span,
#st-ami #side .wp-block-heading,
#st-ami #side .rss-bar {
	background: none;
	background-image: none;
	color: var(--diy-navy);
	border: 0;
	padding: 0;
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 700;
	text-align: left;
}
#st-ami #side .st-widgets-title::before,
#st-ami #side .st-widgets-title::after,
#st-ami #side .wp-block-heading::before,
#st-ami #side .wp-block-heading::after {
	content: none;
}
#st-ami #side ul li a {
	font-size: 14px;
	color: var(--diy-navy);
}
/* 「お知らせ」ウィジェット（AFFINGER） */
#st-ami #topnews-box .rss-bar,
#st-ami #topnews-box .news-ca {
	background: none;
	color: var(--diy-navy);
}
#st-ami #topnews-box dl {
	border-bottom: 1px solid var(--diy-line);
}
#st-ami #topnews-box dt,
#st-ami #topnews-box dt span {
	color: var(--diy-sub);
	font-size: 12px;
}
#st-ami #side .cat-item-1 {
	display: none; /* Uncategorized を一覧から隠す */
}

/* ---------- フッター ---------- */
#st-ami #wrapper-in > footer,
#st-ami #footer,
#st-ami #footer-wrapper {
	background: var(--diy-navy);
	color: #C9D1DB;
}
#st-ami #footer a,
#st-ami #footer .footerlogo,
#st-ami #footer .footerlogo a {
	color: #FFFFFF;
}

/* ---------- トップページ（parts/front.php） ---------- */
.diy-front-page #st-page .sns,
.diy-front-page #st-page p.author {
	display: none;
}
.diy-front {
	display: flex;
	flex-direction: column;
	gap: 40px;
}
#st-ami .diy-front .diy-sec-title {
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 16px;
	color: var(--diy-navy);
	font-size: 20px;
	font-weight: 900;
	display: flex;
	align-items: center;
	gap: 10px;
}
#st-ami .diy-front .diy-sec-title::before {
	content: "";
	display: block;
	width: 6px;
	height: 22px;
	border-radius: 2px;
	background: var(--diy-accent);
}
#st-ami .diy-front .diy-sec-title::after {
	content: none;
}
#st-ami .diy-front ul,
#st-ami .diy-front ol {
	list-style: none;
	margin: 0;
	padding: 0;
}
#st-ami .diy-front li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}
#st-ami .diy-front li::before {
	content: none;
}
.diy-cats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
#st-ami .diy-cat {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 110px;
	padding: 16px;
	background: #FFFFFF;
	border: 1px solid var(--diy-line);
	border-radius: var(--diy-radius);
	text-decoration: none;
}
#st-ami .diy-cat:hover {
	border-color: var(--diy-navy);
}
.diy-cat-mark {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--diy-navy);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 15px;
}
.diy-cat-name {
	font-weight: 700;
	font-size: 16px;
	color: var(--diy-navy);
}
.diy-cat-desc {
	font-size: 12px;
	color: var(--diy-sub);
}
.diy-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
#st-ami .diy-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #FFFFFF;
	border: 1px solid var(--diy-line);
	border-radius: var(--diy-radius);
	overflow: hidden;
	text-decoration: none;
}
#st-ami .diy-card:hover {
	border-color: var(--diy-navy);
}
.diy-card-thumb {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--diy-soft);
	overflow: hidden;
}
.diy-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.diy-card-noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--diy-sub);
	font-weight: 900;
	font-size: 14px;
	letter-spacing: 0.06em;
}
.diy-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 14px 16px;
}
.diy-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--diy-sub);
}
.diy-tag {
	background: var(--diy-navy);
	color: #FFFFFF;
	padding: 1px 8px;
	border-radius: 4px;
	font-weight: 700;
}
.diy-card-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.55;
	color: var(--diy-navy);
}
#st-ami .diy-more {
	text-align: center;
	margin: 20px 0 0;
}
#st-ami .diy-more a {
	display: inline-block;
	border: 2px solid var(--diy-navy);
	border-radius: 6px;
	padding: 10px 28px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}
.diy-pop {
	counter-reset: diy-pop;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
#st-ami .diy-pop li {
	counter-increment: diy-pop;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
#st-ami .diy-pop li::before {
	content: counter(diy-pop);
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--diy-accent);
	color: var(--diy-navy);
	font-weight: 900;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}
#st-ami .diy-pop a {
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- スマホ ---------- */
@media (max-width: 599px) {
	#st-ami #contentInner main {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}
	#st-ami .entry-content p,
	#st-ami .entry-content li {
		font-size: 16px;
	}
	#st-ami .entry-content h2:not([class*="is-style-st-heading-custom-"]):not(.st-css-no) {
		font-size: 19px;
	}
	#st-ami .entry-content h3:not([class*="is-style-st-heading-custom-"]):not(.st-css-no) {
		font-size: 17px;
	}
	.diy-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	#st-ami .diy-cat {
		min-height: 0;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		padding: 12px;
	}
	.diy-cat-mark {
		width: 34px;
		height: 34px;
		font-size: 13px;
	}
	.diy-cat-desc {
		flex-basis: 100%;
	}
	.diy-cards {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		background: #FFFFFF;
		border: 1px solid var(--diy-line);
		border-radius: var(--diy-radius);
	}
	#st-ami .diy-card {
		flex-direction: row;
		gap: 12px;
		padding: 12px;
		border: 0;
		border-bottom: 1px solid #EEECE7;
		border-radius: 0;
	}
	.diy-card-thumb {
		flex: none;
		align-self: flex-start;
		width: 96px;
		height: 72px;
		aspect-ratio: auto;
		border-radius: 6px;
	}
	.diy-card-body {
		padding: 0;
		gap: 4px;
	}
	.diy-card-title {
		font-size: 14px;
	}
	#st-ami .diy-spec .diy-spec-list {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (min-width: 600px) and (max-width: 959px) {
	.diy-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
