/**
 * ALMOND CLINIC GUIDE 共通スタイル（全ページで読み込む）
 * 色と書体はここの変数で持つ。値は承認済みデザインに合わせてある。
 *
 * このファイルは JIN のカスタマイザー CSS より後に出力される（functions.php の acg_print_styles）。
 * そのため JIN 側と同じ詳細度の指定なら、こちらが勝つ。
 */

:root {
	--acg-brand: #a7552c;
	--acg-brand-dark: #804024;
	--acg-ink: #3f362f;
	--acg-muted: #7e746b;
	--acg-paper: #fffdf9;
	--acg-cream: #f5f1ea;
	--acg-sand: #ebe3d7;
	--acg-line: #e3dbd0;
	--acg-serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
	--acg-sans: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
	--acg-latin: Georgia, serif;

	/* ヘッダー・フッター固有の色 */
	--acg-strip-bg: #e9ded2;
	--acg-strip-ink: #6e4f38;
	--acg-pill-line: #b77b53;
	--acg-guide-bar: #f5f0e7;
	--acg-footer-bg: #eee8df;
	--acg-footer-line: #d9cfc2;

	/* 記事カードの色面（アイキャッチ画像が無いとき）。カテゴリごとの地色と文字色 */
	--acg-visual-bg-aga: #ede6dc;
	--acg-visual-ink-aga: #75604e;
	--acg-visual-bg-removal: #efe5df;
	--acg-visual-ink-removal: #8d6c61;
	--acg-visual-bg-diet: #e8eadf;
	--acg-visual-ink-diet: #747d62;
	--acg-visual-circle: #a78e7340;
}

/* =========================================================
 * サイト全体の地
 * ========================================================= */

/* JIN のカスタマイザーが #wrapper に #fff を出すので上書きする */
#wrapper {
	background-color: var(--acg-paper);
}

/* ページ内リンク（カテゴリページの「はじめての方へ ↓」など）は滑らかに動かし、行き先の上に 110px 空ける */
html {
	scroll-behavior: smooth;
	scroll-padding-top: 110px;
}

/* =========================================================
 * GUIDE 部分の土台（ヘッダー・フッター・本文の .acg-main）
 * JIN は body#nofont-style（ID 指定）で書体を、a:link で文字色を決めているため、
 * body に書いても負ける。ブロックごとに指定する。
 * ========================================================= */

a.skip,
.clinic-header,
.site-header,
.site-footer,
.acg-main,
#info-dialog {
	font-family: var(--acg-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.9;
	letter-spacing: normal; /* JIN が body に 1px を付けているため。残すとスマホで予約ボタンが画面からはみ出す */
	color: var(--acg-ink);
	-webkit-font-smoothing: antialiased;
}

.clinic-header *,
.site-header *,
.site-footer *,
.acg-main *,
#info-dialog,
#info-dialog * {
	box-sizing: border-box;
}

/*
 * リンクの色。JIN の a:link（詳細度 0,1,1）に勝つため親クラス付きで書く。
 * そのぶん、色を持つリンク部品（.text-link 等）は「親クラス＋部品クラス」で書くこと。
 */
.clinic-header a,
.site-header a,
.site-footer a,
.acg-main a {
	color: inherit;
	text-decoration: none;
	touch-action: manipulation;
	transition: color .2s, background .2s, transform .2s;
}

.clinic-header a:hover,
.site-header a:hover,
.site-footer a:hover,
.acg-main a:hover {
	color: var(--acg-brand);
}

.clinic-header img,
.site-footer img,
.acg-main img {
	display: block;
	max-width: 100%;
}

/* 見出しと段落はデザインの初期値に揃える（JIN の本文用スタイルは .cps-post-main にしか付かない） */
.acg-main :is(h1, h2, h3, p) {
	margin: 0;
}

.acg-main :is(h1, h2, h3) {
	font-weight: 500;
}

.acg-main :is(h1, h2) {
	font-family: var(--acg-serif);
}

/* ボタン・入力欄の打ち消しは詳細度 0（:where）にして、各部品のクラス指定を優先させる */
:where(.site-header, .site-footer, .acg-main, #info-dialog) button,
:where(.site-header, .acg-main) input {
	font: inherit;
	touch-action: manipulation;
}

:where(.site-header, .site-footer, .acg-main, #info-dialog) button {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	transition: color .2s, background .2s, transform .2s;
}

:is(.clinic-header, .site-header, .site-footer, .acg-main, #info-dialog) :is(a, button, input, summary):focus-visible,
a.skip:focus-visible {
	outline: 2px solid var(--acg-brand);
	outline-offset: 5px;
}

/* =========================================================
 * 共通部品
 * ========================================================= */

.wrap {
	width: min(1120px, calc(100% - 80px));
	margin-inline: auto;
}

.eyebrow {
	display: block;
	font-family: var(--acg-latin);
	color: var(--acg-brand);
	font-size: 12px;
	letter-spacing: .15em;
}

/* テキストリンク（→ 付きの下線リンク）。.acg-main a の「色を継承」より強くするため親クラス付き */
.acg-main .text-link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 35px;
	font-size: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--acg-brand);
	color: var(--acg-brand);
}

/* セクションと見出し（英字の小見出し＋見出し＋説明。右に「すべて見る」等のリンクが付く） */
.section {
	padding: 76px 0;
}

.section-heading {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 32px;
	gap: 24px;
}

.section-heading h2 {
	font-size: 28px;
	letter-spacing: .08em;
	margin-top: 8px;
	line-height: 1.6;
}

.section-heading p {
	font-size: 12px;
	color: var(--acg-muted);
	margin-top: 12px;
}

/* 見出しの右の「すべて見る」等のリンク（トップの新着・記事ページの関連記事） */
.section-link {
	display: flex;
	align-items: center;
	gap: 24px;
	font-size: 12px;
	white-space: nowrap;
}

/* パンくず */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-block: 22px;
	font-size: 10px;
	color: var(--acg-muted);
}

.acg-main .breadcrumb a:hover {
	text-decoration: underline;
}

/* 表（カテゴリページの確認項目など） */
.acg-main table {
	width: 100%;
	min-width: 500px;
	border-collapse: collapse;
	font-size: 12px;
}

.acg-main :is(th, td) {
	padding: 16px;
	border: 1px solid var(--acg-line);
	text-align: left;
}

.acg-main th {
	background: var(--acg-cream);
	font-weight: 500;
}

.acg-main td:first-child {
	width: 26%;
	color: var(--acg-brand);
}

/* よくある疑問（details の開閉） */
.faq details {
	padding: 17px 0;
	border-bottom: 1px solid var(--acg-line);
}

.faq summary {
	cursor: pointer;
	font-size: 13px;
}

.faq details p {
	margin: 16px 0 0;
	font-size: 12px;
	color: var(--acg-muted);
}

/* 記事の件数（カテゴリページ・一覧ページ） */
.result-count {
	font-size: 11px;
	color: var(--acg-muted);
}

/* 枠線のボタン（一覧ページの「すべての記事を見る」など） */
.acg-main .outline-button {
	display: inline-block;
	padding: 10px 24px;
	border: 1px solid var(--acg-brand);
	font-size: 12px;
	color: var(--acg-brand);
}

.acg-main .outline-button:hover {
	background: var(--acg-brand);
	color: #fff;
}

.acg-main .empty-state .outline-button {
	margin-top: 20px;
}

/* 一覧ページ（記事をすべて見る・検索結果・記事タイプ。template-parts/article-list.php） */
.search-page {
	padding-block: 35px 80px;
}

.search-page h1 {
	margin-bottom: 24px;
	font-size: 28px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.solid-button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	background: var(--acg-brand);
	color: #fff;
	border: 1px solid var(--acg-brand);
	padding: 12px 25px;
	font-size: 12px;
	white-space: nowrap;
}

.solid-button:hover {
	background: var(--acg-brand-dark);
	color: #fff;
}

/* 本文へ移動（キーボード操作時だけ見える） */
a.skip {
	position: fixed;
	top: -100px;
	left: 20px;
	z-index: 100;
	background: #fff;
	padding: 10px;
}

a.skip:focus {
	top: 10px;
}

#acg-content:focus {
	outline: none;
}

/* =========================================================
 * ヘッダー上段：クリニック共通
 * ========================================================= */

.clinic-header {
	background: var(--acg-paper);
	border-bottom: 1px solid var(--acg-line);
}

.clinic-strip {
	text-align: center;
	background: var(--acg-strip-bg);
	color: var(--acg-strip-ink);
	padding: 5px 20px;
	font-size: 10px;
	letter-spacing: .03em;
}

.clinic-strip span {
	margin-left: 18px;
}

.clinic-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	padding-block: 23px;
}

.clinic-logo {
	width: 245px;
	flex-shrink: 0;
}

.clinic-logo img {
	width: 100%;
	height: auto;
}

.clinic-booking {
	display: flex;
	gap: 14px;
	align-items: center;
}

.clinic-booking > a {
	border: 1px solid var(--acg-pill-line);
	border-radius: 40px;
	padding: 10px 28px;
	color: var(--acg-brand);
	font-family: var(--acg-serif);
	font-size: 13px;
	text-align: center;
}

.clinic-booking > a:hover {
	background: var(--acg-brand);
	color: #fff;
}

.clinic-nav {
	display: flex;
	justify-content: flex-end;
	gap: 35px;
	padding: 0 0 19px;
	font-size: 11px;
}

.clinic-mobile-menu {
	display: none;
}

/* =========================================================
 * ヘッダー下段：GUIDE
 * ========================================================= */

.site-header {
	background: var(--acg-paper);
	border-bottom: 1px solid var(--acg-line);
	position: relative;
	z-index: 10;
}

.guide-header {
	background: var(--acg-guide-bar);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 108px;
	gap: 30px;
}

.guide-header .header-inner {
	height: 66px;
}

.guide-brand {
	font-family: Georgia, var(--acg-serif);
	font-size: 17px;
	letter-spacing: .04em;
	white-space: nowrap;
}

.guide-brand span {
	color: var(--acg-brand);
	margin-left: 5px;
	font-size: 14px;
	letter-spacing: .13em;
}

.desktop-nav {
	display: flex;
	gap: 32px;
	align-items: center;
	font-size: 12px;
	font-weight: 500;
}

.guide-header .desktop-nav {
	gap: 35px;
}

.header-tools {
	display: flex;
	gap: 15px;
}

.icon-button {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
}

.icon-button svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
}

.menu-button {
	display: none;
	width: 35px;
}

.menu-button span {
	display: block;
	height: 1px;
	background: var(--acg-ink);
	margin: 7px 0;
}

.mobile-nav {
	border-top: 1px solid var(--acg-line);
	padding: 16px 24px;
}

.mobile-nav a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid var(--acg-line);
	font-size: 13px;
}

.search-panel {
	padding-block: 22px;
	border-top: 1px solid var(--acg-line);
}

.search-panel label {
	display: block;
	font-size: 12px;
	margin-bottom: 10px;
}

.search-panel > div {
	display: flex;
	gap: 12px;
}

.search-panel input {
	background: #fff;
	border: 1px solid var(--acg-line);
	padding: 12px 16px;
	width: 100%;
	border-radius: 0;
}

.search-panel[hidden],
.mobile-nav[hidden] {
	display: none;
}

/* =========================================================
 * フッター
 * ========================================================= */

.site-footer {
	padding: 0; /* JIN の footer { padding: 15px 0 } を打ち消す */
	border-top: 1px solid var(--acg-line);
	background: var(--acg-footer-bg);
}

.footer-main {
	display: flex;
	justify-content: space-between;
	gap: 50px;
	padding: 58px 0 45px;
}

.brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 235px;
	flex-shrink: 0;
}

.brand img {
	width: 100%;
	height: auto;
}

.brand > span {
	font-family: var(--acg-latin);
	letter-spacing: .45em; /* 試作は styles.css の .4em を guide-pages.css で .45em に上書きしている */
	font-size: 12px;
	padding-left: .4em;
	line-height: 1.4;
	color: var(--acg-brand);
}

.footer-intro .brand {
	width: 230px;
}

.footer-intro p {
	font-family: var(--acg-serif);
	font-size: 18px;
	line-height: 1.9;
	margin: 24px 0 20px;
}

/* .site-footer a（色を継承）より強くするため、親クラス付きで書く */
.site-footer .clinic-link {
	font-size: 10px;
	color: var(--acg-muted);
}

.footer-links {
	display: flex;
	gap: 80px;
	padding-top: 10px;
}

.footer-links > div {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 11px;
}

.footer-links .eyebrow {
	margin-bottom: 10px;
	font-size: 10px;
}

.footer-links a,
.footer-links button {
	padding: 0;
	font-size: 11px;
}

/* ABOUT のポップアップを開くボタン（試作どおり <button>） */
.footer-links button:hover {
	color: var(--acg-brand);
}

.footer-bottom {
	border-top: 1px solid var(--acg-footer-line);
	padding-block: 21px;
	display: flex;
	justify-content: space-between;
	font-size: 9px;
	letter-spacing: .07em;
	color: var(--acg-muted);
}

/* =========================================================
 * 記事カード（template-parts/article-card.php）
 * トップの新着記事のほか、カテゴリページでも使うのでここに置く
 * ========================================================= */

.article-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 34px 26px;
}

.article-card {
	display: block;
	min-width: 0;
}

/* 絞り込みで隠すカード。display: block に hidden 属性が負けないようにする */
.article-card[hidden] {
	display: none;
}

.card-eyecatch {
	overflow: hidden;
}

.card-eyecatch > .article-cover-image {
	width: 100%;
	height: 172px;
	object-fit: cover;
}

/* アイキャッチ画像が無いときの色面。修飾クラスが無ければ AGA と同じ色 */
.article-visual {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 172px;
	padding: 27px;
	background: var(--acg-visual-bg-aga);
	color: var(--acg-visual-ink-aga);
}

.article-visual.removal {
	background: var(--acg-visual-bg-removal);
	color: var(--acg-visual-ink-removal);
}

.article-visual.diet {
	background: var(--acg-visual-bg-diet);
	color: var(--acg-visual-ink-diet);
}

.article-visual::after {
	content: "";
	position: absolute;
	right: -20px;
	bottom: -45px;
	width: 170px;
	height: 170px;
	border: 1px solid var(--acg-visual-circle);
	border-radius: 50%;
}

.article-visual > small {
	font-family: var(--acg-latin);
	font-size: 10px;
	letter-spacing: .15em;
}

.article-visual > span {
	z-index: 1;
	margin-top: 13px;
	font-family: var(--acg-serif);
	font-size: 22px;
	line-height: 1.7;
	letter-spacing: .06em;
	word-break: normal;
	overflow-wrap: anywhere;
}

.article-visual .mini-line {
	width: 30px;
	height: 1px;
	margin-top: 17px;
	background: currentColor;
	opacity: .5;
}

.card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	font-size: 10px;
	color: var(--acg-muted);
}

.card-meta .label {
	color: var(--acg-brand);
	letter-spacing: .03em;
}

.article-card h3 {
	margin: 8px 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.9;
}

.card-bottom {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	color: var(--acg-muted);
}

.article-card:hover .article-visual {
	filter: brightness(.98);
}

.article-card:hover h3 {
	color: var(--acg-brand);
}

/* 記事が 1 件も無いときの表示（試作どおり .article-grid の 1 マスに入る） */
.empty-state {
	padding: 45px;
	background: var(--acg-cream);
	text-align: center;
	font-size: 13px;
	color: var(--acg-muted);
}

/* 404（404.php。試作の notFound()）の見出し。試作はブラウザ既定の 2em（JIN のリセット h1 { font-size: 100% } を戻す） */
.acg-main.acg-404 h1 {
	font-size: 2em;
}

/*
 * ポップアップ（試作の #info-dialog。枠は functions.php の acg_info_dialog、動きは js/guide-info.js）。
 * 段落は試作と同じく .eyebrow（英字の小見出し）より弱い詳細度にする（:where）。強くすると英字の文字サイズまで 13px になる
 */
#info-dialog {
	width: calc(100% - 40px);
	max-width: 580px;
	padding: 40px;
	border: 1px solid var(--acg-line);
	background: var(--acg-paper);
	box-shadow: 0 20px 100px #3f362f26;
}

#info-dialog::backdrop {
	background: #30271e66;
}

#info-dialog h2 {
	margin: 10px 0 20px;
	font-family: var(--acg-serif);
	font-size: 23px;
	font-weight: 500;
}

:where(#info-dialog) p {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 2;
}

#info-dialog .dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	font-size: 25px;
}

#info-dialog .dialog-done {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 24px;
	border: 1px solid var(--acg-brand);
	font-size: 12px;
	color: var(--acg-brand);
}

#info-dialog .dialog-done:hover {
	background: var(--acg-brand);
	color: #fff;
}

/* =========================================================
 * 1000px 以下
 * ========================================================= */

@media (max-width: 1000px) {
	.wrap {
		width: calc(100% - 48px);
	}

	.clinic-booking > a {
		padding: 9px 18px;
		font-size: 12px;
	}

	.clinic-nav {
		gap: 27px;
	}

	.desktop-nav {
		gap: 18px;
		font-size: 11px;
	}

	.guide-header .desktop-nav {
		gap: 22px;
	}

	.brand {
		width: 205px;
	}

	.footer-links {
		gap: 40px;
	}
}

/* =========================================================
 * 760px 以下（スマホ）
 * ========================================================= */

@media (max-width: 760px) {
	.wrap {
		width: calc(100% - 40px);
	}

	/* ヘッダー上段 */
	.clinic-strip {
		font-size: 8px;
		padding: 6px 12px;
	}

	.clinic-strip span {
		display: block;
		margin: 0;
	}

	.clinic-main {
		padding-block: 17px;
		gap: 15px;
		align-items: center;
	}

	.clinic-logo {
		width: 175px;
	}

	.clinic-booking {
		flex-direction: column;
		gap: 5px;
	}

	.clinic-booking > a {
		padding: 5px 11px;
		font-size: 9px;
		white-space: nowrap;
	}

	.clinic-nav {
		display: none;
	}

	.clinic-mobile-menu {
		display: block;
		border-top: 1px solid var(--acg-line);
		font-size: 10px;
	}

	.clinic-mobile-menu summary {
		display: flex;
		justify-content: space-between;
		cursor: pointer;
		list-style: none;
		padding: 10px 20px;
	}

	.clinic-mobile-menu summary::-webkit-details-marker {
		display: none;
	}

	.clinic-mobile-menu nav {
		display: flex;
		flex-wrap: wrap;
		gap: 0 20px;
		padding: 6px 20px 14px;
		border-top: 1px solid var(--acg-line);
	}

	.clinic-mobile-menu nav a {
		padding: 9px 0;
		font-size: 10px;
	}

	/* ヘッダー下段 */
	.header-inner {
		height: 85px;
		gap: 15px;
	}

	.guide-header .header-inner {
		height: 60px;
		gap: 10px;
	}

	.guide-brand {
		font-size: 13px;
		letter-spacing: .01em;
	}

	.guide-brand span {
		font-size: 12px;
		margin-left: 4px;
		letter-spacing: .06em;
	}

	.desktop-nav {
		display: none;
	}

	.menu-button {
		display: block;
	}

	.header-tools {
		gap: 8px;
	}

	.guide-header .header-tools {
		gap: 5px;
	}

	.guide-header .icon-button {
		width: 30px;
	}

	.guide-header .menu-button {
		width: 26px;
	}

	.search-panel > div {
		gap: 8px;
	}

	.search-panel input {
		padding: 10px;
		font-size: 12px;
	}

	.search-panel .solid-button {
		padding: 10px 14px;
	}

	/* フッター */
	.brand {
		width: 205px;
	}

	.footer-main {
		display: block;
		padding-block: 37px;
	}

	.footer-intro .brand {
		width: 210px;
		align-items: start;
	}

	.footer-intro .brand span {
		padding-left: 35px;
	}

	.footer-intro p {
		font-size: 17px;
		margin: 20px 0 12px;
	}

	.footer-links {
		gap: 30px;
		justify-content: space-between;
		margin-top: 30px;
	}

	.footer-links a,
	.footer-links button {
		font-size: 10px;
		text-align: left;
	}

	.footer-links .eyebrow {
		font-size: 9px;
	}

	.footer-bottom {
		font-size: 8px;
		gap: 15px;
		align-items: center;
	}

	.back-home {
		font-size: 9px;
		white-space: nowrap;
	}

	/* セクションと見出し・パンくず */
	.section {
		padding: 47px 0;
	}

	.section-heading {
		margin-bottom: 25px;
		align-items: start;
	}

	.section-heading h2 {
		font-size: 23px;
	}

	.section-heading p {
		font-size: 11px;
	}

	.section-link {
		gap: 8px;
		margin-top: 24px;
		font-size: 10px;
	}

	.breadcrumb {
		gap: 8px;
		padding-block: 17px;
		font-size: 9px;
	}

	.result-count {
		font-size: 10px;
	}

	.search-page h1 {
		font-size: 23px;
	}

	/* 記事カード：2 列に。日付はカテゴリ名の下の行へ */
	.article-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px 15px;
	}

	.card-eyecatch > .article-cover-image {
		height: 130px;
	}

	.article-visual {
		height: 130px;
		padding: 16px;
	}

	.article-visual::after {
		width: 110px;
		height: 110px;
	}

	.article-visual > small {
		font-size: 8px;
	}

	.article-visual > span {
		margin-top: 9px;
		font-size: 17px;
		line-height: 1.6;
	}

	.card-meta {
		display: block;
		margin-top: 10px;
		font-size: 9px;
		line-height: 1.8;
	}

	.card-meta time {
		display: block;
		margin-top: 2px;
	}

	.article-card h3 {
		margin: 6px 0;
		font-size: 11px;
		line-height: 1.9;
	}

	.card-bottom {
		font-size: 8px;
	}

	.empty-state {
		padding: 30px 20px;
	}

	/* ポップアップ */
	#info-dialog {
		padding: 30px 25px;
	}

	#info-dialog h2 {
		font-size: 22px;
	}
}

/* =========================================================
 * 370px 以下（小さいスマホ）
 * ========================================================= */

@media (max-width: 370px) {
	.clinic-logo {
		width: 150px;
	}

	.clinic-booking > a {
		font-size: 8px;
		padding-inline: 8px;
	}

	.guide-brand {
		font-size: 12px;
	}

	.guide-brand span {
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.clinic-header *,
	.site-header *,
	.site-footer *,
	.acg-main * {
		transition: none !important;
	}
}
