/* ============================================================
   資料（/docs）
   ============================================================ */

.docs-index,
.docs-detail {
	--docs-text: #1f2a24;
	--docs-muted: #5f6f66;
	--docs-card: #ffffff;
	--docs-border: rgba(0, 0, 0, 0.12);
	--docs-accent: #2e7d32;
	--docs-accent-soft: rgba(46, 125, 50, 0.1);
	--docs-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	color: var(--docs-text);
}

.docs-index { margin-bottom: 30px; }

/* ---------- 検索・並び替え・タグ ---------- */

.docs-search {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
}

.docs-search-input {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.docs-search-input i {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--docs-muted);
	pointer-events: none;
}

.docs-search-input input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px 11px 38px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	background: var(--docs-card);
	color: inherit;
	font-family: inherit;
	font-size: 14px;
}

.docs-search-input input:focus { outline: 2px solid var(--docs-accent); outline-offset: -2px; }

.docs-search .btn { flex: 0 0 auto; }

.docs-sort {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--docs-muted);
}

.docs-sort-item {
	padding: 3px 12px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	color: inherit;
	text-decoration: none;
}

.docs-sort-item.is-active {
	background: var(--docs-accent-soft);
	border-color: var(--docs-accent);
	color: var(--docs-accent);
	font-weight: 700;
}

.docs-result { margin: 0 0 8px; font-size: 13px; color: var(--docs-muted); }

.docs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
}

.docs-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	border-radius: 15px;
	background: var(--docs-accent-soft);
	color: var(--docs-accent);
	font-size: 12px;
	text-decoration: none;
}

.docs-tag small { opacity: .65; }
.docs-tag.is-active { background: var(--docs-accent); color: #fff; }
.docs-tag:hover { text-decoration: none; filter: brightness(1.08); }

.docs-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 12px;
	border-radius: 15px;
	font-size: 12px;
	font-weight: 700;
}

.docs-badge-draft { background: rgba(255, 152, 0, .18); color: #b26a00; }

/* ---------- 一覧カード ---------- */

.docs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.docs-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	background: var(--docs-card);
	box-shadow: var(--docs-shadow);
}

.docs-card-thumb {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--docs-accent-soft);
}

.docs-card-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.docs-card-noimg {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 28px;
	color: var(--docs-accent);
	opacity: .55;
}

.docs-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }

.docs-card-title { margin: 0; font-size: 16px; line-height: 1.45; }

.docs-card-title a { color: inherit; text-decoration: none; }

.docs-card-excerpt {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--docs-muted);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.docs-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.docs-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: auto;
	font-size: 12px;
	color: var(--docs-muted);
}

.docs-card-like.is-liked { color: #e05a7a; }

.docs-empty { padding: 40px 0; text-align: center; color: var(--docs-muted); }

/* ---------- ページ送り ---------- */

.docs-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 24px;
}

.docs-page {
	min-width: 38px;
	padding: 7px 12px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	color: inherit;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
}

.docs-page.is-active {
	background: var(--docs-accent);
	border-color: var(--docs-accent);
	color: #fff;
	font-weight: 700;
}

/* ---------- 個別 ---------- */

.docs-detail { max-width: 1000px; margin-left: auto; margin-right: auto; }

.docs-breadcrumb { margin: 0 0 12px; font-size: 13px; }

.docs-draft-note {
	padding: 10px 14px;
	border: 1px solid rgba(255, 152, 0, .4);
	border-radius: 15px;
	background: rgba(255, 152, 0, .12);
	color: #b26a00;
	font-size: 13px;
}

.docs-detail-head { margin-bottom: 18px; }

.docs-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.docs-detail-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 13px;
	color: var(--docs-muted);
}

.docs-body { font-size: 15px; line-height: 1.95; }

.docs-body h1 { margin: 0 0 .8em; font-size: 22px; }

.docs-body h2 {
	margin: 2em 0 .8em;
	padding-bottom: .35em;
	border-bottom: 2px solid var(--docs-accent-soft);
	font-size: 22px;
}

.docs-body h3 { margin: 1.7em 0 .6em; font-size: 18px; }
.docs-body h4 { margin: 1.4em 0 .5em; font-size: 16px; }
.docs-body p { margin: .8em 0; }
.docs-body ul, .docs-body ol { padding-left: 1.6em; }
.docs-body li { margin: .35em 0; }

.docs-body a { color: var(--docs-accent); }

.docs-body blockquote {
	margin: 1em 0;
	padding: 8px 16px;
	border-left: 4px solid var(--docs-accent);
	border-radius: 0 15px 15px 0;
	background: var(--docs-accent-soft);
}

.docs-body code {
	padding: 2px 6px;
	border-radius: 15px;
	background: var(--docs-accent-soft);
	font-family: "IBM Plex Mono", Consolas, "Courier New", monospace;
	font-size: .88em;
}

.docs-body pre {
	overflow: auto;
	padding: 14px 16px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	background: var(--docs-accent-soft);
}

.docs-body pre code { padding: 0; background: none; }

.docs-body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--docs-border); }

/* 世代別の写真など（元ページで height=150 だったもの）が等倍で出ないようにする */
.docs-body img[data-img="click-large"] {
	max-height: 150px;
	width: auto;
	height: auto;
	vertical-align: middle;
}

.docs-body .table-container { overflow-x: auto; margin: 1em 0; }

.docs-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.docs-body th, .docs-body td {
	padding: 8px 10px;
	border: 1px solid var(--docs-border);
	vertical-align: top;
	text-align: left;
}

.docs-body th { background: var(--docs-accent-soft); white-space: nowrap; }

.docs-body .text-red { color: #e34234; }
.docs-body .text-orange { color: #e08a00; }
.docs-body .text-green { color: #2e7d32; }
.docs-body .text-cyan { color: #0097a7; }
.docs-body .text-blue { color: #1565c0; }
.docs-body .text-gray { color: #777; }
.docs-body .text-purple { color: #7b1fa2; }
.docs-body .text-bold { font-weight: 700; }
.docs-body .text-center { text-align: center; }
.docs-body .text-right { text-align: right; }
.docs-body .text-small { font-size: .85em; }

/* ---------- いいね ---------- */

.docs-detail-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid var(--docs-border);
}

.docs-like-form { display: inline; margin: 0; }

.docs-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	background: var(--docs-card);
	color: inherit;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}

.docs-like-btn i { color: #e05a7a; }
.docs-like-btn.is-liked { border-color: #e05a7a; background: rgba(224, 90, 122, .12); font-weight: 700; }
.docs-like-btn.is-disabled { opacity: .6; cursor: default; }
.docs-like-btn small { font-size: 11px; color: var(--docs-muted); }

.docs-edit-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border: 1px solid var(--docs-border);
	border-radius: 15px;
	color: inherit;
	font-size: 14px;
	text-decoration: none;
}

/* ---------- スマホ ---------- */

@media (max-width: 640px) {
	.docs-search { flex-wrap: wrap; }
	.docs-search .btn { width: 100%; }
	.docs-cards { grid-template-columns: 1fr; }
	.docs-body { font-size: 14px; }
	.docs-body h2 { font-size: 19px; }
	.docs-body h3 { font-size: 16.5px; }
}

/* ---------- 一覧カードの編集者アバター ---------- */

.docs-card-editors .edit-avatars { margin-left: 6px; }
.docs-card-editors .edit-avatar { border-color: var(--docs-card); }
.docs-card-editors .edit-avatar img { width: 22px; height: 22px; }
