/*
 * ディストロ図鑑の一覧（archive-distro.php・template-parts/distro/archive.php）。
 * 詳細・版のページと同じ世界観（オレンジと黒の太い枠・端末・図鑑番号）。
 * --dz-brand はディストロのブランドカラー（事実 brand_color・確認ずみ）。無ければサイトのオレンジ。
 * ルートの文字サイズは 62.5%（1rem = 10px）なので px で書く。
 */

@view-transition {
	navigation: auto;
}

.dz-page {
	--dz-ground: var(--guide-bg, #fff4e1);
	--dz-surface: var(--guide-surface, #fff);
	--dz-ink: #1d1813;
	--dz-text: var(--guide-text, #2b2620);
	--dz-muted: var(--guide-muted, #6f6052);
	--dz-line: var(--guide-border, #e8e1d4);
	--dz-line-strong: var(--guide-border-strong, #d8cebb);
	--dz-accent: var(--guide-accent, #ff5b00);
	--dz-accent-soft: var(--guide-accent-soft, #ffedca);
	--dz-ok: var(--guide-success, #1e7a45);
	--dz-ok-soft: var(--guide-success-soft, #e8f6ee);
	--dz-fair: var(--guide-caution, #a65f00);
	--dz-fair-soft: var(--guide-caution-soft, #fbf1df);
	--dz-hard: var(--guide-danger, #c0341d);
	--dz-hard-soft: var(--guide-danger-soft, #fcece9);
	--dz-term: #1d1813;
	--dz-term-fg: #f1ede6;
	--dz-term-muted: rgba(241, 237, 230, 0.62);
	--dz-term-key: #ffb071;
	--dz-mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, "DejaVu Sans Mono", "BIZ UDGothic", "Hiragino Sans", "Noto Sans JP", monospace;
	--dz-num: "Din1451Alt", "Bahnschrift", "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
	--dz-brandfont: var(--font-site-brand, "linuxPro-CPL"), "Hiragino Sans", "Noto Sans JP", sans-serif;
	--dz-radius: 14px;
	--dz-top: 0px;

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

.dz {
	--dz-brand: var(--dz-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;
}
.dz *,
.dz *::before,
.dz *::after {
	box-sizing: border-box;
}
.dz :where(h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset) {
	margin: 0;
	padding: 0;
}
.dz :where(ul, ol) {
	list-style: none;
}
.dz fieldset {
	border: 0;
	min-width: 0;
}
.dz legend {
	padding: 0;
}
.dz :where(a) {
	color: inherit;
	text-underline-offset: 4px;
}
.dz :where(a, button, summary, input, select, [tabindex]):focus-visible {
	outline: 3px solid var(--dz-accent);
	outline-offset: 3px;
	border-radius: 6px;
}
.dz [hidden] {
	display: none !important;
}
.dz .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

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

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

.dz-hero {
	display: grid;
	gap: 24px;
	margin-top: 18px;
	align-items: stretch;
}
@media (min-width: 960px) {
	.dz-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
		gap: 40px;
	}
}
.dz-hero__kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font: 700 14px/1 var(--dz-brandfont);
	color: var(--dz-ink);
}
.dz-hero__kicker span {
	padding: 5px 10px 4px;
	border-radius: 6px;
	background: var(--dz-ink);
	color: var(--dz-accent);
	font: 400 15px/1 var(--dz-num);
	letter-spacing: 0.12em;
}
.dz-hero__title {
	margin-top: 14px;
	font: 700 clamp(30px, 4.6vw, 52px)/1.25 var(--dz-brandfont);
	color: var(--dz-ink);
	text-wrap: balance;
	word-break: auto-phrase;
}
@media (max-width: 520px) {
	.dz-br {
		display: none;
	}
}
.dz-hero__lead {
	max-width: 36em;
	margin-top: 12px;
	font-size: 16px;
	color: var(--dz-muted);
}
/* 冒頭の数: 数・1件ずつの印・言葉の順。区切りは点線 */
.dz-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 0;
	margin-top: 22px;
}
.dz-stat {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	padding: 2px 26px;
	border-left: 2px dashed var(--dz-line-strong);
}
.dz-stat:first-child {
	padding-left: 0;
	border-left: 0;
}
.dz-stat dt {
	order: 2;
	font-size: 12px;
	font-weight: 700;
	color: var(--dz-muted);
}
.dz-stat dd {
	order: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.dz-stat__num {
	font: 400 46px/0.9 var(--dz-num);
	color: var(--dz-ink);
	font-variant-numeric: tabular-nums;
}
.dz-stat__pips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	max-width: 150px;
	min-height: 9px;
}
.dz-stat__pips i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--c);
}
.dz-stat__pips i.is-hollow {
	background: transparent;
	box-shadow: inset 0 0 0 2px var(--c);
}
.dz-stat__bar {
	display: flex;
	gap: 3px;
	width: 132px;
	height: 9px;
}
.dz-stat__bar i {
	flex: var(--n, 1) 1 0;
	min-width: 6px;
	border-radius: 3px;
	background: var(--c);
	transform-origin: left center;
}
/* 読み込んだとき: 数が数え上がり、印が1つずつ置かれ、帯が伸びる */
.dz-stats.is-live .dz-stat__pips i {
	animation: dz-pip 0.42s calc(0.18s + var(--i) * 55ms) cubic-bezier(0.2, 1.5, 0.4, 1) backwards;
}
@keyframes dz-pip {
	from { opacity: 0; transform: scale(0); }
	to { opacity: 1; transform: scale(1); }
}
.dz-stats.is-live .dz-stat__bar i {
	animation: dz-grow 0.5s calc(0.3s + var(--i) * 90ms) cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
@keyframes dz-grow {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}
.dz-stat__pips i,
.dz-stat__bar i {
	transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.dz-stat__pips i:hover,
.dz-stat__bar i:hover {
	transform: scale(1.35);
}
.dz-stat__bar i:hover {
	transform: scaleY(1.6);
}

/* あなたの図鑑 */
.dz-mydex {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px;
	border: 3px solid var(--dz-ink);
	border-radius: var(--dz-radius);
	background: var(--dz-term);
	color: var(--dz-term-fg);
	box-shadow: 6px 6px 0 #ffbe794d;
}
.dz-mydex__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.dz-mydex__title {
	font: 700 17px/1.4 var(--dz-brandfont);
	color: var(--dz-term-fg);
}
.dz-mydex__count {
	font: 400 18px/1 var(--dz-num);
	color: var(--dz-term-muted);
}
.dz-mydex__count b {
	margin-right: 4px;
	font-weight: 400;
	font-size: 40px;
	color: var(--dz-term-key);
}
.dz-mydex__bar {
	height: 8px;
	border-radius: 4px;
	background: rgba(241, 237, 230, 0.14);
	overflow: hidden;
}
.dz-mydex__bar span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 4px;
	background: var(--dz-accent);
	transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dz-mydex__lines {
	display: grid;
	gap: 6px;
	font-size: 13px;
}
.dz-mydex__lines li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 70px auto;
	align-items: center;
	gap: 10px;
}
.dz-mydex__line-bar {
	height: 5px;
	border-radius: 3px;
	background: rgba(241, 237, 230, 0.14);
	overflow: hidden;
}
.dz-mydex__line-bar span {
	display: block;
	height: 100%;
	background: var(--dz-term-key);
}
.dz-mydex__lines .is-complete {
	color: var(--dz-term-key);
	font-weight: 700;
}
.dz-mydex__done {
	padding: 0 6px;
	border: 2px solid var(--dz-accent);
	border-radius: 4px;
	color: var(--dz-accent);
	font: 400 11px/1.4 var(--dz-num);
	letter-spacing: 0.1em;
	transform: rotate(-6deg);
}
.dz-mydex__num {
	font: 400 13px/1 var(--dz-num);
	color: var(--dz-term-muted);
	text-align: right;
	white-space: nowrap;
}
.dz-mydex__more {
	display: none;
}
@media (max-width: 760px) {
	.dz-mydex {
		gap: 10px;
		padding: 14px 16px;
	}
	.dz-mydex__more {
		display: block;
		padding: 0;
		border: 0;
		background: none;
		color: var(--dz-term-key);
		font-weight: 700;
		font-size: 13px;
		line-height: 1.4;
		font-family: inherit;
		text-align: left;
		text-decoration: underline;
		cursor: pointer;
	}
	.dz-mydex:not(.is-expanded) .dz-mydex__lines,
	.dz-mydex:not(.is-expanded) .dz-mydex__hint {
		display: none;
	}
	.dz-hero {
		gap: 18px;
	}
	.dz-stat__num {
		font-size: 38px;
	}
	.dz-stat {
		padding: 2px 16px;
	}
}
.dz-stat__short {
	display: none;
}
@media (max-width: 520px) {
	/* スマホでは3つを1行に */
	.dz-stats {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.dz-stat {
		padding: 2px 12px;
	}
	.dz-stat__num {
		font-size: 34px;
	}
	.dz-stat__pips {
		gap: 3px;
	}
	.dz-stat__pips i {
		width: 8px;
		height: 8px;
	}
	.dz-stat__bar {
		width: 100%;
	}
	.dz-stat__long {
		display: none;
	}
	.dz-stat__short {
		display: inline;
	}
}
.dz-mydex__hint {
	font-size: 12px;
	color: var(--dz-term-muted);
}
.dz-mydex__pc {
	margin-top: auto;
	padding: 10px 14px;
	border: 2px solid var(--dz-term-key);
	border-radius: 10px;
	background: transparent;
	color: var(--dz-term-fg);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.5;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}
.dz-mydex__pc:hover {
	background: rgba(255, 176, 113, 0.12);
}

/* 今日のディストロ */
.dz-today {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	margin-top: 26px;
	padding: 16px 20px;
	border: 3px solid var(--dz-ink);
	border-radius: var(--dz-radius);
	background: var(--dz-surface);
	box-shadow: 6px 6px 0 var(--dz-brand);
	text-decoration: none;
}
@media (max-width: 640px) {
	.dz-today {
		grid-template-columns: auto minmax(0, 1fr);
	}
	.dz-today__go {
		grid-column: 1 / -1;
	}
}
/* ロゴの札はカードと同じ（ブランドの色の影・モノグラムの字） */
.dz-today__logo {
	flex: none;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	padding: 7px;
	border: 3px solid var(--dz-ink);
	border-radius: 16px;
	background: var(--dz-surface);
	box-shadow: 3px 3px 0 var(--dz-brand);
}
.dz-today__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
/* 今日のディストロが出たとき、札が一度だけ手を振る */
.dz-today.is-in .dz-today__logo {
	animation: dz-hello 0.9s 0.35s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}
@keyframes dz-hello {
	0% { transform: rotate(0); }
	25% { transform: rotate(-9deg) translateY(-2px); }
	50% { transform: rotate(6deg); }
	75% { transform: rotate(-3deg); }
	100% { transform: rotate(0); }
}
.dz-today__kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--dz-muted);
}
.dz-today__kicker b {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--dz-accent);
	color: #fff;
}
.dz-today__kicker .is-birthday {
	background: var(--dz-ink);
	color: var(--dz-term-key);
}
.dz-today__name {
	font: 700 22px/1.35 var(--dz-brandfont);
	color: var(--dz-ink);
}
.dz-today__deck {
	font-size: 14px;
	color: var(--dz-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dz-today__go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 18px;
	border: 3px solid var(--dz-ink);
	border-radius: 12px;
	background: var(--dz-accent);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

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

.dz-find {
	margin-top: 28px;
}
.dz-bar {
	position: sticky;
	top: var(--dz-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(--dz-ink);
	background: color-mix(in srgb, var(--dz-ground) 94%, transparent);
	backdrop-filter: blur(8px);
}
.dz-search {
	flex: 1 1 320px;
	min-width: 0;
}
.dz-search input {
	width: 100%;
	min-height: 50px;
	padding: 8px 16px 8px 46px;
	border: 3px solid var(--dz-ink);
	border-radius: 12px;
	background: var(--dz-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(--dz-ink);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.4;
	font-family: inherit;
	box-shadow: none;
}
.dz-search input::placeholder {
	color: var(--dz-muted);
	font-weight: 400;
}
.dz-bar__btn,
.dz-sort select,
.dz-view button {
	min-height: 50px;
	border: 3px solid var(--dz-ink);
	border-radius: 12px;
	background: var(--dz-surface);
	color: var(--dz-ink);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	font-family: inherit;
	cursor: pointer;
}
.dz-bar__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
}
.dz-bar__filter[aria-expanded="true"],
.dz-bar__btn:hover {
	background: var(--dz-accent-soft);
}
.dz-badge:not(:empty) {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--dz-accent);
	color: #fff;
	font: 400 13px/1 var(--dz-num);
}
.dz-sort select {
	padding: 0 34px 0 14px;
	max-width: 180px;
}
.dz-view {
	display: inline-flex;
}
.dz-view button {
	padding: 0 14px;
}
.dz-view button:first-child {
	border-radius: 12px 0 0 12px;
}
.dz-view button:last-child {
	margin-left: -3px;
	border-radius: 0 12px 12px 0;
}
.dz-view button[aria-pressed="true"] {
	background: var(--dz-ink);
	color: var(--dz-ground);
}
@media (max-width: 640px) {
	/* 狭い画面では2段: 検索／絞り込み・並び順・並べ方 */
	.dz-bar {
		gap: 6px;
		padding: 8px 16px;
	}
	.dz-search {
		flex-basis: 100%;
	}
	.dz-search input,
	.dz-bar__btn,
	.dz-sort select,
	.dz-view button {
		min-height: 44px;
	}
	.dz-bar__btn {
		padding: 0 12px;
	}
	.dz-sort {
		flex: 1 1 0;
		min-width: 0;
	}
	.dz-sort select {
		width: 100%;
		max-width: none;
		padding: 0 28px 0 10px;
	}
	.dz-view button {
		padding: 0 10px;
	}
	/* 下へ読み進めるあいだは2段目をしまう（JS が is-folded を付ける） */
	.dz-bar.is-folded .dz-bar__filter,
	.dz-bar.is-folded .dz-sort,
	.dz-bar.is-folded .dz-view {
		display: none;
	}
}

/* 目的のチップ */
.dz-quick {
	display: flex;
	gap: 8px;
	margin: 14px -16px 0;
	padding: 2px 16px 6px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}
.dz-qchip {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 4px 16px;
	border: 2px solid var(--dz-ink);
	border-radius: 999px;
	background: var(--dz-surface);
	color: var(--dz-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;
}
.dz-qchip:hover {
	transform: translateY(-2px);
}
.dz-qchip[aria-current="true"],
.dz-qchip[aria-pressed="true"] {
	background: var(--dz-ink);
	color: var(--dz-ground);
}
.dz-qchip small:not(:empty) {
	font: 400 13px/1 var(--dz-num);
	color: var(--dz-muted);
}
.dz-qchip[aria-current="true"] small,
.dz-qchip[aria-pressed="true"] small {
	color: var(--dz-term-key);
}
.dz-qchip.is-empty {
	opacity: 0.45;
}
.dz-qchip--pc {
	border-color: var(--dz-accent);
}
.dz-qchip__stamp {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--dz-accent);
	color: #fff;
	font-size: 11px;
}

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

/* PC の質問のシート */
.dz-pcsheet__lead {
	font-size: 14px;
	color: var(--dz-muted);
}
.dz-pcsheet .pcq {
	margin-top: 0;
}

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

.dz-result-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-top: 22px;
}
.dz-count {
	font-weight: 700;
	color: var(--dz-muted);
}
.dz-count b {
	margin-right: 4px;
	font: 400 40px/1 var(--dz-num);
	color: var(--dz-ink);
	font-variant-numeric: tabular-nums;
}
.dz-count__of {
	margin-left: 6px;
	font: 400 16px/1 var(--dz-num);
}
.dz-active {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
}
.dz-active__chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--dz-ink);
	color: var(--dz-ground);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}
.dz-active__chip:hover {
	background: var(--dz-accent);
}
.dz-compare {
	margin-left: auto;
	font-size: 14px;
	font-weight: 800;
	color: var(--dz-ink);
}

.dz-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	margin-top: 16px;
}
.dz-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px 14px;
	border: 2px solid var(--dz-ink);
	border-radius: var(--dz-radius);
	background: var(--dz-surface);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	content-visibility: auto;
	contain-intrinsic-size: auto 330px;
}
.dz-card:hover {
	transform: translate(-3px, -3px);
	box-shadow: 6px 6px 0 var(--dz-brand);
}
.dz-card.is-edition {
	border-style: dashed;
}
.dz-card__top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	font-size: 12px;
	color: var(--dz-muted);
}
.dz-card__no {
	padding: 1px 8px 0;
	border-radius: 6px;
	background: var(--dz-ink);
	color: var(--dz-accent);
	font: 400 15px/1.4 var(--dz-num);
	letter-spacing: 0.06em;
}
.dz-card__born {
	font-weight: 700;
}
.dz-card__marks {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}
.dz-card__log {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--dz-ink);
	color: var(--dz-term-key);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}
.dz-card__fit {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 3px double currentColor;
	border-radius: 50%;
	font: 800 15px/1 var(--dz-brandfont);
	transform: rotate(-10deg);
}
.dz-card__fit.is-ok { color: var(--dz-ok); }
.dz-card__fit.is-fair { color: var(--dz-fair); }
.dz-card__fit.is-hard { color: var(--dz-hard); }
.dz-card__fit.is-missing { color: var(--dz-muted); }
.dz-card__fit.is-stamping {
	animation: dz-stamp 0.42s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes dz-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); }
}
.dz-card__main {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
}
.dz-card__main::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.dz-card__logo {
	flex: none;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	padding: 7px;
	border: 3px solid var(--dz-ink);
	border-radius: 16px;
	background: var(--dz-surface);
	box-shadow: 3px 3px 0 var(--dz-brand);
}
.dz-card__logo,
.dz-today__logo {
	transition: transform 0.28s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.dz-card:hover .dz-card__logo,
.dz-card:focus-within .dz-card__logo,
.dz-today:hover .dz-today__logo {
	transform: rotate(-5deg) translateY(-2px);
}
.dz-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.dz-card__mono {
	font: 700 22px/1 var(--dz-brandfont);
	color: var(--dz-ink);
}
.dz-card__names {
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.dz-card__title {
	width: fit-content;
	font: 700 22px/1.3 var(--dz-brandfont);
	color: var(--dz-ink);
}
.dz-card__reading {
	font-size: 12px;
	color: var(--dz-muted);
}
.dz-card__deck {
	font-size: 14px;
	line-height: 1.65;
	color: var(--dz-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dz-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.dz-tag {
	padding: 1px 9px;
	border: 1px solid var(--dz-line-strong);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}
.dz-tag--pick {
	border-color: var(--dz-accent);
	background: var(--dz-accent);
	color: #fff;
}
.dz-tag--pick::before {
	content: "★ ";
}
.dz-tag--ok { border-color: var(--dz-ok); color: var(--dz-ok); background: var(--dz-ok-soft); }
.dz-tag--fair { border-color: var(--dz-fair); color: var(--dz-fair); background: var(--dz-fair-soft); }
.dz-tag--end { border-color: var(--dz-hard); color: var(--dz-hard); background: var(--dz-hard-soft); }
.dz-card__spec {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px dashed var(--dz-line-strong);
	font-size: 12px;
}
.dz-card__spec dt {
	color: var(--dz-muted);
}
.dz-card__spec dd {
	font-weight: 800;
	color: var(--dz-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dz-card__spec .is-missing {
	font-weight: 400;
	color: var(--dz-muted);
}
.dz-card__actions {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 8px;
}
.dz-card__compare,
.dz-card__guide {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 38px;
	padding: 4px 12px;
	border: 2px solid var(--dz-line-strong);
	border-radius: 10px;
	background: var(--dz-surface);
	color: var(--dz-ink);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.2;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
}
.dz-card__compare:hover,
.dz-card__guide:hover {
	border-color: var(--dz-ink);
}
.dz-card__compare[aria-pressed="true"] {
	border-color: var(--dz-ink);
	background: var(--dz-ink);
	color: var(--dz-ground);
}
.dz-card__guide {
	margin-left: auto;
	border-color: var(--dz-ink);
	background: var(--dz-accent-soft);
}

/* 年表 */
.dz-timeline {
	position: relative;
	margin-top: 16px;
	padding-left: 8px;
}
.dz-timeline::before {
	content: "";
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 88px;
	width: 3px;
	border-radius: 2px;
	background: var(--dz-ink);
}
.dz-tl__year {
	position: relative;
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: 22px;
	padding: 10px 0;
}
.dz-tl__year::before {
	content: "";
	position: absolute;
	top: 22px;
	left: 75px;
	width: 13px;
	height: 13px;
	border: 3px solid var(--dz-ink);
	border-radius: 50%;
	background: var(--dz-accent);
}
.dz-tl__label {
	font: 400 30px/1.3 var(--dz-num);
	color: var(--dz-ink);
	text-align: right;
	padding-right: 8px;
}
.dz-tl__label small {
	display: block;
	font: 700 11px/1.2 system-ui, sans-serif;
	color: var(--dz-muted);
}
.dz-tl__items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 4px;
}
.dz-tl__note {
	flex-basis: 100%;
	font-size: 13px;
	color: var(--dz-muted);
}
.dz-tl__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 14px 5px 5px;
	border: 2px solid var(--dz-ink);
	border-left: 8px solid var(--dz-line-color, var(--dz-accent));
	border-radius: 12px;
	background: var(--dz-surface);
	font-weight: 800;
	text-decoration: none;
	transition: transform 0.15s ease;
}
.dz-tl__item:hover {
	transform: translateY(-2px);
}
.dz-tl__item img,
.dz-tl__mono {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	object-fit: contain;
}
.dz-tl__mono {
	display: grid;
	place-items: center;
	background: var(--dz-ground);
	font-size: 12px;
}
.dz-tl__item small {
	font-weight: 500;
	color: var(--dz-muted);
}
.dz-tl__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 0 14px 110px;
	font-size: 12px;
	color: var(--dz-muted);
}
.dz-tl__legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.dz-tl__legend span::before {
	content: "";
	width: 12px;
	height: 12px;
	border-radius: 3px;
	background: var(--dz-line-color);
}
@media (max-width: 600px) {
	.dz-timeline::before {
		left: 64px;
	}
	.dz-tl__year {
		grid-template-columns: 56px minmax(0, 1fr);
	}
	.dz-tl__year::before {
		left: 51px;
	}
	.dz-tl__label {
		font-size: 22px;
	}
	.dz-tl__legend {
		margin-left: 80px;
	}
}

.dz-empty {
	margin-top: 24px;
	padding: 36px 20px;
	border: 2px dashed var(--dz-line-strong);
	border-radius: var(--dz-radius);
	text-align: center;
}
.dz-empty__mark {
	font: 400 88px/1 var(--dz-num);
	color: var(--dz-accent);
}
.dz-empty__title {
	margin-top: 8px;
	font: 700 19px/1.5 var(--dz-brandfont);
	color: var(--dz-ink);
}
.dz-empty a {
	display: inline-block;
	margin-top: 14px;
	font-weight: 800;
}

.dz-more {
	display: grid;
	gap: 20px;
	margin-top: 40px;
}
.dz-relations {
	border: 2px solid var(--dz-ink);
	border-radius: var(--dz-radius);
	background: var(--dz-surface);
	overflow: hidden;
}
.dz-relations summary {
	padding: 16px 20px;
	font: 700 17px/1.4 var(--dz-brandfont);
	color: var(--dz-ink);
	cursor: pointer;
}
.dz-relations[open] summary {
	border-bottom: 1px solid var(--dz-line);
}
.dz-criteria {
	font-size: 14px;
	font-weight: 700;
}

.dz-toast {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 100002;
	max-width: min(92vw, 520px);
	padding: 10px 18px;
	border: 2px solid var(--dz-ink);
	border-radius: 999px;
	background: var(--dz-ink);
	color: var(--dz-ground);
	font-size: 14px;
	font-weight: 600;
	box-shadow: 4px 4px 0 var(--dz-accent);
	transform: translate(-50%, 200%);
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
	pointer-events: none;
}
@media (max-width: 900px) {
	.dz-toast {
		bottom: calc(92px + env(safe-area-inset-bottom, 0px));
	}
}
.dz-toast.is-shown {
	transform: translate(-50%, 0);
}
.dz-toast:empty {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	@view-transition {
		navigation: none;
	}
	.dz *,
	.dz *::before,
	.dz *::after,
	.dz-scrim {
		animation: none !important;
		transition: none !important;
	}
}

/* 図鑑で遊ぶ（/pc-life/・/distro-quiz/） */
.dz-play {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	margin: 24px 0; /* 上の冒頭（.dz-hero）と下の「今日のディストロ」に貼り付かないように */
}
.dz-play__card {
	position: relative;
	display: grid;
	gap: 4px;
	padding: 16px 48px 16px 18px;
	border: 3px solid #1d1813;
	border-radius: 16px;
	background: #1d1813;
	color: #f4efe7;
	text-decoration: none;
	box-shadow: 6px 6px 0 rgba(255, 91, 0, 0.3);
	transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1.3), box-shadow 0.2s;
}
.dz-play__card.is-quiz {
	background: #fff;
	color: #1d1813;
}
.dz-play__card:hover {
	transform: translateY(-3px) rotate(-0.4deg);
	box-shadow: 9px 9px 0 rgba(255, 91, 0, 0.35);
}
.dz-play__kicker {
	font: 700 12px/1.2 "SFMono-Regular", Consolas, "BIZ UDGothic", monospace;
	color: #ffb071;
}
.dz-play__card.is-quiz .dz-play__kicker {
	color: #b43f00;
}
.dz-play__title {
	font-size: 18px;
	line-height: 1.4;
}
.dz-play__title em {
	font-style: normal;
	color: #ff8a3d;
}
.dz-play__go {
	position: absolute;
	right: 16px;
	top: 50%;
	margin-top: -14px;
	font-size: 22px;
	line-height: 28px;
	transition: transform 0.2s;
}
.dz-play__card:hover .dz-play__go {
	transform: translateX(4px);
}
.dz-play__card:focus-visible {
	outline: 3px solid #ff5b00;
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	.dz-play__card,
	.dz-play__go {
		transition: none;
	}
}

/* エディションの数（有料があれば小さく添える） */
.dz-tag--ed {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.dz-tag__paid {
	padding: 0 6px;
	border-radius: 999px;
	background: var(--dz-accent, #ff5b00);
	color: #fff;
	font-size: 0.85em;
	font-weight: 700;
}
