/*
Theme Name: Craftline
Description: 简洁的 Minecraft 中文资源社区主题，配合「MC 资源同步」插件使用。
Version: 0.4.0
Requires at least: 6.4
Requires PHP: 8.0
Author: mcmod
Text Domain: craftline
*/

/* ---------- 颜色与基础变量 ---------- */
:root {
	--bg: #f4f6f1;
	--surface: #ffffff;
	--surface-2: #eceee7;
	--ink: #1b2017;
	--muted: #5d6657;
	--line: #dfe3d8;
	--grass: #4c9a2a;
	--grass-hover: #428a23;
	--grass-soft: #e5f2dc;
	--grass-ink: #ffffff;
	--dirt: #8b5a3c;
	--dirt-dark: #6b4329;
	--gold: #d9961a;
	--radius: 10px;
	--radius-sm: 6px;
	--shadow: 0 1px 2px rgba(25, 35, 15, .05), 0 6px 20px rgba(25, 35, 15, .05);
	--max: 1200px;
	--font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #131611;
		--surface: #1b1f18;
		--surface-2: #23281f;
		--ink: #e7ebe2;
		--muted: #9aa392;
		--line: #2e3529;
		--grass: #5fb437;
		--grass-hover: #6cc244;
		--grass-soft: #22331a;
		--grass-ink: #0f1a09;
		--dirt: #a06c4a;
		--dirt-dark: #7d5236;
		--gold: #eab04a;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 15px/1.7 var(--font);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
button, input, select { font: inherit; color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- 按钮：方块按压感 ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45em;
	padding: .62em 1.15em;
	border: 0; border-radius: var(--radius-sm);
	background: var(--surface-2); color: var(--ink);
	font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14);
	transition: background .15s, transform .05s;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .14); }
.btn-primary { background: var(--grass); color: var(--grass-ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22); }
.btn-primary:hover { background: var(--grass-hover); }
.btn-lg { padding: .85em 1.5em; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- 顶栏 ---------- */
.site-header { background: var(--surface); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.brand svg, .brand img { width: 30px; height: 30px; }
.brand .custom-logo { width: auto; height: 34px; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--ink); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-search { position: relative; }
.header-search input {
	width: 220px; height: 38px; padding: 0 12px 0 34px;
	border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
}
.header-search input:focus { outline: 2px solid var(--grass); outline-offset: -1px; }
.header-search svg { position: absolute; left: 10px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

/* 顶栏下方的草方块边：一条草 + 一条泥土 */
.grass-strip {
	height: 8px;
	background:
		repeating-linear-gradient(90deg, #5fae35 0 8px, #4c9a2a 8px 16px, #6bbb40 16px 24px, #47922a 24px 32px) top / 100% 4px no-repeat,
		repeating-linear-gradient(90deg, #8b5a3c 0 8px, #7a4e33 8px 16px, #946244 16px 24px, #6b4329 24px 32px) bottom / 100% 4px no-repeat;
}

/* 资源类型多，导航放不下时（1180px 以下）收进菜单按钮 */
.main-nav a { padding: 8px 10px; }
@media (max-width: 1180px) {
	.site-header .container { gap: 12px; }
	.nav-toggle { display: block; order: 3; }
	.main-nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); display: none; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
	.header-actions { margin-left: auto; }
	.header-actions .btn { padding: .55em .9em; font-size: 14px; }
}
@media (max-width: 760px) {
	.header-search { display: none; }
}

/* ---------- 首页大标题区 ---------- */
.hero {
	background:
		linear-gradient(var(--surface) 0 0) padding-box;
	border-bottom: 1px solid var(--line);
	position: relative; overflow: hidden;
}
.hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: radial-gradient(ellipse at 70% 40%, #000 0, transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0, transparent 70%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.hero h1 { text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--grass); white-space: nowrap; }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search input {
	flex: 1; min-width: 0; height: 50px; padding: 0 16px;
	border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: 16px;
}
.hero-search input:focus { outline: none; border-color: var(--grass); }
.hero-search .btn { height: 50px; }
.hero-search select {
	height: 50px; padding: 0 10px; border: 2px solid var(--line); border-radius: var(--radius-sm);
	background: var(--bg); color: var(--ink); font-size: 15px;
}
@media (max-width: 480px) { .hero-search { flex-wrap: wrap; } .hero-search select { width: 100%; } }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; color: var(--muted); font-size: 13px; }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; }
.hero-stats strong { display: block; font-size: 24px; font-weight: 800; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(280px, 100%); height: auto; filter: drop-shadow(0 20px 30px rgba(40, 60, 20, .18)); }
@media (max-width: 860px) {
	.hero .container { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
	.hero-art { display: none; }
}

/* ---------- 区块 ---------- */
.section { padding: 44px 0 8px; }
.section:last-of-type { padding-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 10px; height: 10px; background: var(--grass); box-shadow: 3px 3px 0 var(--dirt); }
.section-head a { color: var(--grass); font-weight: 600; font-size: 14px; }

/* ---------- 小标签 ---------- */
.chip {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 2px 8px; border-radius: 4px;
	background: var(--surface-2); color: var(--muted);
	font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
}
a.chip:hover { color: var(--ink); background: var(--line); }
.chip.is-active { background: var(--grass); color: var(--grass-ink); }
.chip-loader::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.chip-forge { color: #b65f2a; background: rgba(214, 120, 60, .12); }
.chip-neoforge { color: #c4691c; background: rgba(240, 140, 50, .14); }
.chip-fabric { color: #8a7350; background: rgba(190, 160, 110, .18); }
.chip-quilt { color: #7c55b5; background: rgba(140, 90, 210, .13); }
@media (prefers-color-scheme: dark) {
	.chip-forge { color: #ea9a66; }
	.chip-neoforge { color: #f3a65c; }
	.chip-fabric { color: #d6bf93; }
	.chip-quilt { color: #b896ea; }
}
.chip-source { background: transparent; border: 1px solid var(--line); }

/* ---------- 整合包卡片 ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pack-card {
	display: grid; grid-template-columns: 64px 1fr; gap: 14px;
	padding: 16px; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius);
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.pack-card:hover { border-color: var(--grass); transform: translateY(-2px); box-shadow: var(--shadow); }
.pack-icon { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: block; }
.pack-icon.is-empty { display: grid; place-items: center; color: var(--muted); }
.pack-icon.is-empty svg { width: 34px; height: 34px; }
.pack-card-body { min-width: 0; }
.pack-card h3 { font-size: 16px; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-card .by { font-size: 12px; color: var(--muted); }
.pack-card .summary {
	font-size: 13.5px; color: var(--muted); margin: 6px 0 10px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em;
}
.pack-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pack-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pack-stats span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pack-stats svg { width: 13px; height: 13px; }

/* ---------- 类型方块 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.type-tile {
	display: flex; justify-content: space-between; align-items: center;
	padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	font-weight: 600; transition: border-color .15s;
	box-shadow: inset 0 -3px 0 var(--surface-2);
}
.type-tile:hover { border-color: var(--grass); }
.type-tile span { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ---------- 开服引导条 ---------- */
.cta-band {
	margin: 48px 0 0; padding: 36px; border-radius: var(--radius);
	background: linear-gradient(135deg, #2f5f1a, #4c9a2a);
	color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px;
	position: relative; overflow: hidden;
}
.cta-band::after {
	content: ""; position: absolute; right: -20px; bottom: -20px; width: 180px; height: 180px; opacity: .12;
	background:
		linear-gradient(#fff 0 0) 0 0 / 40px 40px no-repeat,
		linear-gradient(#fff 0 0) 60px 60px / 40px 40px no-repeat,
		linear-gradient(#fff 0 0) 120px 0 / 40px 40px no-repeat,
		linear-gradient(#fff 0 0) 0 120px / 40px 40px no-repeat,
		linear-gradient(#fff 0 0) 120px 120px / 40px 40px no-repeat;
}
.cta-band h2 { font-size: 24px; margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .85; }
.cta-band .btn { background: #fff; color: #2f5f1a; position: relative; z-index: 1; }
.cta-band .btn:hover { background: #f0f5ec; }
@media (max-width: 700px) { .cta-band { flex-direction: column; align-items: flex-start; padding: 26px; } }

/* ---------- 列表页 ---------- */
.page-head { padding: 32px 0 18px; }
.page-head h1 { font-size: 28px; margin: 0 0 4px; }
.page-head p { color: var(--muted); margin: 0; }
.filters {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
	padding: 14px; margin-bottom: 18px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters input[type=search] {
	flex: 1 1 220px; height: 40px; padding: 0 12px; min-width: 0;
	border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
}
.filters select {
	height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%238a9384'/%3E%3C/svg%3E") no-repeat right 12px center;
	appearance: none; -webkit-appearance: none; cursor: pointer;
}
.filters input:focus, .filters select:focus { outline: 2px solid var(--grass); outline-offset: -1px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.active-filters a::after { content: "×"; margin-left: 4px; opacity: .7; }
@media (max-width: 600px) { .filters select { flex: 1 1 40%; } }

.empty {
	text-align: center; padding: 60px 20px; color: var(--muted);
	background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty svg { width: 56px; height: 56px; margin-bottom: 10px; opacity: .8; }

.pagination { margin: 28px 0 56px; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
}
.pagination .page-numbers.current { background: var(--grass); border-color: var(--grass); color: var(--grass-ink); }
.pagination a.page-numbers:hover { border-color: var(--grass); }

/* ---------- 整合包详情页 ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.breadcrumb a:hover { color: var(--grass); }
.pack-head {
	display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start;
	padding: 18px 0 24px;
}
.pack-head .pack-icon { width: 96px; height: 96px; border-radius: 14px; }
.pack-head h1 { font-size: 30px; margin: 0 0 4px; word-break: break-word; }
.pack-head .by { color: var(--muted); margin-bottom: 10px; font-size: 14px; }
.pack-head .summary { font-size: 16px; margin: 0 0 12px; }
@media (max-width: 600px) {
	.pack-head { grid-template-columns: 64px 1fr; gap: 14px; }
	.pack-head .pack-icon { width: 64px; height: 64px; border-radius: 10px; }
	.pack-head h1 { font-size: 22px; }
}

.pack-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 56px; }
@media (max-width: 960px) { .pack-layout { grid-template-columns: 1fr; } .pack-aside { order: -1; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 17px; margin: 0 0 12px; }

.pack-aside { position: sticky; top: 88px; }
@media (max-width: 960px) { .pack-aside { position: static; } }
.server-card { border-color: var(--grass); background: linear-gradient(var(--grass-soft), var(--surface) 70%); }
.server-card .ram { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.server-card .ram strong { font-size: 28px; font-weight: 800; }
.server-card .ram span { color: var(--muted); font-size: 13px; }
.server-card .verified { margin: -6px 0 12px; font-size: 13px; font-weight: 700; color: var(--grass); }
.server-card .verified span { font-weight: 400; color: var(--muted); }
.server-card .note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.server-card .btn + .btn { margin-top: 8px; }

.info-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.info-list li:first-child { border-top: 0; padding-top: 0; }
.info-list li > span:first-child { color: var(--muted); flex: none; }
.info-list li > span:last-child { text-align: right; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery a { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }

.mt-notice { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 16px; }

dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(10, 14, 8, .85); }
dialog.lightbox img { display: block; max-width: 94vw; max-height: 92vh; border-radius: var(--radius-sm); }

/* ---------- 正文排版 ---------- */
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .6em; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 21px; }
.prose h3 { font-size: 18px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose a { color: var(--grass); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); }
.prose blockquote { border-left: 4px solid var(--grass); padding: 4px 0 4px 16px; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: var(--radius-sm); overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose iframe { max-width: 100%; }

/* ---------- 普通文章 / 页面 ---------- */
.article { max-width: 780px; margin: 0 auto; padding: 36px 0 56px; }
.article h1 { font-size: 30px; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.post-list { display: grid; gap: 14px; padding-bottom: 56px; }
.post-item { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-item:hover { border-color: var(--grass); }
.post-item h2 { font-size: 18px; margin: 0 0 6px; }
.post-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 36px 0 28px; color: var(--muted); font-size: 13px; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer h3 { font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a:hover { color: var(--grass); }
.site-footer .brand { color: var(--ink); margin-bottom: 10px; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
@media (max-width: 700px) { .site-footer .container { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ---------- 资源类型 ---------- */
.chip-type { background: var(--grass-soft); color: var(--grass); font-weight: 600; }
.chip-iris { color: #4b73c9; background: rgba(80, 120, 220, .12); }
.chip-optifine { color: #b0442f; background: rgba(200, 70, 50, .12); }
.chip-paper, .chip-spigot, .chip-bukkit, .chip-folia, .chip-purpur { color: #5f7f8a; background: rgba(90, 130, 150, .13); }

.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.kind-tile {
	display: grid; justify-items: start; gap: 2px; padding: 16px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: inset 0 -3px 0 var(--surface-2); transition: border-color .15s, transform .15s;
}
.kind-tile:hover { border-color: var(--grass); transform: translateY(-2px); }
.kind-tile svg { width: 26px; height: 26px; color: var(--grass); margin-bottom: 8px; }
.kind-tile strong { font-size: 16px; }
.kind-tile span { font-size: 12px; color: var(--muted); }
.kind-translate svg { color: var(--gold); }

.type-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.type-tabs a { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.type-tabs a:hover { color: var(--ink); }
.type-tabs a.is-active { background: var(--grass); border-color: var(--grass); color: var(--grass-ink); font-weight: 600; }
.type-tabs small { opacity: .7; }

/* ---------- 作者与团队 ---------- */
.avatar { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar.is-letter {
	display: inline-grid; place-items: center; font-weight: 800; color: #fff;
	background: hsl(var(--h) 45% 45%); font-size: .9em;
}
.team-panel h2 { margin-bottom: 12px; }
.team-org { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px 8px; border-radius: var(--radius-sm); }
.team-org:hover, .team-list a:hover { background: var(--surface-2); }
.team-org span, .team-list span { display: grid; min-width: 0; }
.team-org small, .team-list small { color: var(--muted); font-size: 12px; }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.team-list a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; margin: 0 -10px; border-radius: var(--radius-sm); font-size: 14px; }
.team-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; }
.team-list.is-grid a { margin: 0; }
.server-card.is-plain { border-color: var(--line); background: var(--surface); }

.creator-head { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; padding: 32px 0 24px; }
.creator-head .avatar { width: 96px; height: 96px; border-radius: 16px; font-size: 40px; }
.creator-head h1 { font-size: 28px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.creator-head .bio { color: var(--muted); margin: 0 0 10px; max-width: 46em; }
.creator-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.creator-stats strong { color: var(--ink); }
@media (max-width: 600px) {
	.creator-head { grid-template-columns: 64px 1fr; gap: 14px; }
	.creator-head .avatar { width: 64px; height: 64px; font-size: 26px; }
	.creator-head h1 { font-size: 22px; }
}
.more-works { margin-top: 28px; }
.more-works .pack-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- AI 翻译 ---------- */
.translate-head h1 { margin-top: 10px; }
.translate-box {
	display: grid; justify-items: center; gap: 6px; text-align: center;
	padding: 44px 20px; border: 2px dashed var(--line); border-radius: var(--radius);
	background: var(--surface); color: var(--muted);
}
.translate-box.is-off { cursor: default; }
.translate-box svg { width: 40px; height: 40px; color: var(--gold); }
.translate-box strong { color: var(--ink); font-size: 17px; }
.translate-box .btn { margin-top: 10px; }
.translate-box[data-drop] { cursor: pointer; transition: border-color .15s, background .15s; }
.translate-box[data-drop]:hover, .translate-box.is-over { border-color: var(--grass); background: var(--grass-soft); }
.translate-options { margin-top: 14px; }
.translate-options summary { cursor: pointer; font-weight: 600; }
.translate-options[open] summary { margin-bottom: 12px; }
.translate-quota { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.translate-quota strong { color: var(--ink); }
.translate-jobs { margin-top: 20px; }
.translate-jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.translate-jobs-head h2 { font-size: 18px; margin: 0; }
.translate-jobs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.translate-job { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.job-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.job-main strong { overflow-wrap: anywhere; min-width: 0; }
.job-status { color: var(--muted); }
.translate-job.is-done .job-status { color: var(--grass); }
.translate-job.is-partial .job-status { color: var(--gold); }
.translate-job.is-error .job-status { color: #c0392b; }
.job-bar { height: 6px; margin-top: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.job-bar i { display: block; height: 100%; width: 0; background: var(--grass); transition: width .3s; }
.translate-job.is-error .job-bar { display: none; }
.job-actions:not(:empty) { margin-top: 10px; }
.job-actions .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.feature-grid .panel + .panel { margin-top: 0; }
.feature svg { width: 26px; height: 26px; color: var(--grass); }
.feature h3 { font-size: 16px; margin: 10px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 表单（登录、注册、投稿、账号） ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: 14px; }
.field small, .muted { color: var(--muted); font-size: 12px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--bg); color: var(--ink); font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--grass); outline-offset: -1px; }
.field textarea { resize: vertical; line-height: 1.6; }
.check { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 14px; margin: 0 14px 8px 0; font-weight: 400; }
.check input { margin-top: 4px; accent-color: var(--grass); }
.checks { display: flex; flex-wrap: wrap; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-img { border-radius: var(--radius-sm); cursor: pointer; flex: none; background: #eef2e8; }
.code-msg.is-ok { color: var(--grass); }
.code-msg.is-error { color: #c0392b; }
.form-notice, .form-error { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.form-notice { background: var(--grass-soft); color: var(--ink); border-left: 4px solid var(--grass); }
.form-error { background: rgba(192, 57, 43, .1); color: #c0392b; border-left: 4px solid #c0392b; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid > .span-2:last-child .btn + .btn { margin-left: 8px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

.auth-card { max-width: 420px; margin: 40px auto 56px; padding: 28px; }
.auth-card > svg { display: block; margin-bottom: 8px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-links { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.auth-links a { color: var(--grass); }

/* 顶栏账号 */
.header-link { color: var(--muted); font-weight: 500; padding: 8px 6px; white-space: nowrap; }
.header-link:hover { color: var(--ink); }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; display: flex; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary img { width: 34px; height: 34px; border-radius: 8px; }
.account-dropdown {
	position: absolute; right: 0; top: 44px; min-width: 160px; z-index: 60;
	display: grid; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.account-dropdown strong { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-dropdown a { padding: 7px 10px; border-radius: var(--radius-sm); font-size: 14px; }
.account-dropdown a:hover { background: var(--surface-2); }
@media (max-width: 760px) { .header-link { padding: 8px 2px; font-size: 14px; } }

/* 我的账号 / 投稿 */
.account-page .panel { margin-bottom: 18px; }
.my-list { list-style: none; margin: 0; padding: 0; }
.my-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.my-list li:first-child { border-top: 0; }
.my-list strong { flex: 1; min-width: 160px; }
.my-list .actions { display: flex; gap: 12px; font-size: 14px; }
.my-list .actions a { color: var(--grass); }
.my-list .reject { flex-basis: 100%; margin: 0; font-size: 13px; color: #c0392b; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.status-publish { background: var(--grass-soft); color: var(--grass); }
.status-draft { background: rgba(192, 57, 43, .1); color: #c0392b; }
.chip-community { background: rgba(234, 176, 74, .16); color: #a8741c; font-weight: 600; }
.shot-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.shot-list label { display: grid; gap: 4px; width: 140px; }
.shot-list img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }

/* 中文名 + 英文原名 */
.pack-card h3 .en { font-size: 12px; font-weight: 500; color: var(--muted); }
.pack-head .en-title { color: var(--muted); font-size: 15px; margin: -2px 0 6px; }

/* 举报 */
.report-box summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.report-box[open] summary { margin-bottom: 12px; color: var(--ink); font-weight: 600; }
.report-box .check { display: flex; margin-right: 0; }

/* 收藏、消息、认领 */
.fav-form { margin-top: 12px; }
.fav-form .btn svg { width: 16px; height: 16px; }
.fav-form .btn.is-on { background: rgba(214, 70, 90, .12); color: #d6465a; }
.fav-form .btn.is-on svg { fill: currentColor; }
.account-menu summary { position: relative; }
.account-menu .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; border: 2px solid var(--surface); }
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.msg-list li:first-child { border-top: 0; }
.msg-list li.is-new span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; margin-right: 6px; vertical-align: middle; }
.msg-list a { color: var(--grass); }
.msg-list time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.panel h2 .chip { margin-left: 8px; vertical-align: middle; }
.claim-box { margin-bottom: 20px; }
.claim-box summary { cursor: pointer; font-weight: 600; }
.claim-box[open] summary { margin-bottom: 10px; }
.claim-code { font-size: 16px; padding: 2px 8px; background: var(--surface-2); border-radius: 4px; user-select: all; }

/* 整合包包含的模组 */
.mod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.mod-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; min-width: 0; }
.mod-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-item img, .mod-noicon { width: 24px; height: 24px; border-radius: 4px; flex: none; background: var(--surface-2); }
.mod-item.is-local { border-color: var(--grass); }
.mod-item:hover { background: var(--surface-2); }
.mod-more { margin-top: 6px; }
.mod-more summary { cursor: pointer; color: var(--grass); font-size: 14px; margin-bottom: 6px; }
.panel h2 small { font-weight: 400; font-size: 13px; }

/* 评论和评分 */
.comments { margin-top: 16px; }
.stars { color: #e9a23b; letter-spacing: 1px; font-size: 13px; }
.stars i { font-style: normal; color: var(--line); }
.rating-sum { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 10px; }
.comments h2 .rating-sum { margin: 0 0 0 10px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 46px; }
.comment-item { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment-item img.avatar { width: 36px; height: 36px; border-radius: 8px; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.comment-text p { margin: 6px 0; overflow-wrap: anywhere; }
.comment-item .pending { margin: 6px 0 0; font-size: 12px; color: #a8741c; }
.comment-reply-link { font-size: 12px; color: var(--grass); }
.comment-respond { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.comment-respond h3 { font-size: 16px; margin: 0 0 10px; }
.comment-respond #cancel-comment-reply-link { font-size: 13px; margin-left: 8px; color: var(--muted); }
.rating-field select { max-width: 220px; }
