/*
 * 糖尿病の学校 ガイド（ハブ）ページ・受診の目安チェック
 * リニューアル設計書 2「デザイン規定」のトークン。inc/guide.php がガイド系の固定ページだけで読み込む。
 *
 * - rose（#3A8FB7）は大きい文字か装飾だけ。小さい本文には使わない
 * - Zen Kaku Gothic New の細字は 24px 以上の見出しだけ
 * - alert（#C41E1E）は緊急表示専用。wine と混ぜない
 */
/* トークンとクリニックカードは dmr-parts.css（記事末尾と共通）。 */

.dmr-guide {
	color: var(--dmr-ink);
}

/* ---------- 冒頭の監修表記 ---------- */
.dmr-guide-byline {
	margin: 0 0 1.5em !important;
	font-size: .8125rem;
	line-height: 1.8;
	color: var(--dmr-muted2);
}
.dmr-guide-byline__date {
	display: inline-block;
	margin-left: 1em;
}

/* ---------- 英字ラベル・見出し（SWELL の h2/h3 装飾を打ち消す） ---------- */
.dmr-guide .dmr-en,
.dmr-check .dmr-en {
	margin: 0 0 .25em !important;
	font-family: var(--dmr-latin);
	font-size: .875rem;
	font-weight: 500;
	letter-spacing: .12em;
	color: var(--dmr-label);
}
.post_content .dmr-guide h2.wp-block-heading,
.post_content .dmr-guide h2 {
	margin: 0 0 1em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--dmr-ink);
	font-family: var(--dmr-display);
	font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
	font-weight: 300;
	line-height: 1.45;
	letter-spacing: .06em;
}
.post_content .dmr-guide h2::before,
.post_content .dmr-guide h2::after,
.post_content .dmr-guide h3::before,
.post_content .dmr-guide h3::after {
	content: none;
	display: none;
}
.post_content .dmr-guide h3 {
	margin: 0 0 .5em;
	padding: 0;
	border: 0;
	background: none;
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.55;
	color: var(--dmr-ink);
}
.dmr-guide .dmr-sec {
	margin: 0 0 3.5em;
}

/* ---------- POINT ---------- */
.dmr-guide .dmr-point {
	margin: 0 0 3.5em;
	padding: 28px 32px;
	border-radius: 22px;
	background: var(--dmr-soft);
}
.dmr-guide .dmr-point .dmr-en {
	color: var(--dmr-base);
}
.dmr-guide .dmr-point p:not(.dmr-en) {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 2;
}

/* ---------- チェックリスト ---------- */
.post_content .dmr-guide ul.dmr-checks {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 12px;
}
.post_content .dmr-guide ul.dmr-checks > li {
	position: relative;
	margin: 0;
	padding: 16px 24px 16px 64px;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--dmr-shadow);
	font-size: .9375rem;
	font-weight: 500;
	line-height: 1.6;
}
.post_content .dmr-guide ul.dmr-checks > li::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 16px;
	width: 32px;
	height: 32px;
	margin-top: -16px;
	border-radius: 50%;
	background: var(--dmr-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5l2.5 2.5L11 4'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- 記事カード ---------- */
.dmr-guide .dmr-cards {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
}
.dmr-guide .dmr-card {
	position: relative;
	margin: 0 !important;
	padding: 26px 26px 64px;
	border-radius: 22px;
	background: var(--dmr-paper);
	box-shadow: var(--dmr-shadow);
}
.dmr-guide .dmr-card h3 a {
	color: var(--dmr-ink);
	text-decoration: none;
}
/* カード全体を押せるようにする（リンクは見出しの1本だけ・読み上げは1回）。 */
.dmr-guide .dmr-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 22px;
}
.dmr-guide .dmr-card:hover h3 a,
.dmr-guide .dmr-card h3 a:focus-visible {
	color: var(--dmr-base);
}
.dmr-guide .dmr-card h3 a:focus-visible::after {
	outline: 3px solid var(--dmr-base);
	outline-offset: 2px;
}
.dmr-guide .dmr-card p {
	margin: 0;
	font-size: .875rem;
	line-height: 1.85;
	color: var(--dmr-muted);
}
.dmr-guide .dmr-card::after {
	content: "";
	position: absolute;
	right: 22px;
	bottom: 20px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--dmr-base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6h8M7 3l3 3-3 3'/%3E%3C/svg%3E") center / 14px no-repeat;
	pointer-events: none;
}

/* ---------- 緊急の受診案内（alert は緊急専用。色だけに頼らず、アイコンと文字を添える） ---------- */
.dmr-guide .dmr-emergency {
	margin: 0 0 3.5em;
	padding: 22px 26px 22px 70px;
	position: relative;
	border: 3px solid var(--dmr-alert-edge);
	border-radius: 18px;
	background: #fff;
}
.dmr-guide .dmr-emergency::before {
	content: "";
	position: absolute;
	top: 22px;
	left: 22px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--dmr-alert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 22 22' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3L2 19h18L11 3z'/%3E%3Cpath d='M11 9v4M11 16v.5'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.dmr-guide .dmr-emergency p {
	margin: 0;
	font-size: .9375rem;
	line-height: 1.85;
}
.dmr-guide .dmr-emergency .dmr-emergency__ttl {
	margin-bottom: .3em;
	font-size: 1.0625rem;
	color: var(--dmr-alert);
}
.dmr-guide .dmr-emergency a {
	color: var(--dmr-alert-edge);
	font-weight: 700;
}

/* ---------- 受診から検査までの流れ ---------- */
.post_content .dmr-guide ol.dmr-flow {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: htnflow;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}
.post_content .dmr-guide ol.dmr-flow > li {
	counter-increment: htnflow;
	margin: 0;
	padding: 92px 26px 26px;
	position: relative;
	border-radius: 22px;
	background: var(--dmr-paper);
	font-size: .875rem;
	line-height: 1.85;
	color: var(--dmr-muted);
}
.post_content .dmr-guide ol.dmr-flow > li::before {
	content: counter(htnflow, decimal-leading-zero);
	position: absolute;
	top: 26px;
	left: 26px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--dmr-base);
	color: #fff;
	font-family: var(--dmr-latin);
	font-size: 1.25rem;
	line-height: 52px;
	text-align: center;
}
.post_content .dmr-guide ol.dmr-flow > li strong {
	display: block;
	margin-bottom: .3em;
	font-size: 1.125rem;
	color: var(--dmr-ink);
}

/* ---------- クリニック ---------- */
.dmr-guide .dmr-clinic-sec {
	margin: 0 0 3.5em;
	padding: 40px 32px;
	border-radius: 40px;
	background: var(--dmr-mist);
}
.dmr-guide .dmr-clinic-sec p.dmr-lead {
	margin: -.5em 0 1.5em;
	font-size: .8125rem;
	color: var(--dmr-muted);
}
/* ---------- FAQ ---------- */
.dmr-guide .dmr-faq .wp-block-details {
	margin: 0 0 14px;
	padding: 0 26px;
	border-radius: 18px;
	background: #fff;
	box-shadow: var(--dmr-shadow);
}
.dmr-guide .dmr-faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 44px;
	padding: 20px 0;
	box-sizing: border-box;
	cursor: pointer;
	list-style: none;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6;
}
.dmr-guide .dmr-faq summary::-webkit-details-marker {
	display: none;
}
.dmr-guide .dmr-faq summary::before {
	content: "Q";
	flex: none;
	font-family: var(--dmr-latin);
	font-size: 1.125rem;
	color: var(--dmr-accent);
}
.dmr-guide .dmr-faq summary::after {
	content: "＋";
	flex: none;
	margin-left: auto;
	color: var(--dmr-base);
}
.dmr-guide .dmr-faq details[open] summary::after {
	content: "－";
}
.dmr-guide .dmr-faq details p {
	margin: 0 0 22px;
	font-size: .9375rem;
	line-height: 1.9;
	color: var(--dmr-muted);
}

/* ---------- ほかのガイド ---------- */
.dmr-guide .dmr-links .wp-block-buttons {
	gap: 12px;
}
.dmr-guide .dmr-links .wp-block-button__link {
	min-height: 44px;
	padding: 14px 22px;
	border-radius: 999px;
	background: #fff;
	color: var(--dmr-ink);
	font-size: .875rem;
	font-weight: 700;
	box-shadow: var(--dmr-shadow);
}
.dmr-guide .dmr-links .is-style-dmr-primary .wp-block-button__link,
.dmr-guide .dmr-links .dmr-primary .wp-block-button__link {
	background: var(--dmr-base);
	color: #fff;
}

/* ---------- 受診の目安チェック ---------- */
.dmr-check__draftnote {
	padding: 12px 16px;
	border: 2px dashed var(--dmr-alert-edge);
	border-radius: 12px;
	background: #fff6f6;
	font-size: .8125rem;
	color: var(--dmr-alert-edge);
}
.dmr-check {
	max-width: 560px;
	margin: 0 auto 3em;
	padding: 24px 20px;
	border-radius: 28px;
	background: var(--dmr-ground);
}
.dmr-check__head {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}
.dmr-check__step {
	align-self: flex-end;
	font-family: var(--dmr-latin);
	font-size: .8125rem;
	letter-spacing: .12em;
	color: var(--dmr-muted2);
}
.dmr-check__bar {
	height: 6px;
	border-radius: 3px;
	background: #d9e8ef;
	overflow: hidden;
}
.dmr-check__bar span {
	display: block;
	height: 6px;
	border-radius: 3px;
	background: var(--dmr-accent);
	transition: width .25s ease;
}
.dmr-check__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.dmr-check .dmr-check__q {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.6;
	outline: none;
}
.dmr-check .dmr-check__help {
	margin: 0 0 4px;
	font-size: .8125rem;
	color: var(--dmr-muted2);
}
.dmr-check__opt {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 54px;
	padding: 12px 18px 12px 14px;
	border: 1.5px solid #fff;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 3px 10px rgba(30, 77, 102, .06);
	color: var(--dmr-ink);
	font: inherit;
	font-size: .9375rem;
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
}
.dmr-check__opt:hover {
	border-color: #9fc6d8;
}
.dmr-check__opt.is-on {
	border-color: var(--dmr-base);
	font-weight: 700;
}
.dmr-check__opt:focus-visible,
.dmr-check__primary:focus-visible,
.dmr-check__ghost:focus-visible {
	outline: 3px solid var(--dmr-base);
	outline-offset: 2px;
}
.dmr-check__box {
	flex: none;
	width: 24px;
	height: 24px;
	box-sizing: border-box;
	border: 2px solid var(--dmr-line);
	border-radius: 50%;
}
.dmr-check__opt.is-on .dmr-check__box {
	border-color: var(--dmr-base);
	background: var(--dmr-base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5l2.5 2.5L11 4'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.dmr-check__opt--single {
	border-radius: 20px;
}
.dmr-check__optText {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-left: 6px;
}
.dmr-check__optSub {
	font-size: .75rem;
	color: var(--dmr-muted2);
}
.dmr-check__primary {
	display: block;
	width: 100%;
	min-height: 54px;
	margin-top: 8px;
	padding: 16px;
	box-sizing: border-box;
	border: 0;
	border-radius: 999px;
	background: var(--dmr-base);
	color: #fff !important;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.dmr-check__primary:hover {
	background: var(--dmr-base-dark);
}
.dmr-check__ghost {
	align-self: flex-start;
	min-height: 44px;
	padding: 12px 0;
	border: 0;
	background: none;
	color: var(--dmr-base);
	font: inherit;
	font-size: .875rem;
	font-weight: 700;
	cursor: pointer;
}
.dmr-check__result {
	padding: 24px;
	border-radius: 24px;
	background: #fff;
	color: var(--dmr-ink);
}
.dmr-check__result--soon { background: var(--dmr-soft); }
.dmr-check__result--consult { background: var(--dmr-mist); }
.dmr-check__result--emergency {
	border: 3px solid var(--dmr-alert-edge);
	background: var(--dmr-alert);
	color: #fff;
}
.dmr-check__result p {
	margin: 0 0 8px;
}
.dmr-check__alert {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .875rem;
	font-weight: 700;
}
.dmr-check .dmr-check__title {
	font-family: var(--dmr-display);
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.45;
	outline: none;
}
.dmr-check__text {
	font-size: .875rem;
	line-height: 1.8;
}
a.dmr-check__119 {
	display: block;
	padding: 18px;
	border: 3px solid var(--dmr-alert-edge);
	border-radius: 14px;
	background: var(--dmr-alert);
	color: #fff !important;
	font-size: 1.125rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}
.dmr-check__sub,
.dmr-check__disclaimer {
	margin: 0;
	font-size: .8125rem;
	line-height: 1.7;
	color: var(--dmr-muted);
}
.dmr-check__sub a {
	color: var(--dmr-base);
	font-weight: 700;
}
.dmr-check__disclaimer {
	font-size: .75rem;
	color: var(--dmr-muted2);
}
.dmr-check__clinics {
	margin-top: 6px;
}
.dmr-check__clinics-lead {
	margin: 0 0 12px;
	font-size: .8125rem;
	line-height: 1.7;
	color: var(--dmr-muted);
}
.dmr-check__noscript {
	padding: 16px;
	border-radius: 16px;
	background: #fff;
	font-size: .875rem;
	line-height: 1.8;
}

@media (max-width: 600px) {
	.dmr-guide .dmr-point { padding: 22px 20px; }
	.dmr-guide .dmr-clinic-sec { padding: 32px 18px; border-radius: 28px; }
	.dmr-guide-byline__date { display: block; margin-left: 0; }
	.dmr-check { padding: 20px 14px; border-radius: 22px; }
}
