/* 悠然MC服务器官网 · 全站样式
 * 组件体系与网页面板（portal-youran.qingu.moe）一致：卡片、多列页脚、Lucide 图标；配色为“草方块”主题（面板 themes.toml 的 grass）。
 * 深色模式默认跟随系统（prefers-color-scheme），也可在顶栏手动选择浅色 / 深色（html[data-theme]）。 */

/* ---- 颜色令牌 ---- */
:root {
  color-scheme: light dark;
  --bg: #f4f3f1; --surface: #ffffff; --surface-2: #f7f5f3; --text: #1f2328; --muted: #5d6570; --border: #e5e2de;
  --accent: #2a7247; --accent-fill: #2f7d4f; --accent-fill-hover: #276a43; --on-accent: #fff; --accent-soft: #ecf6f0;
  --hero-1: #1f6340; --hero-2: #0d2b1d; --hero-glow: rgba(120, 220, 160, .28);
  --warn: #8a5207; --warn-bg: #fdf1dc; --warn-border: #e4b15a;
  --danger: #b42318; --danger-bg: #fdecea; --danger-border: #efc2c2; --ok: #217a45;
  --radius: 10px; --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.04); --shadow-lg: 0 12px 32px rgba(15,23,42,.14), 0 2px 6px rgba(15,23,42,.06);
  --header-bg: rgba(255,255,255,.92); --header-text: var(--text); --header-border: var(--border); --nav-hover: var(--surface-2);
  --nav-current-bg: var(--accent-soft); --nav-current-text: var(--accent); --nav-radius: 10px;
}
/* 深色：跟随系统（未手动选择浅色时），或手动选择了深色 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #1a1d21; --surface-2: #20242a; --text: #e7e9ec; --muted: #9ea5af; --border: #2b3036;
    --accent: #5cbf83; --accent-fill: #2a7a4b; --accent-fill-hover: #246b41; --accent-soft: rgba(92, 191, 131, .14);
    --hero-1: #1c5537; --hero-2: #0b1f16; --hero-glow: rgba(92, 191, 131, .22);
    --warn: #f0b555; --warn-bg: rgba(240,181,85,.12); --warn-border: #7a5a22;
    --danger: #f38b85; --danger-bg: rgba(240,128,121,.12); --danger-border: #6a3331; --ok: #5fd08f;
    --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
    --header-bg: rgba(26,29,33,.92);
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #1a1d21; --surface-2: #20242a; --text: #e7e9ec; --muted: #9ea5af; --border: #2b3036;
  --accent: #5cbf83; --accent-fill: #2a7a4b; --accent-fill-hover: #246b41; --accent-soft: rgba(92, 191, 131, .14);
  --hero-1: #1c5537; --hero-2: #0b1f16; --hero-glow: rgba(92, 191, 131, .22);
  --warn: #f0b555; --warn-bg: rgba(240,181,85,.12); --warn-border: #7a5a22;
  --danger: #f38b85; --danger-bg: rgba(240,128,121,.12); --danger-border: #6a3331; --ok: #5fd08f;
  --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
  --header-bg: rgba(26,29,33,.92);
}

/* ---- 骨架与组件 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 var(--font); overflow-wrap: anywhere; }
:root { --font: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; --wrap: 1120px; --header-h: 64px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link, var(--accent)); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; }
p { margin: 0 0 .9em; }
code { font-family: var(--mono); font-size: .9em; background: var(--code-bg, var(--surface-2)); padding: .1em .4em; border-radius: 6px; overflow-wrap: break-word; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--surface); color: var(--text); border-radius: 8px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---- 顶栏与导航：桌面横排；≤ 960px 收进“菜单”按钮（点按展开，不靠 hover），下拉用 <details> ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--header-border, transparent); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.08rem; white-space: nowrap; margin-right: auto; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, var(--hero-glow), transparent 60%), linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.brand-mark .i { width: 19px; height: 19px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-list > li > a, .menu > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: var(--nav-radius, 8px);
  color: inherit; text-decoration: none; font-weight: 500; cursor: pointer; white-space: nowrap; list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.nav-list > li > a:hover, .menu > summary:hover { background: var(--nav-hover); }
.nav-list > li > a[aria-current] { background: var(--nav-current-bg); color: var(--nav-current-text); font-weight: 650; }
.menu { position: relative; }
.menu .chev { width: 16px; height: 16px; transition: transform .15s; }
.menu[open] .chev { transform: rotate(180deg); }
.menu-list { list-style: none; margin: 0; padding: 6px; position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; }
.menu-list a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.menu-list a:hover { background: var(--surface-2); }
.menu-list .ext { width: 13px; height: 13px; color: var(--muted); margin-left: auto; }
.nav-list > li > a .ext { width: 13px; height: 13px; color: var(--muted); }
.nav-toggle { display: none; }
/* 窄屏且字号放大时顶栏不溢出：头部是尺寸容器（按 rem 判断，随用户字号变化），宽度不够时“菜单”按钮只留图标（文字仍给读屏）；
   品牌名作为最后的兜底可以省略号截断。不删任何导航项 */
.site-header { container: site-header / inline-size; }
.brand { min-width: 0; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@container site-header (max-width: 21.5rem) {
  .site-header .nav-toggle { padding: 0 12px; }
  .nav-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--nav-radius, 8px);
    font: inherit; font-weight: 600; color: inherit; background: var(--nav-hover); border: 1px solid var(--header-border, transparent); cursor: pointer; }
  .nav-toggle .when-open, .nav-open .nav-toggle .when-closed { display: none; }
  .nav-open .nav-toggle .when-open { display: inline; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); color: var(--text);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav-open .site-nav { display: block; box-shadow: var(--shadow-lg), 0 100vh 0 100vh rgba(0, 0, 0, .45); }
  .nav-list { flex-direction: column; align-items: stretch; padding: 8px max(16px, env(safe-area-inset-left)) 16px; gap: 2px; }
  .nav-list > li > a, .menu > summary { min-height: 48px; width: 100%; padding: 0 12px; }
  .nav-list > li > a:hover, .menu > summary:hover { background: var(--surface-2); }
  .nav-list > li > a[aria-current] { background: var(--accent-soft); color: var(--accent); }
  .menu > summary { justify-content: space-between; }
  .menu-list { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--border); border-radius: 0; margin: 0 0 6px 14px; padding: 0 0 0 6px; min-width: 0; background: transparent; }
  .menu-list a { min-height: 44px; }
}

/* ---- 按钮 ---- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; font: inherit; font-weight: 600;
  border-radius: var(--btn-radius, var(--radius)); border: 2px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button.primary { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); }
.button.primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--btn-outline, var(--border)); }
.button.secondary:hover { background: var(--surface-2); }
.button.big { min-height: 52px; padding: 0 28px; font-size: 1.08rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---- 首屏 ---- */
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: .04em; margin-bottom: .3em; }
.eyebrow { margin: 0 0 .3em; font-weight: 650; letter-spacing: .2em; font-size: .95rem; }
.intro-label { font-size: .85rem; letter-spacing: .15em; margin: 0 0 .5em; font-weight: 650; }
.intro p { max-width: 42em; }
.intro .note { font-size: .92rem; }

/* ---- 区块 ---- */
.section { padding: 72px 0; }
.section-title { font-size: clamp(1.5rem, 3.2vw, 2rem); display: flex; align-items: center; gap: 10px; }
.sub-title { font-size: 1.3rem; margin-top: 2.2em; scroll-margin-top: 80px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature h3 { font-size: 1.15rem; margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.feature-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.feature-ic .i { width: 24px; height: 24px; }

.cons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cons li { display: flex; gap: 12px; align-items: center; }
.cons .num { flex: none; line-height: 1; display: inline-grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; font-weight: 700; font-size: .9em; }
.cons .loud span:last-child { font-weight: 700; }

.join-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: js; }
@media (max-width: 1000px) { .join-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .join-steps { grid-template-columns: 1fr; } }
.join-step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; counter-increment: js; }
.join-step h4 { margin: 0 0 4px; font-size: 1.05rem; }
.join-step h4::before { content: counter(js) ". "; color: var(--accent); }
.join-step p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.step-ic .i { width: 21px; height: 21px; }

.download-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 32px; padding: 24px; }
.download-box .sub-title { margin-top: 0; }
.download-alt h4 { margin: 0 0 6px; font-size: 1rem; }
.download-alt ol { margin: 0; padding-left: 1.4em; }
@media (max-width: 700px) { .download-box { grid-template-columns: 1fr; padding: 18px; } .download-box .button.big { width: 100%; } }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; margin: 12px 0 20px; }
.callout p { margin: 0; }
.callout > .i { margin-top: .25em; width: 20px; height: 20px; }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.callout.warn a { color: inherit; font-weight: 650; }

.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.howto-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.howto-step:not(:has(.shot)) { grid-template-columns: minmax(0, 1fr); }
.step-text h4 { margin: 0 0 6px; }
.circ { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 1.15rem; background: var(--accent-soft); color: var(--accent); }
.shots { display: grid; gap: 12px; }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 760px) { .howto-step { grid-template-columns: 1fr; gap: 12px; } }
.addr { font-family: var(--mono); }

.info-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .info-items { grid-template-columns: 1fr; } }
.info-items li > a, .info-items li { color: inherit; text-decoration: none; }
.info-items li > a, .info-items li:not(:has(a)) { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.info-ic { grid-row: span 2; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.info-ic .i { width: 22px; height: 22px; }
.info-k { font-size: .85rem; }
.info-v { font-weight: 650; font-family: var(--mono); font-size: .98rem; overflow-wrap: anywhere; }
.info-foot { margin: 24px 0 0; text-align: center; font-size: .92rem; }
.status-link { display: inline-flex; align-items: center; gap: 6px; }
.status-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #2f9e5a); }
.sep { margin: 0 8px; }

/* ---- 页脚 ---- */
.footer.simple { padding: 20px 0 28px; font-size: .85rem; color: var(--muted); }
.fs-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.fd { color: var(--muted); font-size: .88rem; padding: 0 0 24px; margin-top: 32px; }
.fd .f-inner { border-top: 1px solid var(--border); padding-top: 28px; }
.fd ul { list-style: none; margin: 0; padding: 0; }
.fd-grid { display: grid; gap: 24px 32px; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(110px, 1fr)); }
.fd-name { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-weight: 700; }
.fd-name .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.fd-name .brand-mark .i { width: 16px; height: 16px; }
.fd-contact { margin: 8px 0 0; line-height: 1.7; }
.fd h2 { margin: 2px 0 8px; font-size: .8rem; font-weight: 650; letter-spacing: .06em; color: var(--text); }
.fd-col a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--muted); text-decoration: none; }
.fd-col a:hover { color: var(--accent); }
.fd-col .i { width: 15px; height: 15px; }
.fd-col .ext { width: 12px; height: 12px; opacity: .6; }
.fd-here { font-size: .68rem; font-weight: 600; padding: 0 5px; border-radius: 5px; line-height: 1.5; background: var(--accent-soft); color: var(--accent); }
.fd-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .8rem; }
@media (max-width: 767px) {
  .fd-grid { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .fd-brand { grid-column: 1 / -1; }
  .fd-col a { padding: 8px 0; }
  .fd-bottom { flex-direction: column; }
}

/* ---- 服务器信息页 ---- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 14px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.content { padding-bottom: 48px; }
.block { margin-top: 28px; padding: 22px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.block h2 { font-size: 1.35rem; scroll-margin-top: 80px; }
.legend { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 650; line-height: 1.6; padding: 0 7px; border-radius: 6px; white-space: nowrap; vertical-align: .1em; }
.tag-removed { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.mods { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.mods th, .mods td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.mods thead th { position: sticky; top: 0; background: var(--surface-2); font-size: .82rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
.mods tbody th { font-weight: 650; }
.mods tbody tr:nth-child(even) { background: var(--zebra, transparent); }
.mods .c-time { white-space: nowrap; }
.mods .c-ver { max-width: 9em; overflow-wrap: anywhere; }
.mods .c-ver { font-family: var(--mono); font-size: .85rem; }
.mods tr.removed > * { color: var(--muted); }
.mods tr.removed .c-name { text-decoration: line-through; text-decoration-color: var(--danger); }
.mods tr.removed .c-name .tag { text-decoration: none; display: inline-block; }
.mods tr:last-child > * { border-bottom: 0; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; }
.spec > div { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.spec dt { font-size: .82rem; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-weight: 650; font-size: 1.05rem; }
/* 手机：表格改为逐条卡片（不横向滚动） */
@media (max-width: 760px) {
  .block { padding: 16px; margin-left: -4px; margin-right: -4px; }
  .table-scroll { overflow: visible; border: 0; }
  table.mods, .mods tbody, .mods tr, .mods th, .mods td { display: block; }
  .mods thead { display: none; }
  .mods tbody { display: grid; gap: 10px; }
  .mods tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .mods tbody tr:nth-child(even) { background: var(--surface); }
  .mods th, .mods td { padding: 0; border: 0; }
  .mods .c-name { grid-column: 1 / -1; font-size: 1rem; }
  .mods .c-trans { grid-column: 1 / -1; color: var(--muted); margin-top: -2px; }
  .mods .c-trans:empty { display: none; }
  .mods .c-comment { grid-column: 1 / -1; margin: 6px 0; }
  .mods .c-ver::before, .mods .c-time::before, .mods .c-mode::before, .mods .c-pack::before { content: attr(data-label) "："; color: var(--muted); font-family: var(--font); font-size: .82rem; }
  .mods .c-ver, .mods .c-time { white-space: normal; font-size: .88rem; }
  .mods .c-mode, .mods .c-pack { font-size: .88rem; }
  .mods .c-link { grid-column: 1 / -1; margin-top: 4px; }
  .mods tr.removed { opacity: .92; }
}
@media (min-width: 761px) {
  table.mods { overflow-wrap: normal; word-break: normal; }
  .mods .c-name { min-width: 9em; }
  .mods .c-comment { min-width: 10em; }
  .mods .c-ver { overflow-wrap: anywhere; }
  .mods .c-mode { min-width: 6em; }
  .mods .c-trans { min-width: 6em; }
}

/* ---- 卡片外观、首屏、各区块 ---- */
.site-header { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.feature, .cons-card, .join-step, .download-box, .block, .section-info .info-items li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* 首屏：文字在服务器截图背景上（与旧官网一样作为区块背景，不作为配图） */
.hero-split { padding: 64px 0 56px; }
.hero-split .hero-text { max-width: 760px; }
.hero-split .eyebrow { color: var(--accent); }
.hero-split h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.hero-split .intro-label { color: var(--muted); }
.hero-split .intro p { font-size: .98rem; }
.hero-split .note { color: var(--muted); }
@media (max-width: 860px) {
  .hero-split { padding: 32px 0 28px; }
  .hero-split .actions .button { flex: 1 1 100%; }
}

.section { padding: 48px 0 8px; }
.section-title { font-size: 1.5rem; }
.section-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--accent-fill); }
.section-title .i { color: var(--accent); }
.feature { padding: 22px; }
.feature-ic { border-radius: 12px; }

.cons-wrap { display: block; }
.cons-card { padding: 26px; }
.cons-card .section-title::before { display: none; }
.cons .num { background: var(--accent-soft); color: var(--accent); }
.cons .loud span:last-child { color: var(--accent); }

/* 区块背景图（装饰，无 alt）：上面叠一层与主题同色的半透明遮罩保证文字对比度；
   按视口宽度 × 像素密度选 960 / 1600（与首页 preload 的 imagesrcset 一致）；只在宽屏、有悬停、不要求减少动态效果时用 fixed */
:root { --veil: rgba(244, 243, 241, .93); --veil-soft: rgba(244, 243, 241, .35); }
:root[data-theme="dark"] { --veil: rgba(17, 19, 21, .86); --veil-soft: rgba(17, 19, 21, .4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --veil: rgba(17, 19, 21, .86); --veil-soft: rgba(17, 19, 21, .4); } }
.has-bg { --bg-img: url(/assets/bg2-960.webp); background: linear-gradient(var(--veil), var(--veil)), var(--bg-img) center / cover no-repeat; }
.bg-rail { --bg-img: url(/assets/bg3-960.webp); }
.section-join.has-bg { padding: 56px 0 48px; margin-top: 40px; }
@media (min-width: 961px), (min-resolution: 2dppx) and (min-width: 481px), (min-resolution: 3dppx) and (min-width: 321px) {
  .bg-farm { --bg-img: url(/assets/bg2-1600.webp); }
  .bg-rail { --bg-img: url(/assets/bg3-1600.webp); }
}
/* 宽屏首屏：文字只占左侧，遮罩在文字区之外渐淡，让截图露出来（文字区内仍是完整遮罩，对比度不变） */
@media (min-width: 861px) {
  .bg-farm { --stop: max(calc(50% - var(--wrap) / 2 + 820px), 820px);
    background-image: linear-gradient(90deg, var(--veil) 0, var(--veil) var(--stop), var(--veil-soft) calc(var(--stop) + 220px)), var(--bg-img); }
}
@media (min-width: 861px) and (hover: hover) and (prefers-reduced-motion: no-preference) { .has-bg { background-attachment: fixed; } }

.download-box { background: radial-gradient(120% 140% at 100% 0%, var(--hero-glow), transparent 55%), linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; border: 0; }
.download-box .muted, .download-box p { color: rgba(255,255,255,.88); }
.download-box a:not(.button) { color: #fff; text-decoration: underline; }
.download-box .button.primary { background: #fff; color: var(--hero-1); border-color: #fff; }
.download-box .button.primary:hover { background: rgba(255,255,255,.9); }
.download-alt { background: rgba(0,0,0,.18); border-radius: var(--radius); padding: 14px 18px; }
.howto-step .shot { box-shadow: var(--shadow); }

.section-info { padding: 40px 0 0; }
.section-info .info-items li { padding: 16px; }
.section-info .info-ic { background: var(--accent-soft); color: var(--accent); }
.section-info .info-k { color: var(--muted); }
.info-foot { color: var(--muted); }

.page-head { padding-top: 32px; }
.block { margin-top: 20px; }
.block h2::before { content: ""; display: inline-block; width: 6px; height: .95em; border-radius: 3px; background: var(--accent-fill); margin-right: 10px; vertical-align: -.08em; }

.fd-contact a { color: inherit; }
.page-head .lead { margin: -4px 0 14px; max-width: 46em; }
.page-head .lead a { color: var(--accent); }
.toc a .i { color: var(--accent); }
.group-title { font-size: 1.35rem; margin: 32px 0 0; display: flex; align-items: center; gap: 10px; scroll-margin-top: 80px; }
.group-title::before { content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: var(--accent-fill); }

/* 正文排版（更新日志条目、魔改说明里的 Markdown 产物） */
.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose h3 { font-size: 1.12rem; margin: 1.1em 0 .4em; padding-bottom: .25em; border-bottom: 1px solid var(--border); }
.prose h4 { font-size: 1rem; margin: 1em 0 .3em; color: var(--accent); }
.prose h5, .prose h6 { font-size: .95rem; margin: .9em 0 .25em; color: var(--muted); }
.prose ol, .prose ul { margin: 0 0 .8em; padding-left: 1.6em; }
.prose li { margin: .15em 0; }
.prose li::marker { color: var(--muted); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--border); padding: 4px 8px; }

/* ---- 更新日志 ---- */
.year-chips { margin-bottom: 4px; }
.toc-mobile { display: none; }
.log-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 48px; }
.log-aside { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; margin-top: 20px;
  padding: 14px 10px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.log-toc-title { margin: 0 0 6px; font-size: .8rem; font-weight: 650; letter-spacing: .06em; color: var(--muted); }
.toc-tree, .toc-tree ul { list-style: none; margin: 0; padding: 0; }
.toc-tree ul { margin: 2px 0 10px 4px; padding-left: 10px; border-left: 2px solid var(--border); }
.toc-tree a { display: block; padding: 3px 6px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .9rem; line-height: 1.5; }
.toc-tree a:hover { background: var(--surface-2); color: var(--accent); }
.toc-year-link { display: flex !important; justify-content: space-between; align-items: baseline; font-weight: 650; }
.toc-year-link .count { font-weight: 400; font-size: .78rem; color: var(--muted); }
.year-mark { display: flex; align-items: center; gap: 12px; margin: 32px 0 0; color: var(--muted); font-weight: 650; letter-spacing: .08em; font-size: .9rem; scroll-margin-top: 80px; }
.year-mark::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.year-mark:first-child { margin-top: 20px; }
.log-entry { margin-top: 14px; scroll-margin-top: 12px; }
.log-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.log-entry h2 { font-size: 1.3rem; margin: 0; }
.permalink { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); text-decoration: none; font-family: var(--mono); }
.permalink:hover { color: var(--accent); }
.permalink .i { width: 14px; height: 14px; }
.log-entry .prose { margin-top: 10px; }
.log-old { padding: 0; }
.log-old > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 52px; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.log-old > summary::-webkit-details-marker { display: none; }
.log-old > summary:hover { background: var(--surface-2); }
.log-old > summary h2 { font-size: 1.05rem; font-weight: 650; flex: 1; }
.log-old .permalink-text { font-family: var(--mono); font-size: .82rem; }
.log-old .chev { color: var(--muted); transition: transform .15s; }
.log-old[open] .chev { transform: rotate(180deg); }
.log-old[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.log-old > .prose { padding: 4px 18px 0; }
.log-foot { margin: 8px 18px 14px; }
.log-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (max-width: 960px) {
  .log-layout { grid-template-columns: minmax(0, 1fr); }
  .log-aside { display: none; }
  .toc-mobile { display: block; margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
  .toc-mobile > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; cursor: pointer; list-style: none; font-weight: 600; }
  .toc-mobile > summary::-webkit-details-marker { display: none; }
  .toc-mobile > summary .i:first-child { color: var(--accent); }
  .toc-mobile > summary .chev { margin-left: auto; transition: transform .15s; }
  .toc-mobile[open] > summary .chev { transform: rotate(180deg); }
  .toc-mobile nav { max-height: 60vh; overflow-y: auto; padding: 4px 10px 12px; border-top: 1px solid var(--border); }
  .toc-mobile .toc-tree a { padding: 9px 8px; font-size: .95rem; }
  .toc-mobile .toc-tree ul { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .log-entry.block { margin-left: 0; margin-right: 0; }
  .log-old { padding: 0; }
  .log-old > summary { padding: 12px 14px; gap: 8px; }
  .log-old .permalink-text { display: none; }
  .log-old > .prose { padding: 4px 14px 0; }
  .log-foot { margin: 8px 14px 12px; }
  .log-entry h2 { font-size: 1.15rem; }
  .log-old > summary h2 { font-size: 1rem; }
}

/* ---- 魔改信息 ---- */
.mod-card { margin-top: 16px; }
.mod-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.mod-head h3 { margin: 0; font-size: 1.2rem; }
.mod-meta { margin: 4px 0 0; }
.tag-license { background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; text-decoration: none; }
.tag-license:hover { text-decoration: underline; }
.mod-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; margin: 0 0 14px; }
.mod-info > div { padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.mod-info dt { font-size: .82rem; color: var(--muted); }
.mod-info dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
table.vtable { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.6; }
.vtable th, .vtable td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.vtable thead th { background: var(--surface-2); font-size: .82rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
.vtable tbody th { font-family: var(--mono); font-weight: 650; white-space: nowrap; }
.vtable .v-time { white-space: nowrap; }
.vtable .v-msg ol { margin: 0; }
.vtable .v-dl a { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; }
.vtable .v-dl .i { width: 15px; height: 15px; }
.vtable tr:last-child > * { border-bottom: 0; }
@media (max-width: 760px) {
  .mod-info { grid-template-columns: 1fr; }
  .vt-scroll { overflow: visible; border: 0; }
  table.vtable, .vtable tbody, .vtable tr, .vtable th, .vtable td { display: block; }
  .vtable thead { display: none; }
  .vtable tbody { display: grid; gap: 10px; }
  .vtable tbody tr { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; }
  .vtable th, .vtable td { padding: 0; border: 0; }
  .vtable .v-time { color: var(--muted); font-size: .88rem; justify-self: end; }
  .vtable .v-msg, .vtable .v-dl { grid-column: 1 / -1; }
  .vtable .v-msg { margin: 6px 0; }
  .vtable .v-dl { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .vtable .v-dl a { min-height: 44px; }
}

/* ---- 404 ---- */
.nf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.nf-card { margin: 0; padding: 32px; }
.nf-code { margin: 0; font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: .04em; color: var(--accent); }
.nf h1 { font-size: clamp(1.3rem, 3.4vw, 1.8rem); margin: 14px 0 0; }
.nf-mascot { position: relative; justify-self: center; width: 258px; }
.nf-mascot img { display: block; width: 258px; height: 384px; image-rendering: pixelated; }
/* 深色主题：给角色加一圈很淡的浅色描边与绿光，避免深色描边融进背景 */
:root[data-theme="dark"] .nf-mascot img { filter: drop-shadow(0 0 1.5px rgba(231,233,236,.38)) drop-shadow(0 0 16px rgba(141,181,128,.2)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nf-mascot img { filter: drop-shadow(0 0 1.5px rgba(231,233,236,.38)) drop-shadow(0 0 16px rgba(141,181,128,.2)); } }
/* 像素问号：头侧两个，轻微浮动、交替出现；减少动态效果时静止 */
.nf-q { position: absolute; width: 20px; height: 28px; fill: var(--accent); }
.nf-q1 { left: -10px; top: 66px; width: 25px; height: 35px; }
.nf-q2 { right: -6px; top: 18px; width: 20px; height: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .nf-q { animation: nf-q 2.4s steps(4, end) infinite; }
  .nf-q2 { animation-delay: -1.2s; }
}
@keyframes nf-q { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .35; } }
@media (max-width: 860px) {
  .nf { grid-template-columns: 1fr; padding-top: 24px; gap: 20px; }
  .nf-mascot { order: -1; width: 130px; }
  .nf-mascot img { width: 130px; height: 192px; }
  .nf-q1 { left: -18px; top: 34px; width: 15px; height: 21px; }
  .nf-q2 { right: -14px; top: 10px; width: 10px; height: 14px; }
  .nf-card { padding: 22px; }
  .nf .actions .button { flex: 1 1 100%; }
}

/* ---- 首页：由 Markdown 生成的部分 ---- */
.hero-split .intro p.eyebrow { font-size: .95rem; color: var(--accent); max-width: none; }
.hero-split .intro h1 { margin-bottom: .3em; }
.join-md > p { max-width: 52em; }
.download-box p { margin: 0 0 .6em; }
.download-box .download-main > p:last-child, .download-alt > :last-child { margin-bottom: 0; }
.download-box .button { margin-bottom: .4em; }
.howto { margin-top: 8px; }
.howto + h3, .callout + .howto { margin-top: 0; }
.info-items li:not(:has(.info-k)) > a, .info-items li:not(:has(.info-k)):not(:has(a)) { grid-template-rows: auto; }
.info-badge { margin: 12px 0 0; display: flex; justify-content: center; }
.info-badge a { display: inline-block; line-height: 0; }

/* ---- 首页：实时服务器状态（无脚本或读取失败时显示静态内容，尺寸不变） ---- */
.status-card { margin-top: 20px; }
.status-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.status-head h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.status-head h2::before { display: none; }
.status-head h2 .i { color: var(--accent); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px; border-radius: 999px; font-weight: 650; font-size: .92rem;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.status-pill[data-state="running"] { color: var(--ok); background: var(--accent-soft); border-color: transparent; }
.status-pill[data-state="crashed"] { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.status-pill[data-state="loading"] .dot { animation: status-blink 1.2s ease-in-out infinite; }
@keyframes status-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .status-pill[data-state="loading"] .dot { animation: none; } }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.status-grid > div { padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.status-grid dt { font-size: .82rem; color: var(--muted); }
.status-grid dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.status-grid .mono { font-family: var(--mono); font-size: .92rem; }
.status-sub { display: block; font-weight: 400; font-size: .8rem; }
.status-sub:empty { display: none; }
@media (max-width: 900px) { .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .status-grid > div:first-child, .status-grid > div:last-child { grid-column: 1 / -1; } }
.status-players { margin-top: 14px; }
.status-label { margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 64px; align-content: flex-start; }
.players li { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--mono); font-size: .88rem; line-height: 1.7; }
.players li.none { background: transparent; border-color: transparent; padding-left: 0; font-family: var(--font); color: var(--muted); }
.status-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 12px 0 0; font-size: .85rem; }
.status-foot a { display: inline-flex; align-items: center; gap: 4px; }
.status-foot .ext { width: 13px; height: 13px; }


/* ---- 主题切换（顶栏按钮 + 弹出层，三档：跟随系统 / 浅色 / 深色） ---- */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* 无 JS 时（<html> 没有 .js）控件整体隐藏，页面按系统偏好显示 */
html:not(.js) .theme-ctl { display: none !important; }

/* 图标与选中态直接由 html[data-theme] 推导，内联脚本一设属性即正确，不等 theme.js */
.theme-ic { display: none; }
html:not([data-theme]) .theme-ic-system, html[data-theme="light"] .theme-ic-light, html[data-theme="dark"] .theme-ic-dark { display: inline-block; }

.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; flex: none; cursor: pointer;
  color: inherit; background: transparent; border: 1px solid var(--header-border, var(--border)); border-radius: var(--nav-radius, 8px); }
.theme-btn:hover { background: var(--nav-hover, var(--surface-2)); }
.theme-btn svg.i { width: 20px; height: 20px; vertical-align: 0; }
.theme-btn[aria-expanded="true"] { background: var(--nav-hover, var(--surface-2)); }

/* 选项（radio）的公共外观 */
.theme-opt { font: inherit; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.theme-opt:hover { color: var(--text); }
.theme-opt svg.i { width: 17px; height: 17px; vertical-align: 0; }
html:not([data-theme]) .theme-opt[data-value="system"],
html[data-theme="light"] .theme-opt[data-value="light"],
html[data-theme="dark"] .theme-opt[data-value="dark"] { color: var(--text); --on: 1; }

/* 顶栏位置：DOM 顺序为 品牌 → 菜单按钮 → 导航 → 主题按钮；桌面在最右，手机在“菜单”按钮右侧（不用 CSS order，Tab 顺序与视觉一致） */
.theme-head { position: relative; flex: none; }
@media (max-width: 960px) {
  .theme-head .theme-btn { width: 44px; height: 44px; }
}

/* 弹出层 */
.theme-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 172px; padding: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.theme-pop[hidden] { display: none; }
.theme-pop .theme-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 6px; text-align: left; color: var(--text); }
.theme-pop .theme-opt:hover { background: var(--surface-2); }
.theme-pop .theme-opt .check { margin-left: auto; color: var(--accent); visibility: hidden; }
html:not([data-theme]) .theme-pop .theme-opt[data-value="system"] .check,
html[data-theme="light"] .theme-pop .theme-opt[data-value="light"] .check,
html[data-theme="dark"] .theme-pop .theme-opt[data-value="dark"] .check { visibility: visible; }
html:not([data-theme]) .theme-pop .theme-opt[data-value="system"],
html[data-theme="light"] .theme-pop .theme-opt[data-value="light"],
html[data-theme="dark"] .theme-pop .theme-opt[data-value="dark"] { font-weight: 650; }
@media (max-width: 960px) { .theme-pop .theme-opt { min-height: 44px; } }

