/*
 * ガイドハブ（/guide/・ガイド系タクソノミー）。template-parts/install-guide/hub-*.php
 *
 * 図鑑の一覧（distro-archive.css）と同じ世界観（オレンジと黒の太い枠・端末・DIN の数字）で、
 * ガイドらしさは「道のり」: ステップ1つが点1つの路線図。終えたステップが塗られ、カードに触れると点が順に灯る。
 * --gh-brand はディストロのブランドカラー（図鑑の事実 brand_color・確認ずみ）。無ければサイトのオレンジ。
 * ルートの文字サイズは 62.5%（1rem = 10px）なので px で書く。
 */

@view-transition {
	navigation: auto;
}

.gh-page {
	--gh-ground: var(--guide-bg, #fff4e1);
	--gh-surface: var(--guide-surface, #fff);
	--gh-ink: #1d1813;
	--gh-text: var(--guide-text, #2b2620);
	--gh-muted: var(--guide-muted, #6f6052);
	--gh-line: var(--guide-border, #e8e1d4);
	--gh-line-strong: var(--guide-border-strong, #d8cebb);
	--gh-accent: var(--guide-accent, #ff5b00);
	--gh-accent-soft: var(--guide-accent-soft, #ffedca);
	--gh-ok: var(--guide-success, #1e7a45);
	--gh-ok-soft: var(--guide-success-soft, #e8f6ee);
	--gh-fair: var(--guide-caution, #a65f00);
	--gh-fair-soft: var(--guide-caution-soft, #fbf1df);
	--gh-hard: var(--guide-danger, #c0341d);
	--gh-hard-soft: var(--guide-danger-soft, #fcece9);
	--gh-term: #1d1813;
	--gh-term-fg: #f1ede6;
	--gh-term-muted: rgba(241, 237, 230, 0.62);
	--gh-term-key: #ffb071;
	--gh-num: "Din1451Alt", "Bahnschrift", "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
	--gh-brandfont: var(--font-site-brand, "linuxPro-CPL"), "Hiragino Sans", "Noto Sans JP", sans-serif;
	--gh-radius: 14px;
	--gh-top: 0px;
	--gh-ease-pop: cubic-bezier(0.2, 1.5, 0.4, 1);
	--gh-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

	background: var(--gh-ground);
	color: var(--gh-text);
	padding: 20px 16px 110px;
}

.gh {
	--gh-brand: var(--gh-accent);
	max-width: 1240px;
	margin: 0 auto;
	font: 400 16px/1.75 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
	overflow-wrap: anywhere;
}
.gh *,
.gh *::before,
.gh *::after {
	box-sizing: border-box;
}
.gh :where(h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset) {
	margin: 0;
	padding: 0;
}
.gh :where(ul, ol) {
	list-style: none;
}
.gh fieldset {
	border: 0;
	min-width: 0;
}
.gh legend {
	padding: 0;
}
.gh :where(a) {
	color: inherit;
	text-underline-offset: 4px;
}
.gh :where(a, button, summary, input, select, [tabindex]):focus-visible {
	outline: 3px solid var(--gh-accent);
	outline-offset: 3px;
	border-radius: 6px;
}
.gh [hidden] {
	display: none !important;
}
.gh .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.gh-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: 13px;
	color: var(--gh-muted);
}
.gh-crumbs li + li::before {
	content: "/";
	margin-right: 10px;
	color: var(--gh-line-strong);
}
.gh-crumbs a {
	text-decoration: none;
}

/* ---------- 冒頭 ---------- */

.gh-hero {
	display: grid;
	gap: 24px;
	margin-top: 18px;
	align-items: start;
}
@media (min-width: 960px) {
	.gh-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
		gap: 40px;
	}
}
.gh-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font: 700 14px/1 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-kicker span {
	padding: 5px 10px 4px;
	border-radius: 6px;
	background: var(--gh-ink);
	color: var(--gh-accent);
	font: 400 15px/1 var(--gh-num);
	letter-spacing: 0.12em;
}
.gh-hero__title {
	margin-top: 14px;
	font: 700 clamp(30px, 4.6vw, 52px)/1.25 var(--gh-brandfont);
	color: var(--gh-ink);
	text-wrap: balance;
	word-break: auto-phrase;
}
@media (max-width: 520px) {
	.gh-br {
		display: none;
	}
}
.gh-hero__lead {
	max-width: 38em;
	margin-top: 12px;
	color: var(--gh-muted);
}

.gh-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 0;
	margin-top: 22px;
}
.gh-stat {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	padding: 2px 24px;
	border-left: 2px dashed var(--gh-line-strong);
}
.gh-stat:first-child {
	padding-left: 0;
	border-left: 0;
}
@media (max-width: 520px) {
	/* 狭い画面では 2×2（折り返した行の頭に点線が残らないように） */
	.gh-stats {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px 0;
	}
	.gh-stat {
		padding: 2px 16px;
	}
	.gh-stat:nth-child(odd) {
		padding-left: 0;
		border-left: 0;
	}
}
.gh-stat dt {
	order: 2;
	font-size: 12px;
	font-weight: 700;
	color: var(--gh-muted);
}
.gh-stat dd {
	order: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.gh-stat__num {
	font: 400 46px/0.9 var(--gh-num);
	color: var(--gh-ink);
	font-variant-numeric: tabular-nums;
}
.gh-stat__pips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	max-width: 160px;
	min-height: 9px;
}
.gh-stat__pips i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--gh-ink);
}
.gh-stat__pips i.is-fresh {
	background: var(--gh-accent);
}
.gh-stat__pips i.is-unknown,
.gh-stat__pips i.is-stale {
	background: transparent;
	box-shadow: inset 0 0 0 2px var(--gh-line-strong);
}
.gh-stats.is-live .gh-stat__pips i {
	animation: gh-pip 0.42s calc(0.18s + var(--i) * 55ms) var(--gh-ease-pop) backwards;
}
@keyframes gh-pip {
	from { opacity: 0; transform: scale(0); }
	to { opacity: 1; transform: scale(1); }
}

.gh-promise {
	display: grid;
	gap: 6px;
	margin-top: 22px;
	font-size: 14px;
	color: var(--gh-text);
}
.gh-promise li {
	position: relative;
	padding-left: 26px;
}
.gh-promise li::before {
	content: "";
	position: absolute;
	top: 6px;
	left: 2px;
	width: 14px;
	height: 14px;
	border: 3px solid var(--gh-ink);
	border-radius: 50%;
	background: var(--gh-accent);
}
.gh-promise b {
	color: var(--gh-ink);
}

/* あなたの PC（図鑑の「あなたの図鑑」と同じ端末の板） */
.gh-me {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px 20px;
	border: 3px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-term);
	color: var(--gh-term-fg);
	box-shadow: 6px 6px 0 #ffbe794d;
}
.gh-me__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.gh-me__title {
	font: 700 18px/1.3 var(--gh-brandfont);
	color: var(--gh-term-key);
}
.gh-me__edit {
	padding: 4px 12px;
	border: 1px solid rgba(241, 237, 230, 0.35);
	border-radius: 999px;
	background: none;
	color: var(--gh-term-fg);
	font-size: 12px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}
.gh-me__edit:hover {
	border-color: var(--gh-term-key);
	color: var(--gh-term-key);
}
.gh-me__summary {
	font: 700 18px/1.5 var(--gh-brandfont);
}
.gh-me__ask p,
.gh-me__log-title {
	font-size: 13px;
	color: var(--gh-term-muted);
}
.gh-me__ask {
	display: grid;
	gap: 12px;
}
.gh-me__go {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 18px;
	border: 3px solid var(--gh-term-fg);
	border-radius: 12px;
	background: var(--gh-accent);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.15s ease;
}
.gh-me__go:hover {
	transform: translateY(-2px);
}
.gh-me__go:active {
	transform: scale(0.97);
}
.gh-me__go:disabled {
	border-color: rgba(241, 237, 230, 0.3);
	background: transparent;
	color: var(--gh-term-muted);
	cursor: default;
	transform: none;
}
.gh-me__fit {
	display: grid;
	gap: 10px;
}
.gh-me__bar {
	display: flex;
	gap: 3px;
	height: 12px;
}
.gh-me__bar i {
	flex: var(--n, 0) 1 0;
	min-width: 0;
	border-radius: 3px;
	transition: flex-grow 0.5s var(--gh-ease-out);
}
.gh-me__bar i[style*="--n:0"] {
	display: none;
}
.gh-me__bar .is-ok { background: #5ad08a; }
.gh-me__bar .is-fair { background: #f4b04a; }
.gh-me__bar .is-hard { background: #ff7a61; }
.gh-me__bar .is-missing { background: rgba(241, 237, 230, 0.3); }
.gh-me__counts {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 13px;
}
.gh-me__counts b {
	margin-left: 2px;
	font: 400 20px/1 var(--gh-num);
	color: var(--gh-term-fg);
	font-variant-numeric: tabular-nums;
}
.gh-mark {
	font-weight: 800;
}
.gh-me .gh-mark.is-ok { color: #5ad08a; }
.gh-me .gh-mark.is-fair { color: #f4b04a; }
.gh-me .gh-mark.is-hard { color: #ff7a61; }
.gh-me .gh-mark.is-missing { color: var(--gh-term-muted); }
.gh-me__log {
	display: grid;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px dashed rgba(241, 237, 230, 0.25);
}
.gh-me__log-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.gh-me__log-list li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px 2px 4px;
	border-radius: 999px;
	background: rgba(241, 237, 230, 0.1);
	font-size: 12px;
	font-weight: 700;
}
.gh-me__log-list img,
.gh-me__log-list .gh-me__mono {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: var(--gh-surface);
	object-fit: contain;
}
.gh-me__mono {
	display: inline-grid;
	place-items: center;
	color: var(--gh-ink);
	font: 700 10px/1 var(--gh-brandfont);
}
.gh-me__log-list .is-done::after {
	content: "🏁";
	font-size: 11px;
}

/* ---------- 続きから ---------- */

.gh-resume {
	margin-top: 30px;
}
.gh-resume__title {
	font: 700 20px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-resume__list {
	display: flex;
	gap: 12px;
	margin: 12px -16px 0;
	padding: 4px 16px 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}
.gh-resume__item {
	flex: 0 0 min(340px, 84vw);
	scroll-snap-align: start;
}
.gh-resume__link {
	position: relative;
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 14px 16px;
	border: 3px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-surface);
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gh-resume__link:hover {
	transform: translate(-3px, -3px);
	box-shadow: 6px 6px 0 var(--gh-brand);
}
.gh-ring {
	--p: 0;
	position: relative;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: conic-gradient(var(--gh-accent) calc(var(--p) * 1%), var(--gh-accent-soft) 0);
	transition: --p 0.8s var(--gh-ease-out);
}
.gh-ring::before {
	content: "";
	position: absolute;
	inset: 6px;
	border-radius: 50%;
	background: var(--gh-surface);
}
.gh-ring b {
	position: relative;
	font: 400 17px/1 var(--gh-num);
	color: var(--gh-ink);
	font-variant-numeric: tabular-nums;
}
.gh-resume__name {
	font: 700 15px/1.45 var(--gh-brandfont);
	color: var(--gh-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.gh-resume__next {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--gh-muted);
}
.gh-resume__next b {
	color: var(--gh-accent);
}
@property --p {
	syntax: "<number>";
	inherits: false;
	initial-value: 0;
}

/* ---------- 探す ---------- */

.gh-find {
	margin-top: 34px;
}
.gh-bar {
	position: sticky;
	top: var(--gh-top);
	z-index: 30;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 -16px;
	padding: 10px 16px;
	border-bottom: 3px solid var(--gh-ink);
	background: color-mix(in srgb, var(--gh-ground) 94%, transparent);
	backdrop-filter: blur(8px);
}
.gh-search {
	flex: 1 1 320px;
	min-width: 0;
}
.gh-search input {
	width: 100%;
	min-height: 50px;
	padding: 8px 16px 8px 46px;
	border: 3px solid var(--gh-ink);
	border-radius: 12px;
	background: var(--gh-surface) no-repeat 14px 50% / 20px 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1813' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E");
	color: var(--gh-ink);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.4;
	font-family: inherit;
	box-shadow: none;
}
.gh-search input::placeholder {
	color: var(--gh-muted);
	font-weight: 400;
}
.gh-bar__btn,
.gh-sort select {
	min-height: 50px;
	border: 3px solid var(--gh-ink);
	border-radius: 12px;
	background: var(--gh-surface);
	color: var(--gh-ink);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
}
.gh-bar__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
}
.gh-bar__btn[aria-expanded="true"],
.gh-bar__btn:hover {
	background: var(--gh-accent-soft);
}
.gh-badge:not(:empty) {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--gh-accent);
	color: #fff;
	font: 400 13px/1 var(--gh-num);
}
.gh-badge.is-bump {
	animation: gh-bump 0.36s var(--gh-ease-pop);
}
@keyframes gh-bump {
	40% { transform: scale(1.35); }
}
.gh-sort select {
	padding: 0 34px 0 14px;
	max-width: 200px;
}
@media (max-width: 640px) {
	.gh-bar {
		gap: 6px;
		padding: 8px 16px;
	}
	.gh-search {
		flex-basis: 100%;
	}
	.gh-search input,
	.gh-bar__btn,
	.gh-sort select {
		min-height: 44px;
	}
	.gh-sort {
		flex: 1 1 0;
		min-width: 0;
	}
	.gh-sort select {
		width: 100%;
		max-width: none;
	}
	/* 下へ読み進めるあいだは2段目をしまう（JS が is-folded を付ける） */
	.gh-bar.is-folded .gh-bar__btn,
	.gh-bar.is-folded .gh-sort {
		display: none;
	}
}

/* 目的のチップ */
.gh-quick {
	display: flex;
	gap: 8px;
	margin: 14px -16px 0;
	padding: 2px 16px 6px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}
.gh-qchip {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 4px 16px;
	border: 2px solid var(--gh-ink);
	border-radius: 999px;
	background: var(--gh-surface);
	color: var(--gh-ink);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	scroll-snap-align: start;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.gh-qchip:hover {
	transform: translateY(-2px);
}
.gh-qchip:active {
	transform: scale(0.96);
}
.gh-qchip[aria-current="true"],
.gh-qchip[aria-pressed="true"] {
	background: var(--gh-ink);
	color: var(--gh-ground);
}
.gh-qchip small:not(:empty) {
	font: 400 13px/1 var(--gh-num);
	color: var(--gh-muted);
}
.gh-qchip[aria-current="true"] small,
.gh-qchip[aria-pressed="true"] small {
	color: var(--gh-term-key);
}
.gh-qchip.is-empty {
	opacity: 0.45;
}
.gh-qchip--pc {
	border-color: var(--gh-accent);
}
.gh-qchip__stamp {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--gh-accent);
	color: #fff;
	font-size: 11px;
}

/* 絞り込み（JS が無ければその場に並ぶ。JS があるとシート） */
.gh-sheet {
	margin-top: 18px;
	border: 2px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-surface);
}
.gh.is-js .gh-sheet,
.gh-pcsheet {
	position: fixed;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 3px solid var(--gh-ink);
	background: var(--gh-surface);
	box-shadow: 0 20px 60px rgba(29, 24, 19, 0.3);
	visibility: hidden;
	transition: transform 0.32s var(--gh-ease-out), visibility 0s linear 0.32s;
}
.gh.is-js .gh-sheet.is-open,
.gh-pcsheet.is-open {
	visibility: visible;
	transform: none;
	transition: transform 0.32s var(--gh-ease-out), visibility 0s;
}
.gh-sheet.is-dragging,
.gh-pcsheet.is-dragging {
	transition: none;
}
@media (min-width: 761px) {
	.gh.is-js .gh-sheet,
	.gh-pcsheet {
		top: calc(12px + var(--wp-admin--admin-bar--height, 0px));
		right: 12px;
		bottom: 12px;
		width: min(440px, calc(100vw - 24px));
		border-radius: 18px;
		transform: translateX(calc(100% + 24px));
	}
}
@media (max-width: 760px) {
	.gh.is-js .gh-sheet,
	.gh-pcsheet {
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 88vh;
		border-width: 3px 0 0;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
.gh-scrim {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(29, 24, 19, 0.36);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.gh-scrim.is-open {
	opacity: 1;
}
.gh-scrim[hidden] {
	display: none;
}
.gh-sheet__head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 12px;
	border-bottom: 1px solid var(--gh-line);
}
.gh-sheet__grip {
	display: none;
}
@media (max-width: 760px) {
	.gh.is-js .gh-sheet .gh-sheet__grip,
	.gh-pcsheet .gh-sheet__grip {
		position: absolute;
		top: 6px;
		left: 50%;
		display: block;
		width: 44px;
		height: 5px;
		margin-left: -22px;
		border-radius: 3px;
		background: var(--gh-line-strong);
		touch-action: none;
	}
}
.gh-sheet__title {
	font: 700 19px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-sheet__close {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 2px solid var(--gh-ink);
	border-radius: 10px;
	background: var(--gh-surface);
	color: var(--gh-ink);
	font-size: 20px;
	line-height: 1;
	font-family: inherit;
	cursor: pointer;
}
.gh-sheet__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 14px 18px 18px;
	display: grid;
	gap: 18px;
	align-content: start;
}
.gh-sheet__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 18px;
	border-top: 1px solid var(--gh-line);
	background: #fcfaf6;
	border-radius: 0 0 16px 16px;
}
.gh-sheet__clear {
	padding: 0;
	border: 0;
	background: none;
	color: var(--gh-muted);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
	font-family: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.gh-sheet__apply {
	min-height: 48px;
	padding: 6px 22px;
	border: 3px solid var(--gh-ink);
	border-radius: 12px;
	background: var(--gh-accent);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
}
.gh-sheet__apply b {
	font: 400 20px/1 var(--gh-num);
	font-variant-numeric: tabular-nums;
}
.gh-field legend {
	margin-bottom: 8px;
	font-weight: 800;
	font-size: 14px;
	color: var(--gh-ink);
}
.gh-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.gh-chip {
	position: relative;
	cursor: pointer;
}
.gh-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.gh-chip span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	padding: 4px 14px;
	border: 2px solid var(--gh-line-strong);
	border-radius: 999px;
	background: var(--gh-surface);
	color: var(--gh-ink);
	font-size: 14px;
	font-weight: 700;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.gh-chip:hover span {
	border-color: var(--gh-ink);
}
.gh-chip input:checked + span {
	border-color: var(--gh-ink);
	background: var(--gh-ink);
	color: var(--gh-ground);
}
.gh-chip input:focus-visible + span {
	outline: 3px solid var(--gh-accent);
	outline-offset: 2px;
}
.gh-chip small:not(:empty) {
	font: 400 13px/1 var(--gh-num);
	color: var(--gh-muted);
}
.gh-chip input:checked + span small {
	color: var(--gh-term-key);
}
.gh-chip.is-empty span {
	opacity: 0.4;
}
.gh-pcsheet__lead {
	font-size: 14px;
	color: var(--gh-muted);
}
.gh-pcsheet .pcq {
	margin-top: 0;
}
.gh-noscript {
	margin-top: 12px;
}

/* ---------- 結果 ---------- */

.gh-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-top: 24px;
	/* 「N 本を見る」でここへ送ったとき、上に張りつく帯の下に隠れないように */
	scroll-margin-top: calc(var(--gh-top, 0px) + 96px);
}
.gh-head__title {
	font: 700 22px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-head__count {
	font-weight: 700;
	color: var(--gh-muted);
}
.gh-head__count b {
	margin-right: 4px;
	font: 400 40px/1 var(--gh-num);
	color: var(--gh-ink);
	font-variant-numeric: tabular-nums;
}
.gh-active {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}
.gh-active button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	border: 0;
	border-radius: 999px;
	background: var(--gh-ink);
	color: var(--gh-ground);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}
.gh-active button:hover {
	background: var(--gh-accent);
}

.gh-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
	margin-top: 16px;
}

/* カード */
.gh-card {
	--gh-brand: var(--gh-accent);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px 18px 14px;
	border: 2px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-surface);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gh-card:hover,
.gh-card:focus-within {
	transform: translate(-3px, -3px);
	box-shadow: 6px 6px 0 var(--gh-brand);
}
.gh-card:active {
	transform: translate(-1px, -1px) scale(0.99);
	box-shadow: 2px 2px 0 var(--gh-brand);
}
.gh-card__top {
	display: flex;
	align-items: center;
	gap: 12px;
}
.gh-card__logo {
	flex: none;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 6px;
	border: 3px solid var(--gh-ink);
	border-radius: 15px;
	background: var(--gh-surface);
	box-shadow: 3px 3px 0 var(--gh-brand);
	transition: transform 0.28s var(--gh-ease-pop);
}
.gh-card:hover .gh-card__logo,
.gh-card:focus-within .gh-card__logo {
	transform: rotate(-5deg) translateY(-2px);
}
.gh-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.gh-card__mono {
	font: 700 20px/1 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-card__distro {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.gh-card__distro-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--gh-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gh-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.gh-tag {
	padding: 0 9px;
	border: 1px solid var(--gh-line-strong);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
}
.gh-tag--ver {
	border-color: var(--gh-ink);
	background: var(--gh-ink);
	color: var(--gh-ground);
	font-family: var(--gh-num);
	font-weight: 400;
	font-size: 13px;
	letter-spacing: 0.02em;
}
.gh-tag--beginner {
	border-color: var(--gh-ok);
	color: var(--gh-ok);
	background: var(--gh-ok-soft);
}
.gh-tag--intermediate {
	border-color: var(--gh-fair);
	color: var(--gh-fair);
	background: var(--gh-fair-soft);
}
.gh-tag--advanced {
	border-color: var(--gh-hard);
	color: var(--gh-hard);
	background: var(--gh-hard-soft);
}
.gh-card__fit {
	flex: none;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin-left: auto;
	border: 3px double currentColor;
	border-radius: 50%;
	font: 800 16px/1 var(--gh-brandfont);
	transform: rotate(-10deg);
}
.gh-card__fit.is-ok { color: var(--gh-ok); }
.gh-card__fit.is-fair { color: var(--gh-fair); }
.gh-card__fit.is-hard { color: var(--gh-hard); }
.gh-card__fit.is-missing { color: var(--gh-muted); }
.gh-card__fit.is-stamping {
	animation: gh-stamp 0.42s var(--gh-ease-pop) both;
	animation-delay: var(--delay, 0s);
}
@keyframes gh-stamp {
	0% { transform: rotate(-10deg) scale(2.2); opacity: 0; }
	60% { transform: rotate(-10deg) scale(0.9); opacity: 1; }
	100% { transform: rotate(-10deg) scale(1); }
}
.gh-card__title {
	font: 700 19px/1.45 var(--gh-brandfont);
	color: var(--gh-ink);
	text-wrap: pretty;
}
.gh-card__link {
	text-decoration: none;
}
.gh-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}
.gh-card__deck {
	font-size: 14px;
	line-height: 1.65;
	color: var(--gh-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 道のり（ステップ1つが点1つ） */
.gh-route {
	display: flex;
	align-items: center;
	gap: 12px;
}
.gh-route__stops {
	position: relative;
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
	max-width: 260px;
	height: 16px;
}
.gh-route__stops::before,
.gh-route__stops::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 6px;
	height: 0;
	border-top: 3px dotted var(--gh-line-strong);
	transform: translateY(-50%);
}
.gh-route__stops::before {
	right: 6px;
}
/* 終えたところまでの線（--done は 0〜1。JS が入れる） */
.gh-route__stops::after {
	width: calc((100% - 12px) * var(--done, 0));
	border-top: 3px solid var(--gh-ink);
	transition: width 0.7s var(--gh-ease-out);
}
.gh-route__stops li {
	position: relative;
	z-index: 1;
	width: 12px;
	height: 12px;
	border: 3px solid var(--gh-ink);
	border-radius: 50%;
	background: var(--gh-surface);
	transition: background-color 0.3s ease, transform 0.3s var(--gh-ease-pop);
	transition-delay: calc(var(--i) * 60ms);
}
.gh-route__stops li:last-child {
	width: 16px;
	height: 16px;
	border-radius: 4px;
}
.gh-route__stops li.is-done {
	background: var(--gh-accent);
}
.gh-card:hover .gh-route__stops li,
.gh-card:focus-within .gh-route__stops li {
	transform: scale(1.25);
	background: var(--gh-accent-soft);
}
.gh-card:hover .gh-route__stops li.is-done,
.gh-card:focus-within .gh-route__stops li.is-done {
	background: var(--gh-accent);
}
.gh-route__text {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	color: var(--gh-muted);
}
.gh-route__text b {
	font: 400 15px/1 var(--gh-num);
	color: var(--gh-accent);
}

.gh-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	font-size: 12px;
}
.gh-card__meta div {
	display: flex;
	align-items: baseline;
	gap: 6px;
}
.gh-card__meta dt {
	color: var(--gh-muted);
}
.gh-card__meta dd {
	font: 400 17px/1 var(--gh-num);
	color: var(--gh-ink);
	font-variant-numeric: tabular-nums;
}
/* みんなの完走（数はアクセントの色・生きている点） */
.gh-card__done dd {
	color: var(--gh-accent);
}
.gh-card__done dt::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 5px;
	border-radius: 50%;
	background: var(--gh-ok);
	vertical-align: 1px;
}
.gh-card__done[hidden] {
	display: none !important;
}
.gh-stat--done .gh-stat__num {
	color: var(--gh-accent);
}
.gh-stat__today {
	align-self: flex-start;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--gh-ok-soft);
	color: var(--gh-ok);
	font-size: 12px;
	font-weight: 800;
}
.gh-stat__today[hidden] {
	display: none;
}
.gh-card__conds {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.gh-card__conds li {
	padding: 1px 9px;
	border-radius: 6px;
	background: var(--gh-ground);
	color: var(--gh-text);
	font-size: 12px;
	font-weight: 700;
}
.gh-card__conds .is-more {
	background: none;
	color: var(--gh-muted);
}
.gh-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed var(--gh-line-strong);
	font-size: 12px;
}
.gh-card__fresh {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--gh-muted);
}
.gh-card__fresh.is-fresh {
	color: var(--gh-ok);
}
.gh-card__fresh.is-stale {
	color: var(--gh-fair);
}
.gh-card__seal {
	display: inline-grid;
	place-items: center;
	padding: 1px 6px;
	border: 2px solid currentColor;
	border-radius: 4px;
	font-size: 11px;
	line-height: 1.3;
	transform: rotate(-4deg);
}
.gh-card__support {
	font-weight: 700;
}
.gh-card__support.is-ok { color: var(--gh-ok); }
.gh-card__support.is-fair { color: var(--gh-fair); }
.gh-card__support.is-end { color: var(--gh-hard); }
.gh-card__support.is-info { color: var(--gh-muted); }
.gh-card__go {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	border: 2px solid var(--gh-ink);
	border-radius: 999px;
	background: var(--gh-accent-soft);
	color: var(--gh-ink);
	font-weight: 800;
	font-size: 13px;
	transition: background-color 0.15s ease;
}
.gh-card__go::after {
	content: "→";
	transition: transform 0.2s var(--gh-ease-pop);
}
.gh-card:hover .gh-card__go {
	background: var(--gh-accent);
	color: #fff;
}
.gh-card:hover .gh-card__go::after {
	transform: translateX(3px);
}

/* 絞り込みで入ってくる・並び替わる（JS の FLIP） */
.gh-card.is-entering {
	animation: gh-enter 0.34s var(--gh-ease-out) both;
}
@keyframes gh-enter {
	from { opacity: 0; transform: translateY(12px) scale(0.97); }
}

.gh-empty {
	display: grid;
	justify-items: center;
	gap: 8px;
	margin-top: 22px;
	padding: 34px 20px;
	border: 3px dashed var(--gh-line-strong);
	border-radius: var(--gh-radius);
	text-align: center;
}
.gh-empty__mark {
	font: 400 64px/1 var(--gh-num);
	color: var(--gh-accent);
}
.gh-empty__title {
	font: 700 19px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-empty__go {
	margin-top: 8px;
	font-weight: 800;
	color: var(--gh-ink);
}

/* ---------- 準備に役立つもの（物販） ---------- */

.gh-gear {
	margin-top: 34px;
}
.gh-gear.is-in {
	animation: gh-enter 0.4s var(--gh-ease-out) both;
}

/* ---------- まだガイドが無いディストロ ---------- */

/* ISO 鑑定所への入口（ダウンロードしたあとの「本物？」） */
.gh-iso {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	margin-top: 40px;
	padding: 16px 20px;
	border: 3px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-surface);
	color: var(--gh-text);
	text-decoration: none;
	transition: transform 0.2s var(--gh-ease-pop), box-shadow 0.2s ease;
}
.gh-iso:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 0 var(--gh-ink);
	color: var(--gh-text);
}
.gh-iso__disc {
	position: relative;
	width: 54px;
	height: 54px;
	border: 3px solid var(--gh-ink);
	border-radius: 50%;
	background:
		radial-gradient(circle, var(--gh-ink) 0 4px, var(--gh-surface) 5px 10px, transparent 11px),
		conic-gradient(from 30deg, #ffd6b8, #ffb071, #ff5b00, #ffd6b8, #fff3e3, #ffb071, #ffd6b8);
}
.gh-iso:hover .gh-iso__disc {
	animation: gh-iso-spin 1.2s linear infinite;
}
@keyframes gh-iso-spin {
	to { transform: rotate(360deg); }
}
.gh-iso__text {
	display: grid;
	gap: 2px;
	font-size: 14px;
	color: var(--gh-muted);
}
.gh-iso__text b {
	font: 700 18px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-iso__go {
	font: 700 22px/1 var(--gh-brandfont);
	color: var(--gh-accent);
	transition: transform 0.2s var(--gh-ease-pop);
}
.gh-iso:hover .gh-iso__go {
	transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
	.gh-iso:hover .gh-iso__disc {
		animation: none;
	}
}

.gh-soon {
	margin-top: 40px;
	padding: 22px 20px 20px;
	border: 3px solid var(--gh-ink);
	border-radius: var(--gh-radius);
	background: var(--gh-surface);
}
.gh-soon__title {
	font: 700 20px/1.4 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-soon__lead {
	margin-top: 4px;
	font-size: 14px;
	color: var(--gh-muted);
}
.gh-soon__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
	gap: 10px;
	margin-top: 14px;
}
.gh-soon__tile {
	--gh-brand: var(--gh-accent);
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 10px;
	padding: 8px 12px 8px 8px;
	border: 2px solid var(--gh-line-strong);
	border-radius: 12px;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.gh-soon__tile:hover {
	border-color: var(--gh-ink);
	transform: translateY(-2px);
}
.gh-soon__logo {
	grid-row: span 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 4px;
	border: 2px solid var(--gh-ink);
	border-radius: 11px;
	background: var(--gh-surface);
	box-shadow: 2px 2px 0 var(--gh-brand);
	font: 700 15px/1 var(--gh-brandfont);
	color: var(--gh-ink);
}
.gh-soon__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.gh-soon__name {
	font-weight: 800;
	font-size: 14px;
	color: var(--gh-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gh-soon__spec {
	font-size: 12px;
	color: var(--gh-muted);
}
.gh-soon__more {
	margin-top: 14px;
	font-weight: 800;
}
.gh-soon__more a {
	color: var(--gh-ink);
}

/* ---------- 知らせ ---------- */

.gh-toast {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 100002;
	max-width: calc(100vw - 32px);
	padding: 10px 18px;
	border: 3px solid var(--gh-ink);
	border-radius: 999px;
	background: var(--gh-term);
	color: var(--gh-term-fg);
	font-size: 14px;
	font-weight: 700;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 20px);
	transition: opacity 0.2s ease, transform 0.3s var(--gh-ease-pop);
}
.gh-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.gh *,
	.gh *::before,
	.gh *::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
	.gh-card:hover,
	.gh-card:focus-within,
	.gh-resume__link:hover {
		transform: none;
	}
}
