/*
 * コマンド辞典・用語辞典の一覧（template-parts/kb-dex/page.php・assets/js/kb-dex.js）。
 * ディストロ図鑑・ガイドと同じ世界観: 墨の太い枠・ずらしたオレンジの影・DIN の数・サイトの字・端末。
 * --kd-c は分野の色（カード・札の影・印）。ルートの文字サイズは 62.5%（1rem = 10px）なので px で書く。
 * 動きを減らす設定（OS と goodly-pwa の gp-reduce）では動かさない。
 */

@view-transition {
	navigation: auto;
}

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

	display: block;
	background: var(--kd-ground);
	color: var(--kd-text);
	padding: 20px 16px 0;
}
.kd {
	max-width: 1240px;
	margin: 0 auto;
	padding-bottom: 90px;
	font: 400 16px/1.75 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
	overflow-wrap: anywhere;
}
.kd *,
.kd *::before,
.kd *::after,
.kd-peek *,
.kd-peek *::before,
.kd-peek *::after {
	box-sizing: border-box;
}
.kd :where(h1, h2, h3, p, ul, ol, dl, dd, figure, pre),
.kd-peek :where(h1, h2, h3, p, ul, ol, dl, dd, figure, pre) {
	margin: 0;
	padding: 0;
}
.kd :where(ul, ol),
.kd-peek :where(ul, ol) {
	list-style: none;
}
.kd :where(h2, h3)::before,
.kd :where(h2, h3)::after,
.kd-peek :where(h2, h3)::before,
.kd-peek :where(h2, h3)::after {
	content: none;
}
.kd :where(a),
.kd-peek :where(a) {
	color: inherit;
	text-underline-offset: 4px;
}
.kd :where(button),
.kd-peek :where(button) {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.kd :where(a, button, summary, input, select, [tabindex]):focus-visible,
.kd-peek :where(a, button, [tabindex]):focus-visible {
	outline: 3px solid var(--kd-accent);
	outline-offset: 2px;
}
.kd [hidden],
.kd-peek [hidden] {
	display: none !important;
}

/* ---------- パンくず・冒頭 ---------- */

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

.kd-hero {
	display: grid;
	gap: 24px;
	margin-top: 18px;
	align-items: stretch;
}
@media (min-width: 960px) {
	.kd-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
		gap: 40px;
	}
}
.kd-hero__kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font: 700 14px/1 var(--kd-brandfont);
	color: var(--kd-ink);
}
.kd-hero__kicker span {
	padding: 5px 10px 4px;
	border-radius: 6px;
	background: var(--kd-ink);
	color: var(--kd-accent);
	font: 400 15px/1 var(--kd-num);
	letter-spacing: 0.12em;
}
.kd .kd-hero__title {
	margin-top: 14px;
	font: 700 clamp(30px, 4.6vw, 52px)/1.25 var(--kd-brandfont);
	color: var(--kd-ink);
	text-wrap: balance;
	word-break: auto-phrase;
}
@media (max-width: 520px) {
	.kd-br {
		display: none;
	}
}
.kd-hero__lead {
	max-width: 36em;
	margin-top: 12px;
	font-size: 16px;
	color: var(--kd-muted);
}
.kd-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 0;
	margin-top: 22px;
}
.kd-stat {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	padding: 2px 26px;
	border-left: 2px dashed var(--kd-line-strong);
}
.kd-stat:first-child {
	padding-left: 0;
	border-left: 0;
}
.kd-stat dt {
	order: 2;
	font-size: 12px;
	font-weight: 700;
	color: var(--kd-muted);
}
.kd-stat__unit {
	margin-left: 4px;
}
.kd-stat dd {
	order: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.kd-stat__num {
	font: 400 46px/0.9 var(--kd-num);
	color: var(--kd-ink);
	font-variant-numeric: tabular-nums;
}
.kd-stat__pips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	max-width: 150px;
	min-height: 9px;
}
.kd-stat__pips i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--c);
}
.kd-stat__bar {
	display: flex;
	gap: 3px;
	width: 132px;
	height: 9px;
}
.kd-stat__bar i {
	flex: var(--n, 1) 1 0;
	min-width: 6px;
	border-radius: 3px;
	background: var(--kd-ink);
	transform-origin: left center;
}
/* 知識レベルは、やさしいほど明るいオレンジ。危なさは、緑→黄→赤→墨 */
.kd-stat__bar i.is-lv1 { background: #ffb071; }
.kd-stat__bar i.is-lv2 { background: #ff8a3d; }
.kd-stat__bar i.is-lv3 { background: var(--kd-accent); }
.kd-stat__bar i.is-lv4 { background: var(--kd-ink); }
.kd-stat__bar i.is-rest { background: var(--kd-line-strong); }
.kd-stat__bar i.is-risk0 { background: var(--kd-ok); }
.kd-stat__bar i.is-risk1 { background: #e0a100; }
.kd-stat__bar i.is-risk2 { background: var(--kd-hard); }
.kd-stat__bar i.is-risk3 { background: var(--kd-ink); }
.kd-stats.is-live .kd-stat__pips i {
	animation: kd-pip 0.42s calc(0.18s + var(--i) * 55ms) var(--kd-spring) backwards;
}
.kd-stats.is-live .kd-stat__bar i {
	animation: kd-grow 0.5s calc(0.3s + var(--i) * 90ms) cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
.kd-stat__pips i,
.kd-stat__bar i {
	transition: transform 0.2s var(--kd-spring);
}
.kd-stat__pips i:hover {
	transform: scale(1.35);
}
.kd-stat__bar i:hover {
	transform: scaleY(1.6);
}

/* あなたの辞典 */
.kd-mine {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px;
	border: 3px solid var(--kd-ink);
	border-radius: var(--kd-radius);
	background: var(--kd-term);
	color: var(--kd-term-fg);
	box-shadow: 6px 6px 0 #ffbe794d;
}
.kd-mine__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.kd .kd-mine__title {
	font: 700 17px/1.4 var(--kd-brandfont);
	color: var(--kd-term-fg);
}
.kd-mine__count {
	font: 400 18px/1 var(--kd-num);
	color: var(--kd-term-muted);
	white-space: nowrap;
}
.kd-mine__count b {
	display: inline-block;
	margin-right: 4px;
	font-weight: 400;
	font-size: 40px;
	color: var(--kd-term-key);
	font-variant-numeric: tabular-nums;
}
.kd-mine__count b.is-bump {
	animation: kd-bump 0.5s var(--kd-spring);
}
.kd-mine__bar {
	height: 8px;
	border-radius: 4px;
	background: rgba(241, 237, 230, 0.14);
	overflow: hidden;
}
.kd-mine__bar span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 4px;
	background: var(--kd-accent);
	transition: width 0.8s var(--kd-out);
}
.kd-mine__gacha {
	font-size: 13px;
	color: var(--kd-term-muted);
}
.kd-mine__gacha b {
	color: var(--kd-term-key);
	font: 400 17px/1 var(--kd-num);
}
.kd-mine__gacha a {
	color: var(--kd-term-key);
	font-weight: 700;
}
.kd-mine__cats {
	display: grid;
	gap: 6px;
	max-height: 196px;
	overflow-y: auto;
	padding-right: 4px;
	font-size: 13px;
	scrollbar-width: thin;
	scrollbar-color: rgba(241, 237, 230, 0.3) transparent;
}
.kd-mine__cats li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 70px 64px;
	align-items: center;
	gap: 10px;
}
.kd-mine__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kd-mine__name::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 0 1.5px rgba(241, 237, 230, 0.4);
	vertical-align: 1px;
}
.kd-mine__line {
	height: 5px;
	border-radius: 3px;
	background: rgba(241, 237, 230, 0.14);
	overflow: hidden;
}
.kd-mine__line span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--kd-term-key);
	transition: width 0.8s var(--kd-out);
}
.kd-mine__num {
	font: 400 13px/1 var(--kd-num);
	color: var(--kd-term-muted);
	text-align: right;
	white-space: nowrap;
}
.kd-mine__cats .is-complete .kd-mine__name {
	color: var(--kd-term-key);
	font-weight: 700;
}
.kd-mine__cats .is-complete .kd-mine__num {
	justify-self: end;
	padding: 0 6px;
	border: 2px solid var(--kd-accent);
	border-radius: 4px;
	color: var(--kd-accent);
	font: 400 11px/1.4 var(--kd-num);
	letter-spacing: 0.1em;
	transform: rotate(-6deg);
}
.kd-mine__more {
	display: none;
}
.kd-mine__hint {
	font-size: 12px;
	color: var(--kd-term-muted);
}
.kd .kd-mine__dice {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding: 10px 14px;
	border: 2px solid var(--kd-term-key);
	border-radius: 10px;
	background: transparent;
	color: var(--kd-term-fg);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
	transition: background 0.16s ease, transform 0.18s var(--kd-spring);
}
.kd .kd-mine__dice:hover {
	background: rgba(255, 176, 113, 0.12);
}
.kd .kd-mine__dice:active {
	transform: scale(0.97);
}
.kd-mine__die {
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--kd-term-key);
	-webkit-mask: var(--kd-i-dice) center / contain no-repeat;
	mask: var(--kd-i-dice) center / contain no-repeat;
}
.kd-mine__dice.is-rolling .kd-mine__die {
	animation: kd-roll 0.7s var(--kd-spring);
}
.kd-mine__dice.is-rolling [data-kd-dice-label] {
	font-family: var(--kd-mono);
	color: var(--kd-term-key);
}
@media (max-width: 760px) {
	.kd-mine {
		gap: 10px;
		padding: 14px 16px;
	}
	.kd .kd-mine__more {
		display: block;
		padding: 0;
		border: 0;
		background: none;
		color: var(--kd-term-key);
		font-weight: 700;
		font-size: 13px;
		line-height: 1.4;
		text-align: left;
		text-decoration: underline;
	}
	.kd-mine:not(.is-expanded) .kd-mine__cats,
	.kd-mine:not(.is-expanded) .kd-mine__hint {
		display: none;
	}
	.kd-hero {
		gap: 18px;
	}
	.kd-stat__num {
		font-size: 38px;
	}
	.kd-stat {
		padding: 2px 16px;
	}
}
@media (max-width: 520px) {
	.kd-stats {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.kd-stat {
		padding: 2px 12px;
	}
	.kd-stat__num {
		font-size: 34px;
	}
	.kd-stat__bar {
		width: 100%;
	}
	.kd-stat__unit {
		display: none;
	}
}

/* 遊ぶ（今日の一行・ガチャなど） */
.kd-play {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
	gap: 14px;
	margin-top: 24px;
}
.kd .kd-play__card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 14px;
	padding: 14px 20px;
	border: 3px solid var(--kd-ink);
	border-radius: var(--kd-radius);
	background: var(--kd-surface);
	box-shadow: 5px 5px 0 var(--kd-ink);
	color: var(--kd-ink);
	text-decoration: none;
	transition: transform 0.18s var(--kd-spring), box-shadow 0.18s ease;
}
.kd .kd-play__card.is-dark {
	background: var(--kd-term);
	color: var(--kd-term-fg);
	box-shadow: 5px 5px 0 var(--kd-accent);
}
.kd-play__kicker {
	grid-column: 1;
	font-size: 12px;
	font-weight: 700;
	color: var(--kd-accent);
}
.kd-play__title {
	grid-column: 1;
	font: 700 18px/1.4 var(--kd-brandfont);
}
.kd-play__ps {
	font-family: var(--kd-mono);
	color: var(--kd-term-key);
}
.kd-play__go {
	grid-column: 2;
	grid-row: 1 / span 2;
	font: 700 24px/1 var(--kd-num);
	transition: transform 0.2s var(--kd-spring);
}
.kd .kd-play__card:active {
	transform: translate(2px, 2px);
	box-shadow: 2px 2px 0 var(--kd-ink);
}

/* 今日の1つ */
.kd-today {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	margin-top: 22px;
	padding: 16px 20px;
	border: 3px solid var(--kd-ink);
	border-radius: var(--kd-radius);
	background: var(--kd-surface);
	box-shadow: 6px 6px 0 var(--kd-c, var(--kd-accent));
}
@media (max-width: 640px) {
	.kd-today {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 14px;
		padding: 14px 16px;
	}
	.kd .kd-today__go {
		grid-column: 1 / -1;
	}
}
.kd-today__tile,
.kd-card__tile,
.kd-peek__tile {
	flex: none;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border: 3px solid var(--kd-ink);
	border-radius: 16px;
	background: var(--kd-surface);
	box-shadow: 3px 3px 0 var(--kd-c, var(--kd-accent));
	color: var(--kd-ink);
	font: 700 22px/1 var(--kd-brandfont);
	letter-spacing: -0.01em;
	transition: transform 0.28s var(--kd-spring);
}
.kd-page--command :is(.kd-today__tile, .kd-card__tile),
.kd-peek.is-command .kd-peek__tile {
	font-family: var(--kd-mono);
	font-weight: 700;
	font-size: 21px;
}
.kd-today.is-in .kd-today__tile {
	animation: kd-hello 0.9s 0.35s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}
.kd-today__body {
	min-width: 0;
}
.kd-today__kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--kd-muted);
}
.kd-today__kicker b {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--kd-accent);
	color: #fff;
}
.kd-today__kicker span {
	font: 400 14px/1 var(--kd-num);
	letter-spacing: 0.06em;
}
.kd .kd-today__name {
	font: 700 22px/1.35 var(--kd-brandfont);
	color: var(--kd-ink);
}
.kd-page--command .kd .kd-today__name {
	font-family: var(--kd-mono);
}
.kd-today__deck {
	font-size: 14px;
	color: var(--kd-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.kd .kd-today__go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 18px;
	border: 3px solid var(--kd-ink);
	border-radius: 12px;
	background: var(--kd-accent);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.18s var(--kd-spring);
}
.kd .kd-today__go:active {
	transform: scale(0.96);
}

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

/* フォームは箱を作らない（帯がページの最後まで貼り付くように。箱があると、フォームの終わりで一緒に流れていく） */
.kd-find {
	display: contents;
}
.kd-bar {
	margin-top: 28px;
	position: sticky;
	top: var(--kd-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(--kd-ink);
	background: color-mix(in srgb, var(--kd-ground) 94%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: box-shadow 0.2s ease;
}
.kd-bar.is-stuck {
	box-shadow: 0 10px 24px rgba(29, 24, 19, 0.08);
}
.kd-search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 320px;
	min-width: 0;
	min-height: 52px;
	border: 3px solid var(--kd-ink);
	border-radius: 12px;
	background: var(--kd-surface);
	transition: box-shadow 0.2s var(--kd-out), transform 0.2s var(--kd-spring);
}
.kd-search:focus-within {
	box-shadow: 4px 4px 0 var(--kd-accent);
	transform: translate(-2px, -2px);
}
/* 端末の入力のように: $ apropos ▏ */
.kd-search__ps {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: stretch;
	margin: 4px 0 4px 4px;
	padding: 0 12px;
	border-radius: 8px;
	background: var(--kd-term);
	color: var(--kd-term-fg);
	font: 600 14px/1 var(--kd-mono);
}
.kd-search__ps b {
	color: var(--kd-term-key);
}
.kd-search input {
	flex: 1;
	min-width: 0;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	outline: none;
	background: transparent;
	box-shadow: none;
	color: var(--kd-ink);
	font: 600 16px/1.4 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
	-webkit-appearance: none;
	appearance: none;
}
.kd-search input::placeholder {
	color: var(--kd-muted);
	font-weight: 400;
}
.kd-search input::-webkit-search-decoration {
	-webkit-appearance: none;
}
.kd-search__kbd {
	flex: none;
	display: grid;
	place-items: center;
	min-width: 26px;
	height: 26px;
	margin-right: 12px;
	padding: 0 6px;
	border: 2px solid var(--kd-line-strong);
	border-bottom-width: 3px;
	border-radius: 7px;
	color: var(--kd-muted);
	font: 400 14px/1 var(--kd-num);
}
.kd-search:focus-within .kd-search__kbd,
.kd-search:has(input:not(:placeholder-shown)) .kd-search__kbd {
	display: none;
}
@media (pointer: coarse) {
	.kd-search__kbd {
		display: none;
	}
}
.kd-sort select,
.kd-view button,
.kd .kd-bar__go {
	min-height: 52px;
	padding: 6px 16px;
	border: 3px solid var(--kd-ink);
	border-radius: 12px;
	background: var(--kd-surface);
	color: var(--kd-ink);
	font: 700 14px/1.2 inherit;
	font-family: inherit;
}
.kd-sort select {
	padding-right: 32px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--kd-surface) no-repeat right 12px center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d1813' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	cursor: pointer;
}
.kd-view {
	display: flex;
	border: 3px solid var(--kd-ink);
	border-radius: 12px;
	overflow: hidden;
}
.kd .kd-view button {
	min-height: 46px;
	border: 0;
	border-radius: 0;
	background: var(--kd-surface);
}
.kd .kd-view button[aria-pressed="true"] {
	background: var(--kd-ink);
	color: #fff;
}
@media (max-width: 640px) {
	.kd-bar.is-folded .kd-sort,
	.kd-bar.is-folded .kd-view {
		display: none;
	}
	.kd-search {
		flex-basis: 100%;
	}
	.kd-search__ps span {
		display: none;
	}
	.kd-sort {
		flex: 1;
	}
	.kd-sort select {
		width: 100%;
		min-height: 46px;
	}
	.kd .kd-view button {
		min-height: 40px;
		padding: 4px 14px;
	}
}

/* 分野のチップ（スマホは横に流す）と、知識レベル */
.kd-chips,
.kd-levels {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}
.kd-levels {
	margin-top: 10px;
}
@media (max-width: 760px) {
	.kd-chips,
	.kd-levels {
		flex-wrap: nowrap;
		margin-inline: -16px;
		padding: 2px 16px 6px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
		mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
	}
	.kd-chips::-webkit-scrollbar,
	.kd-levels::-webkit-scrollbar {
		display: none;
	}
}
.kd .kd-chip,
.kd .kd-level {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 4px 14px;
	border: 2px solid var(--kd-ink);
	border-radius: 999px;
	background: var(--kd-surface);
	color: var(--kd-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	scroll-snap-align: start;
	transition: transform 0.18s var(--kd-spring), background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.kd-chip .kd-ico {
	width: 16px;
	height: 16px;
	color: var(--c, var(--kd-ink));
}
.kd .kd-chip small,
.kd .kd-level small {
	min-width: 20px;
	padding: 2px 6px 1px;
	border-radius: 999px;
	background: var(--kd-sub);
	color: var(--kd-muted);
	font: 400 13px/1.2 var(--kd-num);
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.kd .kd-chip[aria-current="true"],
.kd .kd-level[aria-current="true"],
.kd .kd-toggle[aria-pressed="true"] {
	background: var(--kd-ink);
	color: #fff;
	box-shadow: 3px 3px 0 var(--c, var(--kd-accent));
}
.kd .kd-chip[aria-current="true"] .kd-ico {
	color: #fff;
}
.kd .kd-chip[aria-current="true"] small,
.kd .kd-level[aria-current="true"] small,
.kd .kd-toggle[aria-pressed="true"] small {
	background: rgba(255, 255, 255, 0.16);
	color: var(--kd-term-key);
}
.kd .kd-chip.is-zero,
.kd .kd-level.is-zero {
	opacity: 0.45;
}
.kd .kd-chip.is-complete::after {
	content: "";
	width: 14px;
	height: 14px;
	margin-left: -2px;
	background: var(--kd-accent);
	-webkit-mask: var(--kd-i-crown) center / contain no-repeat;
	mask: var(--kd-i-crown) center / contain no-repeat;
}
.kd small.is-bump {
	animation: kd-bump 0.4s var(--kd-spring);
}
.kd .kd-chip:active,
.kd .kd-level:active {
	transform: scale(0.95);
}
.kd .kd-toggle {
	border-style: dashed;
}
.kd-toggle__dot {
	width: 10px;
	height: 10px;
	border: 2px solid currentColor;
	border-radius: 50%;
}
.kd-toggle__star {
	color: var(--kd-accent);
}

/* 知識レベル: 電波の棒のように、難しいほど立つ */
.kd-lv {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 14px;
}
.kd-lv i {
	width: 4px;
	border-radius: 1px;
	background: var(--kd-line-strong);
}
.kd-lv i:nth-child(1) { height: 5px; }
.kd-lv i:nth-child(2) { height: 8px; }
.kd-lv i:nth-child(3) { height: 11px; }
.kd-lv i:nth-child(4) { height: 14px; }
.kd-lv[data-lv="1"] i:nth-child(-n + 1),
.kd-lv[data-lv="2"] i:nth-child(-n + 2),
.kd-lv[data-lv="3"] i:nth-child(-n + 3),
.kd-lv[data-lv="4"] i:nth-child(-n + 4) {
	background: currentColor;
}
.kd-lv em {
	margin-left: 5px;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	line-height: 1;
}

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

.kd-result-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 22px;
}
.kd-count {
	font-weight: 700;
	color: var(--kd-muted);
}
.kd-count b {
	margin-right: 4px;
	font: 400 40px/1 var(--kd-num);
	color: var(--kd-ink);
	font-variant-numeric: tabular-nums;
}
.kd-count__of {
	margin-left: 6px;
	font: 400 16px/1 var(--kd-num);
}
/* いま打っている探し方を、端末の1行のように */
.kd-stdout {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 4px 12px;
	border-radius: 8px;
	background: var(--kd-term);
	color: var(--kd-term-fg);
	font: 500 13px/1.6 var(--kd-mono);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kd-stdout__ps {
	color: var(--kd-term-key);
}
.kd-stdout::after {
	content: "";
	width: 7px;
	height: 15px;
	background: var(--kd-term-key);
	animation: kd-caret 1.1s steps(1) infinite;
}
.kd .kd-clear {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--kd-ink);
	font-size: 14px;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.kd-body {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 18px;
	margin-top: 16px;
}
.kd-body.has-rail {
	grid-template-columns: minmax(0, 1fr) 30px;
}
.kd-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	align-content: start;
	min-width: 0;
}

/* 頭文字の見出し（ABC 順のとき） */
.kd .kd-letter {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 10px;
	scroll-margin-top: calc(var(--kd-top) + 110px);
	font: 400 34px/1 var(--kd-num);
	color: var(--kd-ink);
}
.kd .kd-letter:first-child {
	margin-top: 0;
}
.kd-letter span {
	display: grid;
	place-items: center;
	min-width: 52px;
	height: 52px;
	padding: 4px 10px 0;
	border-radius: 12px;
	background: var(--kd-ink);
	color: var(--kd-accent);
}
.kd-letter::after {
	content: "";
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: repeating-linear-gradient(90deg, var(--kd-line-strong) 0 8px, transparent 8px 14px);
}
.kd-letter small {
	order: 2;
	font: 400 16px/1 var(--kd-num);
	color: var(--kd-muted);
}

/* 辞書の「つめ」（ABC 順のとき、頭文字の最初のカードの上に）。行のすき間を少し広げて、つめの場所を空ける */
.kd-grid.is-grouped:not(.is-list) {
	row-gap: 34px;
	padding-top: 16px;
}
.kd-card[data-kd-tab] {
	content-visibility: visible;
	scroll-margin-top: calc(var(--kd-top) + 130px);
}
.kd-grid:not(.is-list) .kd-card[data-kd-tab]::before {
	content: attr(data-kd-tab);
	position: absolute;
	bottom: calc(100% + 2px);
	left: 14px;
	min-width: 40px;
	height: 26px;
	padding: 3px 10px 0;
	border-radius: 8px 8px 0 0;
	background: var(--kd-ink);
	color: var(--kd-accent);
	font: 400 20px/24px var(--kd-num);
	text-align: center;
	letter-spacing: 0.04em;
}

/* カード */
.kd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	border: 2px solid var(--kd-ink);
	border-radius: var(--kd-radius);
	background: var(--kd-surface);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	content-visibility: auto;
	contain-intrinsic-size: auto 230px;
}
.kd-card.is-open {
	background: linear-gradient(180deg, color-mix(in srgb, var(--kd-c) 6%, var(--kd-surface)), var(--kd-surface) 60%);
}
.kd-card__top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	font-size: 12px;
	color: var(--kd-muted);
}
.kd-card__no {
	flex: none;
	padding: 1px 8px 0;
	border-radius: 6px;
	background: var(--kd-ink);
	color: var(--kd-accent);
	font: 400 15px/1.4 var(--kd-num);
	letter-spacing: 0.06em;
}
.kd-card__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kd-card__cat .kd-ico {
	flex: none;
	width: 15px;
	height: 15px;
	color: var(--kd-c);
}
.kd-card__marks {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	flex: none;
}
/* 開いた印（判子）・保存・ガチャ */
.kd-mark {
	display: grid;
	place-items: center;
	font-weight: 800;
	line-height: 1;
}
.kd-mark--open {
	width: 32px;
	height: 32px;
	border: 3px double var(--kd-c, var(--kd-accent));
	border-radius: 50%;
	color: var(--kd-c, var(--kd-accent));
	font: 800 13px/1 var(--kd-brandfont);
	transform: rotate(-12deg);
}
.kd-mark--open.is-stamping {
	animation: kd-stamp 0.5s var(--kd-spring) both;
}
.kd-mark--saved {
	color: var(--kd-accent);
	font-size: 18px;
}
.kd-mark--gacha {
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--kd-ink);
	color: var(--kd-term-key);
	font-size: 11px;
}
.kd .kd-card__main {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	text-decoration: none;
}
.kd-card__main::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.kd-card__main:focus-visible {
	outline: none;
}
.kd-card:has(.kd-card__main:focus-visible) {
	outline: 3px solid var(--kd-accent);
	outline-offset: 3px;
}
.kd-card__names {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.kd-card__title {
	font: 700 22px/1.3 var(--kd-brandfont);
	color: var(--kd-ink);
}
.kd-page--command .kd-card__title {
	font-family: var(--kd-mono);
	font-size: 22px;
}
.kd-card__reading {
	font-size: 12px;
	color: var(--kd-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kd-card__deck {
	font-size: 14px;
	line-height: 1.65;
	color: var(--kd-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.kd-card__foot {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	color: var(--kd-ink);
}
.kd-risk {
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
}
.kd-risk.is-1 {
	background: var(--kd-fair-soft);
	color: var(--kd-fair);
}
.kd-risk.is-2 {
	background: var(--kd-hard-soft);
	color: var(--kd-hard);
}
.kd-risk.is-3 {
	background: repeating-linear-gradient(-45deg, var(--kd-ink) 0 6px, #3a2f25 6px 12px);
	color: #ffd2c2;
}
.kd-risk.is-3::before {
	content: "⚠ ";
}
@media (hover: hover) {
	.kd-card:hover {
		transform: translate(-3px, -3px);
		box-shadow: 6px 6px 0 var(--kd-c, var(--kd-accent));
	}
	.kd-card:hover .kd-card__tile,
	.kd-today:hover .kd-today__tile {
		transform: rotate(-5deg) translateY(-2px);
	}
	.kd .kd-play__card:hover {
		transform: translate(-2px, -2px);
		box-shadow: 7px 7px 0 var(--kd-accent);
	}
	.kd .kd-play__card:hover .kd-play__go {
		transform: translateX(4px);
	}
	.kd .kd-chip:hover,
	.kd .kd-level:hover {
		transform: translate(-1px, -1px);
		box-shadow: 3px 3px 0 var(--c, var(--kd-accent));
	}
	.kd .kd-today__go:hover {
		transform: translate(-2px, -2px);
		box-shadow: 3px 3px 0 var(--kd-ink);
	}
}
.kd-card:active {
	transform: scale(0.985);
}
/* 押したカードは、のぞき見が開くまで少し沈む */
.kd-card.is-pressed {
	transform: scale(0.97);
	box-shadow: 2px 2px 0 var(--kd-c, var(--kd-accent));
}

/* 一覧（行） */
.kd-grid.is-list {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	border: 2px solid var(--kd-ink);
	border-radius: var(--kd-radius);
	background: var(--kd-surface);
	overflow: hidden;
}
.kd-grid.is-list .kd-letter {
	margin: 0;
	padding: 8px 14px;
	border-bottom: 2px solid var(--kd-line);
	background: var(--kd-sub);
	font-size: 20px;
}
.kd-grid.is-list .kd-letter span {
	min-width: 34px;
	height: 30px;
	border-radius: 8px;
}
.kd-grid.is-list .kd-card {
	display: grid;
	grid-template-columns: 74px minmax(150px, 230px) minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid var(--kd-line);
	border-radius: 0;
	contain-intrinsic-size: auto 62px;
}
.kd-grid.is-list .kd-card:last-child {
	border-bottom: 0;
}
.kd-grid.is-list .kd-card__top {
	display: contents;
}
.kd-grid.is-list .kd-card__no {
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
}
.kd-grid.is-list .kd-card__cat {
	display: none;
}
.kd-grid.is-list .kd-card__marks {
	grid-column: 5;
	grid-row: 1;
	margin: 0;
}
.kd-grid.is-list .kd-card__main {
	grid-column: 2;
	grid-row: 1;
}
.kd-grid.is-list .kd-card__tile {
	display: none;
}
.kd-grid.is-list .kd-card__title {
	font-size: 17px;
}
.kd-grid.is-list .kd-card__deck {
	grid-column: 3;
	grid-row: 1;
	-webkit-line-clamp: 1;
	font-size: 13px;
	color: var(--kd-muted);
}
.kd-grid.is-list .kd-card__foot {
	grid-column: 4;
	grid-row: 1;
	margin: 0;
}
.kd-grid.is-list .kd-lv em {
	display: none;
}
.kd-grid.is-list .kd-mark--open {
	width: 26px;
	height: 26px;
	font-size: 11px;
}
@media (hover: hover) {
	.kd-grid.is-list .kd-card:hover {
		transform: none;
		box-shadow: inset 4px 0 0 var(--kd-c, var(--kd-accent));
		background: var(--kd-sub);
	}
}
@media (max-width: 760px) {
	.kd-grid.is-list .kd-card {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 10px;
	}
	.kd-grid.is-list .kd-card__no {
		display: none;
	}
	.kd-grid.is-list .kd-card__main {
		grid-column: 1;
	}
	.kd-grid.is-list .kd-card__deck {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.kd-grid.is-list .kd-card__foot {
		grid-column: 2;
		grid-row: 1;
	}
	.kd-grid.is-list .kd-card__marks {
		grid-column: 2;
		grid-row: 2;
		justify-self: end;
	}
}

/* 頭文字のレール（右に貼り付く。指でなぞると飛ぶ） */
.kd-rail {
	position: sticky;
	top: calc(var(--kd-top) + 90px);
	align-self: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	max-height: calc(100dvh - var(--kd-top) - 120px);
	padding: 6px 0;
	border-radius: 999px;
	background: var(--kd-surface);
	box-shadow: inset 0 0 0 2px var(--kd-ink);
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}
.kd .kd-rail button {
	display: grid;
	place-items: center;
	width: 26px;
	min-height: 18px;
	flex: 1 1 auto;
	max-height: 24px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--kd-ink);
	font: 400 13px/1 var(--kd-num);
	transition: transform 0.15s var(--kd-spring), color 0.15s ease;
}
.kd .kd-rail button.is-on {
	color: var(--kd-accent);
	transform: scale(1.35);
}
.kd .kd-rail button.is-empty {
	color: var(--kd-line-strong);
}
.kd-rail__bubble {
	position: fixed;
	z-index: 60;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border: 3px solid var(--kd-ink);
	border-radius: 18px 18px 4px 18px;
	background: var(--kd-ink);
	color: var(--kd-accent);
	font: 400 40px/1 var(--kd-num);
	box-shadow: 4px 4px 0 var(--kd-accent);
	pointer-events: none;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.15s ease, transform 0.2s var(--kd-spring);
}
.kd-rail__bubble.is-on {
	opacity: 1;
	transform: scale(1);
}
@media (max-width: 760px) {
	.kd-body.has-rail {
		grid-template-columns: minmax(0, 1fr) 22px;
		gap: 0 8px;
		margin-right: -8px;
	}
	.kd-rail {
		box-shadow: none;
		background: transparent;
	}
	.kd .kd-rail button {
		width: 22px;
		min-height: 14px;
		font-size: 11px;
	}
}

/* 見つからないとき */
.kd-empty {
	display: grid;
	justify-items: start;
	gap: 14px;
	margin-top: 16px;
	padding: 22px;
	border: 2px dashed var(--kd-line-strong);
	border-radius: 18px;
}
.kd-empty__term {
	max-width: 100%;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--kd-term);
	color: var(--kd-term-fg);
	font: 500 14px/1.7 var(--kd-mono);
	white-space: pre-wrap;
}
.kd-empty__term span {
	color: var(--kd-term-key);
}
.kd-empty__try {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.kd-empty__try b {
	font-size: 14px;
}
.kd .kd-empty__try a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 4px 14px;
	border: 2px solid var(--kd-ink);
	border-radius: 999px;
	background: var(--kd-surface);
	font-weight: 700;
	text-decoration: none;
}
.kd .kd-empty__try a.is-hint {
	font-family: var(--kd-mono);
	background: var(--kd-accent-soft);
}

.kd-pager {
	margin-top: 28px;
}
.kd.is-live .kd-pager {
	display: none;
}

/* 知らせ・紙ふぶき */
.kd-toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--kd-bottom, 0px) + 20px + env(safe-area-inset-bottom, 0px));
	z-index: 1000;
	max-width: calc(100vw - 32px);
	margin: 0;
	padding: 12px 20px;
	border-radius: 999px;
	background: var(--kd-ink);
	box-shadow: 0 12px 30px rgba(29, 24, 19, 0.24);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	opacity: 0;
	transform: translate(-50%, 24px) scale(0.96);
	transition: opacity 0.2s ease, transform 0.32s var(--kd-spring);
	pointer-events: none;
}
.kd-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0) scale(1);
}
.kd-toast b {
	color: var(--kd-term-key);
}
.kd-confetti {
	position: fixed;
	inset: 0;
	z-index: 1001;
	pointer-events: none;
	overflow: hidden;
}
.kd-confetti i {
	position: absolute;
	top: -12px;
	left: var(--x);
	width: 9px;
	height: 14px;
	border-radius: 2px;
	background: var(--c);
	animation: kd-fall var(--d) var(--w) cubic-bezier(0.3, 0.6, 0.5, 1) forwards;
}

/* ---------- のぞき見（パソコンは右から・スマホは下から） ---------- */

.kd-peek {
	--kd-ink: #1d1813;
	--kd-surface: #fff;
	--kd-muted: #6f6052;
	--kd-line: #e8e1d4;
	--kd-line-strong: #d8cebb;
	--kd-accent: #ff5b00;
	--kd-accent-soft: #ffedca;
	--kd-sub: #f8eddc;
	--kd-term: #1d1813;
	--kd-term-fg: #f1ede6;
	--kd-term-muted: rgba(241, 237, 230, 0.62);
	--kd-term-key: #ffb071;
	--kd-fair: #a65f00;
	--kd-fair-soft: #fbf1df;
	--kd-hard: #c0341d;
	--kd-hard-soft: #fcece9;
	--kd-mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, "DejaVu Sans Mono", "BIZ UDGothic", "Hiragino Sans", "Noto Sans JP", monospace;
	--kd-num: "Din1451Alt", "Bahnschrift", "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
	--kd-brandfont: var(--font-site-brand, "linuxPro-CPL"), "Hiragino Sans", "Noto Sans JP", sans-serif;
	--kd-spring: cubic-bezier(0.2, 1.5, 0.4, 1);
	--kd-out: cubic-bezier(0.2, 0.8, 0.2, 1);

	position: fixed;
	inset: 0 0 0 auto;
	z-index: 2147482000;
	display: none;
	flex-direction: column;
	width: min(480px, 100vw);
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	overflow: visible;
	border: 0;
	border-left: 3px solid var(--kd-ink);
	outline: none;
	background: var(--kd-surface);
	color: #2b2620;
	box-shadow: -14px 0 40px rgba(29, 24, 19, 0.2);
	font: 400 15px/1.75 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
	transform: translateX(calc(100% + 30px));
	transition: transform 0.42s cubic-bezier(0.22, 1.1, 0.36, 1);
}
.kd-peek[open] {
	display: flex;
}
.kd-peek.is-in {
	transform: translateX(var(--kd-drag-x, 0px));
}
.kd-peek.is-drag {
	transition: none;
}
.kd-peek::backdrop {
	background: rgba(29, 24, 19, 0.38);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.kd-peek.is-in::backdrop {
	opacity: 1;
}
html.kd-peek-open {
	overflow: hidden;
}
@media (max-width: 720px) {
	.kd-peek {
		inset: auto 0 0 0;
		width: 100vw;
		height: auto;
		max-height: 90dvh;
		border-left: 0;
		border-top: 3px solid var(--kd-ink);
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -14px 40px rgba(29, 24, 19, 0.24);
		transform: translateY(calc(100% + 30px));
	}
	.kd-peek.is-in {
		transform: translateY(var(--kd-drag, 0px));
	}
}
.kd-peek__grip {
	display: none;
}
@media (max-width: 720px) {
	.kd-peek__grip {
		display: grid;
		place-items: center;
		flex: none;
		height: 22px;
		touch-action: none;
		cursor: grab;
	}
	.kd-peek__grip i {
		width: 42px;
		height: 5px;
		border-radius: 999px;
		background: var(--kd-line-strong);
		transition: width 0.2s ease, background 0.2s ease;
	}
	.kd-peek.is-drag .kd-peek__grip i {
		width: 54px;
		background: var(--kd-accent);
	}
}
.kd-peek__bar {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px 10px 20px;
	border-bottom: 2px solid var(--kd-line);
	font-size: 12px;
	color: var(--kd-muted);
	touch-action: pan-y;
}
@media (max-width: 720px) {
	.kd-peek__bar {
		padding-top: 2px;
		touch-action: none;
	}
}
.kd-peek__no {
	padding: 1px 8px 0;
	border-radius: 6px;
	background: var(--kd-ink);
	color: var(--kd-accent);
	font: 400 15px/1.4 var(--kd-num);
	letter-spacing: 0.06em;
}
.kd-peek__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kd-peek__cat .kd-ico {
	width: 15px;
	height: 15px;
	color: var(--kd-c);
}
.kd-peek__pos {
	margin-left: auto;
	font: 400 14px/1 var(--kd-num);
	white-space: nowrap;
}
.kd-peek .kd-peek__x {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 2px solid var(--kd-ink);
	border-radius: 50%;
	background: var(--kd-surface);
	color: var(--kd-ink);
	transition: transform 0.18s var(--kd-spring), background 0.16s ease;
}
.kd-peek__x .kd-ico {
	width: 16px;
	height: 16px;
}
.kd-peek .kd-peek__x:active {
	transform: scale(0.9);
}
.kd-peek__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 22px 26px;
	-webkit-overflow-scrolling: touch;
}
.kd-peek__page {
	display: grid;
	gap: 18px;
}
.kd-peek__page.is-from-right {
	animation: kd-from-right 0.34s var(--kd-out);
}
.kd-peek__page.is-from-left {
	animation: kd-from-left 0.34s var(--kd-out);
}
.kd-peek__head {
	display: flex;
	align-items: center;
	gap: 16px;
}
.kd-peek__tile {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	font-size: 24px;
}
.kd-peek.is-in .kd-peek__tile {
	animation: kd-hello 0.8s 0.18s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}
.kd-peek__names {
	min-width: 0;
}
.kd-peek .kd-peek__name {
	font: 700 30px/1.2 var(--kd-brandfont);
	color: var(--kd-ink);
}
.kd-peek.is-command .kd-peek__name {
	font-family: var(--kd-mono);
	font-size: 30px;
}
.kd-peek__reading {
	font-size: 13px;
	color: var(--kd-muted);
}
.kd-peek__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	color: var(--kd-ink);
}
.kd-peek__desc {
	font-size: 16px;
	line-height: 1.85;
	color: #2b2620;
}
.kd-peek__easy {
	position: relative;
	padding: 12px 16px;
	border-radius: 14px;
	background: var(--kd-accent-soft);
	color: var(--kd-ink);
	font-weight: 700;
}
.kd-peek__easy::before {
	content: "ひとことで";
	display: block;
	margin-bottom: 2px;
	color: var(--kd-accent);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
}
.kd-peek__sec {
	display: grid;
	gap: 8px;
}
.kd-peek .kd-peek__sec h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--kd-ink);
}
.kd-peek .kd-peek__sec h3::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--kd-c, var(--kd-accent));
	transform: rotate(45deg);
}
.kd-peek__sec p {
	font-size: 14px;
	color: #2b2620;
}
.kd-peek__sec.is-warn {
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--kd-fair-soft);
}
.kd-peek__sec.is-warn.is-hard {
	background: var(--kd-hard-soft);
}
/* 端末の行（押すとコピー） */
.kd-term {
	display: grid;
	gap: 2px;
	padding: 8px;
	border-radius: 12px;
	background: var(--kd-term);
}
.kd-peek .kd-term__line {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 6px 8px 6px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--kd-term-fg);
	font: 500 14px/1.55 var(--kd-mono);
	text-align: left;
	transition: background 0.15s ease;
}
.kd-term__line code {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
	font: inherit;
	background: none;
	color: inherit;
	padding: 0;
}
.kd-term__line code::before {
	content: "$ ";
	color: var(--kd-term-key);
}
.kd-term__line.is-syntax code::before {
	content: none;
}
.kd-term__copy {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 6px;
	background: rgba(241, 237, 230, 0.1);
	color: var(--kd-term-muted);
	font: 700 11px/1.4 system-ui, sans-serif;
}
.kd-term__line.is-copied .kd-term__copy {
	background: var(--kd-accent);
	color: #fff;
}
.kd-peek .kd-term__line:hover {
	background: rgba(241, 237, 230, 0.08);
}
.kd-peek .kd-term__lab {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 2px 0 2px 12px;
	color: var(--kd-term-key);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}
.kd-peek__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.kd-peek .kd-peek__links a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 3px 12px;
	border: 2px solid var(--kd-ink);
	border-radius: 999px;
	background: var(--kd-surface);
	color: var(--kd-ink);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.kd-peek.is-glossary .kd-peek__links a {
	font-family: var(--kd-mono);
}
.kd-peek__skel {
	display: grid;
	gap: 10px;
}
.kd-peek__skel i {
	display: block;
	height: 16px;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--kd-sub) 0 40%, #fffaf1 50%, var(--kd-sub) 60% 100%) 0 0 / 300% 100%;
	animation: kd-shimmer 1.3s linear infinite;
}
.kd-peek__skel i:nth-child(2) {
	width: 80%;
}
.kd-peek__skel i:nth-child(3) {
	width: 60%;
}
.kd-peek__foot {
	flex: none;
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 2px solid var(--kd-line);
	background: var(--kd-surface);
}
.kd-peek .kd-peek__nav,
.kd-peek .kd-peek__save {
	display: grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 10px;
	border: 2px solid var(--kd-ink);
	border-radius: 12px;
	background: var(--kd-surface);
	color: var(--kd-ink);
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	transition: transform 0.18s var(--kd-spring), background 0.16s ease;
}
.kd-peek .kd-peek__nav:disabled {
	opacity: 0.3;
	cursor: default;
}
.kd-peek .kd-peek__save {
	display: inline-flex;
	gap: 6px;
	font-size: 14px;
}
.kd-peek .kd-peek__save[aria-pressed="true"] {
	background: var(--kd-ink);
	color: var(--kd-term-key);
}
.kd-peek__save.is-pop span {
	animation: kd-pop 0.45s var(--kd-spring);
}
.kd-peek .kd-peek__read {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 46px;
	padding: 0 16px;
	border: 3px solid var(--kd-ink);
	border-radius: 12px;
	background: var(--kd-accent);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 3px 3px 0 var(--kd-ink);
	transition: transform 0.18s var(--kd-spring), box-shadow 0.18s ease;
}
.kd-peek .kd-peek__read:active,
.kd-peek .kd-peek__nav:not(:disabled):active,
.kd-peek .kd-peek__save:active {
	transform: translate(2px, 2px);
	box-shadow: none;
}
@media (hover: hover) {
	.kd-peek .kd-peek__nav:not(:disabled):hover,
	.kd-peek .kd-peek__save:hover,
	.kd-peek .kd-peek__x:hover {
		background: var(--kd-sub);
	}
	.kd-peek .kd-peek__save[aria-pressed="true"]:hover {
		background: #3a2f25;
	}
	.kd-peek .kd-peek__read:hover {
		transform: translate(-1px, -1px);
		box-shadow: 4px 4px 0 var(--kd-ink);
	}
	.kd-peek .kd-peek__links a:hover {
		background: var(--kd-accent-soft);
	}
}
.kd-peek__marks {
	display: flex;
	gap: 6px;
}

/* ---------- 絵（CSS の mask。どれも currentColor） ---------- */

.kd-ico {
	display: inline-block;
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--kd-i) center / contain no-repeat;
	mask: var(--kd-i) center / contain no-repeat;
}
.kd-page,
.kd-peek {
	--kd-i-dice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='4.5' fill='none' stroke='black' stroke-width='2.2'/%3E%3Ccircle cx='8.2' cy='8.2' r='1.7'/%3E%3Ccircle cx='15.8' cy='8.2' r='1.7'/%3E%3Ccircle cx='12' cy='12' r='1.7'/%3E%3Ccircle cx='8.2' cy='15.8' r='1.7'/%3E%3Ccircle cx='15.8' cy='15.8' r='1.7'/%3E%3C/svg%3E");
	--kd-i-crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5z'/%3E%3C/svg%3E");
}
.kd-ico--folder { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3 6.5A1.5 1.5 0 0 1 4.5 5H9l2 2.5h8.5A1.5 1.5 0 0 1 21 9v9.5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5z'/%3E%3C/svg%3E"); }
.kd-ico--text { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 11h11M4 16h16M4 21h8'/%3E%3C/svg%3E"); }
.kd-ico--terminal { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4zM7.5 9.5l3 2.5-3 2.5M12.5 15h4'/%3E%3C/svg%3E"); }
.kd-ico--cpu { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Cpath d='M10 10h4v4h-4zM9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E"); }
.kd-ico--network { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='5' r='2.5'/%3E%3Ccircle cx='5' cy='18' r='2.5'/%3E%3Ccircle cx='19' cy='18' r='2.5'/%3E%3Cpath d='M11 7.2 6.2 15.8M13 7.2l4.8 8.6M7.5 18h9'/%3E%3C/svg%3E"); }
.kd-ico--disk { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cellipse cx='12' cy='6' rx='8' ry='3'/%3E%3Cpath d='M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'/%3E%3C/svg%3E"); }
.kd-ico--box { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3 7.5 12 3l9 4.5v9L12 21l-9-4.5zM3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E"); }
.kd-ico--key { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M11 12 20 3M17 6l2.5 2.5M14.5 8.5 17 11'/%3E%3C/svg%3E"); }
.kd-ico--user { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4.2-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
.kd-ico--package { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v13H4zM3 3h18v4H3zM10 11h4'/%3E%3C/svg%3E"); }
.kd-ico--power { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3v8M7 6.3a8 8 0 1 0 10 0'/%3E%3C/svg%3E"); }
.kd-ico--book { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a2 2 0 0 1 2 2v14H7a2 2 0 0 1-2-2V4zM5 18a2 2 0 0 1 2-2h11M9 8h5'/%3E%3C/svg%3E"); }
.kd-ico--pipe { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h7v8h11M17 12l4 4-4 4M3 4v8'/%3E%3C/svg%3E"); }
.kd-ico--shield { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6l7-3zM9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.kd-ico--boot { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c3-1 4-4 4-4l-2-2s-3 1-4 4zM9 15l6-6a8 8 0 0 1 6-6 8 8 0 0 1-6 6l-6 6M14 5l5 5'/%3E%3C/svg%3E"); }
.kd-ico--chip { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4' y='7' width='16' height='10' rx='1.5'/%3E%3Cpath d='M7 7V4M11 7V4M15 7V4M7 20v-3M11 20v-3M15 20v-3M17 20v-3M17 7V4'/%3E%3C/svg%3E"); }
.kd-ico--monitor { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5'/%3E%3Cpath d='M9 20h6M12 16v4'/%3E%3C/svg%3E"); }
.kd-ico--window { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M6.5 6.5h.01M9.5 6.5h.01'/%3E%3C/svg%3E"); }
.kd-ico--server { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='7' rx='1.5'/%3E%3Crect x='3' y='13' width='18' height='7' rx='1.5'/%3E%3Cpath d='M7 7.5h.01M7 16.5h.01M11 7.5h6M11 16.5h6'/%3E%3C/svg%3E"); }
.kd-ico--code { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5M13.5 4l-3 16'/%3E%3C/svg%3E"); }
.kd-ico--layers { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 5-9 5-9-5 9-5zM3 12.5l9 5 9-5M3 16.5l9 5 9-5'/%3E%3C/svg%3E"); }
.kd-ico--cloud { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.4 1.5A3.8 3.8 0 0 1 17.5 18z'/%3E%3C/svg%3E"); }
.kd-ico--pulse { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h4l3-7 4 14 3-7h6'/%3E%3C/svg%3E"); }
.kd-ico--doc { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6'/%3E%3C/svg%3E"); }
.kd-ico--close { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.kd-ico--play { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12-7.5z'/%3E%3C/svg%3E"); }

/* ---------- 動き ---------- */

@keyframes kd-pip {
	from { opacity: 0; transform: scale(0); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes kd-grow {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}
@keyframes kd-hello {
	0% { transform: rotate(0); }
	25% { transform: rotate(-9deg) translateY(-2px); }
	50% { transform: rotate(6deg); }
	75% { transform: rotate(-3deg); }
	100% { transform: rotate(0); }
}
@keyframes kd-stamp {
	0% { transform: rotate(-12deg) scale(2.4); opacity: 0; }
	60% { transform: rotate(-12deg) scale(0.88); opacity: 1; }
	100% { transform: rotate(-12deg) scale(1); }
}
@keyframes kd-bump {
	40% { transform: scale(1.35); }
}
@keyframes kd-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.6) rotate(-14deg); }
	100% { transform: scale(1); }
}
@keyframes kd-roll {
	0% { transform: rotate(0) scale(1); }
	50% { transform: rotate(220deg) scale(1.35); }
	100% { transform: rotate(360deg) scale(1); }
}
@keyframes kd-caret {
	50% { opacity: 0; }
}
@keyframes kd-shimmer {
	to { background-position: -150% 0; }
}
@keyframes kd-from-right {
	from { opacity: 0; transform: translateX(40px); }
}
@keyframes kd-from-left {
	from { opacity: 0; transform: translateX(-40px); }
}
@keyframes kd-in {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
}
@keyframes kd-fall {
	0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; }
	100% { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--r)); opacity: 0.9; }
}
.kd-card.is-in {
	animation: kd-in 0.4s var(--kd-out) both;
	animation-delay: calc(var(--k, 0) * 28ms);
}

/* ---------- スマホ: 探す欄を最初の画面に ----------
 * 題のすぐ下に探す欄（と目的・レベルの札）。「あなたの辞典」・遊ぶ入口・今日の1つは、その下へ。
 * 打って探している間（.is-q）は、それらを畳んで、結果を探す欄のすぐ下に出す。
 * 中身の並び（HTML）は変えない＝読み上げとパソコンはそのまま。.kd-find は前から display: contents。 */
@media (max-width: 760px) {
	.kd {
		display: flex;
		flex-direction: column;
	}
	.kd > *,
	.kd-hero > *,
	.kd-find > * {
		order: 20;
	}
	.kd-hero {
		display: contents;
	}
	.kd > .kd-crumbs {
		order: 1;
	}
	.kd-hero__main {
		order: 2;
	}
	.kd-bar {
		order: 3;
		margin-top: 18px;
	}
	.kd-chips {
		order: 4;
	}
	.kd-levels {
		order: 5;
	}
	.kd-mine {
		order: 6;
		margin-top: 22px;
	}
	.kd-play {
		order: 7;
	}
	.kd-today {
		order: 8;
	}
	.kd.is-q .kd-mine,
	.kd.is-q .kd-play,
	.kd.is-q .kd-today {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kd-page *,
	.kd-page *::before,
	.kd-page *::after,
	.kd-peek,
	.kd-peek *,
	.kd-peek::backdrop {
		animation: none !important;
		transition: none !important;
	}
}
html.gp-reduce .kd-page *,
html.gp-reduce .kd-page *::before,
html.gp-reduce .kd-page *::after,
html.gp-reduce .kd-peek,
html.gp-reduce .kd-peek *,
html.gp-reduce .kd-peek::backdrop {
	animation: none !important;
	transition: none !important;
}

/* ---------- やりたいこと・エラーで見つかったもの（一覧の上・1.55.0） ---------- */
.kd-tasks {
	margin-top: 18px;
	padding: 14px 16px;
	border: 2px solid var(--kd-ink);
	border-radius: 16px;
	background: var(--kd-surface);
	box-shadow: 4px 4px 0 var(--kd-accent);
	animation: kd-tasks-in 0.36s var(--kd-out) both;
}
.kd-tasks__head {
	margin: 0 0 8px;
	color: var(--kd-muted);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
}
.kd-tasks__list {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.kd-tasks__list li {
	animation: kd-tasks-in 0.32s var(--kd-out) both;
	animation-delay: calc(var(--k, 0) * 40ms);
}
.kd .kd-task {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 12px;
	padding: 8px 10px;
	border-radius: 10px;
	color: var(--kd-ink);
	text-decoration: none;
	transition: background 0.14s ease;
}
.kd-task__kind {
	grid-row: span 2;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--kd-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
}
.kd-task.is-e .kd-task__kind {
	background: var(--kd-hard);
}
.kd-task__t {
	font-size: 14px;
	font-weight: 800;
	line-height: 1.5;
}
.kd-task__c {
	grid-column: 2;
	justify-self: start;
	max-width: 100%;
	overflow: hidden;
	padding: 1px 8px;
	border-radius: 6px;
	background: var(--kd-term);
	color: var(--kd-term-fg);
	font: 500 12px/1.6 var(--kd-mono);
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kd-task__z {
	grid-column: 2;
	color: var(--kd-muted);
	font-size: 12px;
}
.kd-task__in {
	grid-column: 3;
	grid-row: 1 / span 2;
	color: var(--kd-muted);
	font: 700 13px/1 var(--kd-mono);
}
@media (hover: hover) {
	.kd .kd-task:hover {
		background: var(--kd-sub);
	}
}
@keyframes kd-tasks-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* 一覧の広告（N 件ごと・カードと同じ並びの中で横いっぱい） */
.kd-ad {
	grid-column: 1 / -1;
	min-height: 110px;
}
.kd-ad__in__label {
	margin: 0 0 6px;
	color: var(--kd-muted);
	font: 700 11px/1 var(--kd-num);
	letter-spacing: 0.14em;
}
.kd-ad__in__body {
	display: grid;
	place-items: center;
	min-height: 96px;
	padding: 8px;
	border: 1px dashed var(--kd-line-strong);
	border-radius: 12px;
	background: var(--kd-surface);
	overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
	.kd-tasks,
	.kd-tasks__list li {
		animation: none !important;
	}
}

/* 探す（虫めがね） */
.kd-ico--search { --kd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM20 20l-4.2-4.2'/%3E%3C/svg%3E"); }
/* やりたいこと・エラーで見つかったときは、「見つかりませんでした」を出さない（カードが 0 件でも答えはある） */
.kd-tasks:not([hidden]) ~ [data-kd-empty] {
	display: none;
}

/* 遊ぶの札: 覚える順番（路線図）とことばの星図 */
.kd .kd-play__card.is-route {
	box-shadow: 5px 5px 0 var(--route, #2f7fd1);
}
.kd-play__line {
	grid-column: 1;
	position: relative;
	height: 12px;
	margin-top: 6px;
	background:
		radial-gradient(circle at center, var(--kd-surface) 0 3px, var(--route, #2f7fd1) 3.5px 5px, transparent 5.5px) 0 50% / 22px 12px repeat-x,
		linear-gradient(var(--route, #2f7fd1), var(--route, #2f7fd1)) 0 50% / 100% 4px no-repeat;
	-webkit-mask-image: linear-gradient(90deg, #000 70%, transparent);
	mask-image: linear-gradient(90deg, #000 70%, transparent);
}
.kd .kd-play__card.is-night {
	overflow: hidden;
	background:
		radial-gradient(1.2px 1.2px at 18% 30%, #fff, transparent),
		radial-gradient(1px 1px at 42% 72%, rgba(255, 255, 255, 0.8), transparent),
		radial-gradient(1.4px 1.4px at 66% 22%, #ffe7a8, transparent),
		radial-gradient(1px 1px at 84% 64%, rgba(255, 255, 255, 0.7), transparent),
		radial-gradient(1px 1px at 30% 86%, rgba(255, 255, 255, 0.6), transparent),
		radial-gradient(120% 140% at 20% 0%, #23306e, #070b1d 70%);
	color: #e8eeff;
	box-shadow: 5px 5px 0 #ffd166;
}
.kd .kd-play__card.is-night .kd-play__kicker {
	color: #ffd166;
}
/* 星が 1 つだけ、ゆっくり瞬く */
.kd .kd-play__card.is-night::after {
	content: "";
	position: absolute;
	top: 26%;
	right: 22%;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 6px 2px rgba(143, 189, 240, 0.8);
	animation: kd-twinkle 3.2s ease-in-out infinite;
}
@keyframes kd-twinkle {
	50% {
		opacity: 0.35;
		transform: scale(0.6);
	}
}
@media (prefers-reduced-motion: reduce) {
	.kd .kd-play__card.is-night::after {
		animation: none;
	}
}
.gp-reduce .kd .kd-play__card.is-night::after {
	animation: none;
}
