/* =========================================================
 *  Probe Panel — 默认界面（ENDFIELD 风格）
 *  参考《明日方舟：终末地》平面设计与官网：
 *  工业浅灰 / 深空黑 · 荧光黄色块 · 左侧竖向导航栏 · ↘ 区块标题
 *  直角与切角 · 角标括线 · 斜纹警示条 · 刻度圆盘 · 品红/青/黄三色细线 · 等宽小字标注
 *  旧版界面保存在 themes/classic/style.css，访问 /?ui=classic 切换，/?ui=default 恢复
 * ========================================================= */
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url(/fonts/montserrat-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url(/fonts/montserrat-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(/fonts/montserrat-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url(/fonts/montserrat-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

/* ---------- 色板 ----------
 * 黄色只做「色块」（黄底黑字），浅色模式下不当细线或文字用；
 * --ink / --mark 是各模式下的强调线条色（浅色=墨黑，深色=荧光黄）。
 * 图表直接读取 --accent / --blue / --violet / --warn，必须是 6 位十六进制。 */
:root {
  --yellow: #fff200;
  --yellow-2: #ffe100;
  --magenta: #e4007f;
  --teal: #14c8a8;
  --on-yellow: #111111;
  --tri: linear-gradient(90deg, var(--magenta) 0 9%, var(--teal) 9% 18%, var(--yellow) 18% 100%);
  --rail: 76px;

  --bg: #0e0f10;
  --bg-2: #141517;
  --card: #17181a;
  --card-solid: #1a1b1d;
  --card-2: #222326;
  --card-warm: linear-gradient(transparent, transparent);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .18);
  --border-accent: rgba(255, 242, 0, .5);
  --text: #f3f3f1;
  --text-2: #c6c6c3;
  --muted: #84858a;
  --ink: #f3f3f1;
  --mark: #fff200;
  --accent: #fff200;
  --accent-2: #ffd400;
  --accent-soft: rgba(255, 242, 0, .09);
  --accent-glow: rgba(255, 242, 0, .32);
  --sel-bg: #fff200;
  --sel-fg: #111111;
  --chip-bg: #f3f3f1;
  --chip-fg: #111111;
  --rail-bg: #0a0a0b;
  --rail-fg: #f3f3f1;
  --rail-muted: #56575c;
  --rail-active: #1c1d20;
  --rail-bar: #fff200;
  --ok: #19d3a2;
  --ok-soft: rgba(25, 211, 162, .13);
  --blue: #4cb8ff;
  --violet: #b79cff;
  --warn: #ff9f1c;
  --danger: #ff4d4f;
  --bar-bg: rgba(255, 255, 255, .09);
  --bar-fill: #fff200;
  --tick: rgba(255, 255, 255, .09);
  --hud-sweep: rgba(255, 242, 0, .55);
  --sand: #ffffff;
  --sand-hi: #fff200;
  --hatch: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .055) 0 2px, transparent 2px 7px);
  --hatch-strong: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 3px, transparent 3px 9px);
  --shadow: none;
  --shadow-pop: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --radius: 0px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Montserrat", "HarmonyOS Sans SC", "PingFang SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ececea;
  --bg-2: #e4e4e0;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-2: #f2f2ef;
  --border: rgba(0, 0, 0, .1);
  --border-strong: rgba(0, 0, 0, .22);
  --border-accent: rgba(0, 0, 0, .6);
  --text: #121212;
  --text-2: #3a3a38;
  --muted: #7a7a75;
  --ink: #121212;
  --mark: #121212;
  --accent: #161616;
  --accent-2: #3a3a3a;
  --accent-soft: rgba(255, 230, 0, .3);
  --accent-glow: rgba(0, 0, 0, .2);
  --sel-bg: #121212;
  --sel-fg: #fff200;
  --chip-bg: #121212;
  --chip-fg: #ffffff;
  --rail-bg: #ffffff;
  --rail-fg: #121212;
  --rail-muted: #bdbdb8;
  --rail-active: #ececea;
  --rail-bar: #121212;
  --ok: #0c9b77;
  --ok-soft: rgba(12, 155, 119, .12);
  --blue: #1f6feb;
  --violet: #7c4dff;
  --warn: #e07800;
  --danger: #e5383b;
  --bar-bg: rgba(0, 0, 0, .09);
  --bar-fill: #121212;
  --tick: rgba(0, 0, 0, .09);
  --hud-sweep: rgba(0, 0, 0, .4);
  --sand: #121212;
  --sand-hi: #e4007f;
  --hatch: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 7px);
  --hatch-strong: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .13) 0 3px, transparent 3px 9px);
  --shadow-pop: 0 30px 70px -30px rgba(0, 0, 0, .35);
  color-scheme: light;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.65 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: var(--rail);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
/* 背景：细网格 + 「+」定位点 + 斜切线 */
body::before {
  content: ""; position: fixed; inset: 0 0 0 var(--rail); z-index: -2; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 62%, var(--tick) 62% calc(62% + 1px), transparent calc(62% + 1px)),
    radial-gradient(circle, var(--border-strong) 1.2px, transparent 1.6px) 0 0 / 96px 96px,
    linear-gradient(var(--tick) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--tick) 1px, transparent 1px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .25));
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .25));
}
/* 右上角刻度圆盘（官网「世界观资料」的 HUD 圆环）：三层以不同速度/方向旋转 */
.hud {
  position: fixed; z-index: -1; pointer-events: none;
  width: 720px; height: 720px; right: -230px; top: -250px; opacity: .9;
}
.hud i { position: absolute; inset: 0; border-radius: 50%; will-change: transform; }
/* 外圈：细圆 + 刻度带，带一段高亮弧作为可见的旋转标记，顺时针慢转 */
.hud i:nth-child(1) {
  background:
    radial-gradient(circle, transparent 0 49.6%, var(--border-strong) 49.8% 50%, transparent 50.2%),
    conic-gradient(from 20deg, var(--accent) 0 1.2deg, transparent 1.2deg 360deg),
    repeating-conic-gradient(from 0deg, var(--border-strong) 0 .45deg, transparent .45deg 5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 43%, #000 43% 46.5%, transparent 46.5% 49.5%, #000 49.5% 50.5%, transparent 50.5%);
  mask: radial-gradient(circle, transparent 0 43%, #000 43% 46.5%, transparent 46.5% 49.5%, #000 49.5% 50.5%, transparent 50.5%);
  animation: hud-spin 140s linear infinite;
}
/* 内圈：分段虚线圆 + 一小段强调弧，逆时针 */
.hud i:nth-child(2) {
  background:
    conic-gradient(from 200deg, var(--accent) 0 14deg, transparent 14deg 360deg),
    repeating-conic-gradient(from 0deg, var(--border-strong) 0 52deg, transparent 52deg 60deg);
  -webkit-mask: radial-gradient(circle, transparent 0 39.4%, #000 39.6% 40.3%, transparent 40.5%);
  mask: radial-gradient(circle, transparent 0 39.4%, #000 39.6% 40.3%, transparent 40.5%);
  animation: hud-spin 90s linear infinite reverse;
}
/* 扫描弧：刻度带与外圆之间的一道渐隐光迹，转得最快 */
.hud i:nth-child(3) {
  background: conic-gradient(from 0deg, transparent 0 290deg, var(--hud-sweep) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 47.4%, #000 47.6% 48.2%, transparent 48.4%);
  mask: radial-gradient(circle, transparent 0 47.4%, #000 47.6% 48.2%, transparent 48.4%);
  animation: hud-spin 14s linear infinite;
}
@keyframes hud-spin { to { transform: rotate(1turn); } }
/* ---------- 开屏动画（index.html #splash；每个会话一次，可点击/按键/滚轮跳过） ----------
   时间线：0–1.6s 圆环绘制 + 标志/站名揭示 + 分段进度条读满 → 1.65s 圆环放大、文字上浮淡出 → 1.8s 整层淡出，同时主页淡入（交叉淡化）
   只动 transform / opacity / clip-path，交给合成线程，保证流畅 */
@property --sp-p { syntax: "<integer>"; initial-value: 0; inherits: false; }
.splash:not([hidden]) {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    linear-gradient(var(--tick) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--tick) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  color: var(--text); cursor: pointer; user-select: none; overflow: hidden;
  animation: sp-out .75s 1.85s cubic-bezier(.4, 0, .2, 1) forwards;
  will-change: opacity;
}
.splash.skip { animation: sp-out2 .5s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes sp-out { to { opacity: 0; } }
@keyframes sp-out2 { to { opacity: 0; } }
.splash::before { content: "PROBE // FIELD TERMINAL"; position: absolute; top: 24px; left: 28px; font: 700 10.5px/1 var(--mono); letter-spacing: .24em; color: var(--muted); animation: sp-fade .6s .2s backwards; }
.splash::after { content: ""; position: absolute; left: 28px; bottom: 28px; width: 132px; height: 4px; background: var(--tri); transform-origin: left; animation: sp-grow .9s .3s cubic-bezier(.65, 0, .35, 1) backwards; }
/* 横向扫描线 */
.sp-scan { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border-strong); transform-origin: center; animation: sp-grow 1.1s cubic-bezier(.65, 0, .35, 1) backwards; }
/* 圆环 + 标志 */
.sp-core { position: relative; width: 210px; height: 210px; display: grid; place-items: center; animation: sp-core-in .8s cubic-bezier(.22, 1, .36, 1) backwards, sp-core-out .4s 1.5s cubic-bezier(.55, 0, .45, 1) forwards; }
.sp-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-ring circle { fill: none; transform-box: fill-box; transform-origin: center; }
.sp-r1 { stroke: var(--muted); stroke-width: 6; stroke-dasharray: .3 2.2; opacity: .7; animation: sp-spin 9s linear infinite, sp-fade .5s backwards; }
.sp-r2 { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); animation: sp-draw 1.1s .05s cubic-bezier(.65, 0, .35, 1) forwards; }
.sp-r3 { stroke: var(--border-strong); stroke-width: 3; stroke-dasharray: 21 4; animation: sp-spin 7s linear infinite reverse, sp-fade .5s .2s backwards; }
.sp-r4 { stroke: var(--yellow); stroke-width: 3; stroke-dasharray: 9 91; animation: sp-spin 1.5s cubic-bezier(.7, 0, .3, 1) infinite, sp-fade .4s .3s backwards; }
.sp-logo { width: 58px; height: 58px; background: #111 url(/favicon.svg) center / 100% no-repeat; box-shadow: 0 0 0 1px var(--border-strong); animation: sp-reveal .55s .25s cubic-bezier(.65, 0, .35, 1) backwards; }
/* 文字：固定在圆环下方，圆环中心与扫描线对齐屏幕正中 */
.sp-text { position: absolute; left: 0; right: 0; top: calc(50% + 105px); display: flex; flex-direction: column; align-items: center; animation: sp-text-out .4s 1.5s cubic-bezier(.4, 0, .2, 1) forwards; }
.sp-label { margin-top: 30px; font: 700 10.5px/1 var(--mono); letter-spacing: .32em; color: var(--muted); animation: sp-rise .6s .4s cubic-bezier(.22, 1, .36, 1) backwards; }
.sp-name { margin-top: 14px; max-width: calc(100vw - 48px); }
.sp-name span {
  display: block; padding: .04em .16em; background: var(--yellow); color: var(--on-yellow);
  font: 800 clamp(26px, 4.2vw, 46px)/1.1 var(--font); text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: sp-wipe-in .7s .5s cubic-bezier(.65, 0, .35, 1) backwards;
}
.sp-bar { position: relative; width: 248px; height: 5px; margin-top: 26px; background: var(--bar-bg); }
.sp-bar i {
  position: absolute; inset: 0; background: var(--yellow); transform: scaleX(0); transform-origin: left;
  animation: sp-load 1.3s .35s cubic-bezier(.65, 0, .35, 1) forwards;
}
.sp-bar { -webkit-mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12px); mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 12px); }
.sp-meta { display: flex; justify-content: space-between; width: 248px; margin-top: 9px; font: 700 10px/1 var(--mono); letter-spacing: .16em; color: var(--muted); animation: sp-fade .5s .4s backwards; }
.sp-pct { --sp-p: 0; counter-reset: sp var(--sp-p); color: var(--text); animation: sp-count 1.3s .35s cubic-bezier(.65, 0, .35, 1) forwards; }
.sp-pct::after { content: counter(sp) "%"; }
.sp-skip { position: absolute; right: 28px; bottom: 24px; font: 700 10px/1 var(--mono); letter-spacing: .2em; color: var(--muted); animation: sp-fade .6s .9s backwards; }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-grow { from { transform: scaleX(0); } }
@keyframes sp-spin { to { transform: rotate(1turn); } }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-core-in { from { opacity: 0; transform: scale(.82) rotate(-25deg); } }
@keyframes sp-core-out { to { opacity: 0; transform: scale(1.18); visibility: hidden; } } /* 隐藏后旋转的圆环不再绘制 */
@keyframes sp-reveal { from { clip-path: inset(100% 0 0 0); } }
@keyframes sp-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes sp-wipe-in { from { clip-path: inset(0 100% 0 0); } }
@keyframes sp-load { to { transform: scaleX(1); } }
@keyframes sp-count { to { --sp-p: 100; } }
@keyframes sp-text-out { to { opacity: 0; transform: translateY(-10px); visibility: hidden; } }
/* 开屏淡出时主页随之浮现：透明度只由开屏层这一层负责（多层同时半透明混合会掉帧），
   导航栏和正文只做轻微位移，和淡出同步 */
html.intro .topbar { animation: sp-rail 1s 1.85s cubic-bezier(.22, 1, .36, 1) backwards; will-change: transform; }
html.intro main#app { animation: sp-app 1.1s 1.85s cubic-bezier(.22, 1, .36, 1) backwards; will-change: transform; } /* 提前分层，淡出那一刻不临时栅格化 */
@keyframes sp-rail { from { transform: translateX(-16px); } }
@keyframes sp-rail-top { from { transform: translateY(-10px); } }
@keyframes sp-app { from { transform: translateY(18px); } }

/* 数字沙粒画布（sand.js 绘制，随鼠标视差/搅动） */
.sand { position: fixed; top: 0; bottom: 0; left: var(--rail); width: calc(100% - var(--rail)); height: 100%; z-index: -2; pointer-events: none; }
::selection { background: var(--yellow); color: var(--on-yellow); }
a { color: var(--text); text-decoration: none; transition: color .2s, background-color .2s; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 800; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
main.wrap { flex: 1; padding-top: 40px; padding-bottom: 72px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.hl { color: var(--text); }
svg.i { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; vertical-align: -.125em; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); }
::-webkit-scrollbar-thumb:hover { background: var(--mark); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 顶部进度条：三色细线 ---------- */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; opacity: 0; background: var(--tri); transition: width .4s var(--ease), opacity .3s; }
#progress.run { opacity: 1; width: 70%; transition: width 2.5s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
#progress.done { opacity: 0; width: 100%; transition: width .2s, opacity .4s .15s; }

/* ---------- 左侧竖向导航栏（官网样式） ---------- */
.topbar {
  position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: var(--rail);
  background: var(--rail-bg); color: var(--rail-fg);
  border-right: 1px solid var(--border);
  overflow-y: auto; scrollbar-width: none;
  transition: background-color .4s var(--ease);
}
.topbar::-webkit-scrollbar { display: none; }
.topbar-wrap, .topbar-in { height: 100%; }
.topbar-in { display: flex; flex-direction: column; align-items: stretch; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0 18px; color: var(--rail-fg); }
.brand:hover { color: var(--rail-fg); }
/* 网站标志：黑色方块 + 黄色倒三角（「前往游戏」块的几何语言） */
.logo {
  width: 44px; height: 44px; flex: none; position: relative; display: block;
  background: #111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.logo::after {
  content: ""; position: absolute; inset: 0;
  background: url(/favicon.svg) center/100% no-repeat; /* 与浏览器标签页图标同一个图形 */
}
/* 站点名：竖排 */
#site-title {
  writing-mode: vertical-rl; font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  max-height: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rail-fg);
}
.nav-right { flex: 1; display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
nav#nav { display: flex; flex-direction: column; gap: 2px; position: relative; padding: 14px 0; border-top: 1px solid var(--border); counter-reset: nav; }
nav#nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  height: 64px; margin: 0 6px; color: var(--rail-muted); font-weight: 700; font-size: 11px; letter-spacing: .06em; line-height: 1.1;
  text-align: center; white-space: nowrap; transition: color .2s, background-color .2s;
}
nav#nav a svg { font-size: 22px; stroke-width: 2.2; }
nav#nav a:hover { color: var(--rail-fg); }
nav#nav a.active { color: var(--rail-fg); background: var(--rail-active); }
nav#nav a.active::before { content: ""; position: absolute; left: -6px; top: 0; bottom: 0; width: 4px; background: var(--rail-bar); }
nav#nav a::after { counter-increment: nav; content: "0" counter(nav); position: absolute; top: 5px; right: 6px; font: 600 8px/1 var(--mono); letter-spacing: 0; opacity: .55; }
.nav-ind { display: none; }
.nav-sep { margin-top: auto; height: 1px; background: var(--border); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; border-radius: 0; transition: color .2s, background .2s, transform .2s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn:active { transform: scale(.92); }
.topbar .icon-btn { width: 44px; height: 44px; margin: 14px auto 6px; color: var(--rail-fg); border: 1px solid var(--border-strong); }
.topbar .icon-btn:hover { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
/* 导航栏底部的小字装饰 */
.nav-right::after {
  content: "SYS\A ONLINE\A ////"; white-space: pre; display: block; text-align: center; padding: 6px 0 14px;
  font: 600 8px/1.5 var(--mono); letter-spacing: .12em; color: var(--rail-muted);
}
#theme-btn svg { transition: transform .6s var(--ease); }
#theme-btn:hover svg { transform: rotate(90deg); }

/* ---------- 页脚：荧光黄分隔带 ---------- */
.footer { margin-top: 20px; background: var(--yellow); color: var(--on-yellow); position: relative; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: var(--hatch-strong); }
.footer-in { display: flex; align-items: center; gap: 22px; padding: 26px 28px 28px; color: var(--on-yellow); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.footer-in::before { content: "↘"; display: grid; place-items: center; width: 34px; height: 22px; background: #111; color: var(--yellow); font-size: 14px; font-weight: 800; }
.footer-brand { font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; color: var(--on-yellow); margin-right: auto; line-height: 1; }
.footer-in::after {
  content: ""; width: 120px; height: 22px; flex: none;
  background:
    repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 9px, #111 9px 12px, transparent 12px 13px);
}

/* ---------- 页面切换 ---------- */
.page { animation: page-in .5s var(--ease) backwards; }
@keyframes page-in { from { opacity: 0; transform: translateX(-10px); } }
.stagger > * { animation: rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* ---------- 卡片：直角 + 角标括线 ---------- */
.card {
  --cm: var(--border-strong);
  position: relative; border: 1px solid var(--border); border-radius: 0; box-shadow: none;
  background:
    linear-gradient(var(--cm), var(--cm)) 0 0 / 12px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 0 / 2px 12px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 12px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 2px 12px no-repeat,
    var(--card);
}
.card.warm { --cm: var(--ink); }
.card.lift { transition: border-color .25s, box-shadow .25s var(--ease), transform .3s var(--ease); }
.card.lift:hover { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--yellow); transform: translateX(2px); }
.pad { padding: 24px; }

/* ---------- 按钮：切角 ---------- */
.btn {
  --cut: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  padding: 8px 18px; border-radius: 0; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .06em;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
}
/* 切角处补一条斜边：clip-path 会把边框一起裁掉，用 1px 线沿切口旋转 45°，颜色继承按钮边框色（随 hover / 变体变化） */
.btn::after {
  content: ""; position: absolute; right: -1px; bottom: calc(var(--cut) - 1px);
  width: calc(var(--cut) * 1.4142); height: 0;
  border-top: 1px solid; border-top-color: inherit;
  transform-origin: 100% 100%; transform: rotate(-45deg);
  pointer-events: none; transition: border-color .2s;
}
.btn:hover { border-color: var(--ink); color: var(--text); box-shadow: inset 3px 0 0 var(--mark); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); box-shadow: none; }
.btn.primary:hover { background: #111; border-color: #111; color: var(--yellow); box-shadow: none; }
:root:not([data-theme="light"]) .btn.primary:hover { background: #fff; border-color: #fff; color: #111; }
.btn.outline { background: transparent; border: 1px solid var(--ink); color: var(--text); box-shadow: inset 3px 0 0 var(--mark); }
.btn.outline:hover { background: var(--ink); color: var(--bg); }
.btn.lg { padding: 13px 28px; font-size: 14.5px; --cut: 12px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); box-shadow: inset 3px 0 0 var(--danger); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--card-2); color: var(--text); box-shadow: none; }
.btn.sm { padding: 5px 12px; font-size: 12px; --cut: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; background-image: var(--hatch); }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong); border-bottom-color: var(--muted);
  border-radius: 0; padding: 10px 13px; font: inherit; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s var(--ease), background .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--mark); background: var(--card); }
input:disabled { opacity: .5; }
textarea { font-family: var(--mono); font-size: 13px; resize: vertical; line-height: 1.6; }
label.field { display: block; margin-bottom: 16px; }
.port-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.port-cell .port-in { width: 92px; padding: 6px 9px; font-size: 13px; }
.port-cell .btn.sm { padding: 3px 8px; }
/* 字段标签：黑色小块（官网「阵营」「种族」标签） */
label.field > span, .field-label {
  display: inline-block; font-size: 11px; color: var(--chip-fg); background: var(--chip-bg); margin-bottom: 7px; padding: 2px 9px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; line-height: 18px;
}

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; margin-right: 20px; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 40px; height: 20px; border-radius: 0; background: var(--bar-bg); border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background .25s var(--ease), border-color .25s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--muted); transition: transform .3s var(--ease), background .25s; }
.switch input:checked { background: var(--yellow); border-color: var(--yellow); }
.switch input:checked::after { transform: translateX(20px); background: #111; }
.switch input:disabled { opacity: .45; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { position: relative; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 0; font-size: 12.5px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--border-strong); color: var(--muted); background: var(--card); transition: all .2s var(--ease);
}
.chip-opt span::before { content: ""; width: 9px; height: 9px; border: 1px solid var(--border-strong); transition: background .2s, border-color .2s; }
.chip-opt input:checked + span { color: var(--text); border-color: var(--ink); background: var(--card); box-shadow: inset 3px 0 0 var(--mark); }
.chip-opt input:checked + span::before { background: var(--yellow); border-color: #111; }
.chip-opt input:focus-visible + span { outline: 2px solid var(--mark); outline-offset: 2px; }
.chip-opt input:disabled + span { opacity: .45; cursor: not-allowed; background-image: var(--hatch); }
/* 节点选择器 */
.node-pick { max-height: 300px; overflow-y: auto; padding: 4px 14px 10px; border: 1px solid var(--border); background: var(--bg-2); }
.np-group { padding: 10px 0; border-bottom: 1px dashed var(--border-strong); }
.np-group:last-child { border-bottom: 0; }
.np-title { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.np-group .chip-opt span { font-size: 12px; padding: 5px 12px; text-transform: none; }

/* 后台「界面主题」选择卡片（色块示意 + 名称 + 说明 + 预览链接） */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.theme-opt { display: block; }
.theme-opt span { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; height: 100%; padding: 14px 14px 12px; text-transform: none; letter-spacing: 0; font-weight: 500; white-space: normal; }
.theme-opt span::before { display: none; }
.theme-sw { grid-column: 1 / -1; display: flex; height: 36px; border: 1px solid var(--border-strong); overflow: hidden; font-style: normal; }
.theme-sw b { flex: 1; }
.theme-sw b:first-child { flex: 3; }
.theme-opt strong { grid-row: 2; display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--text); }
.theme-opt strong .tag { font-style: normal; }
.theme-opt small { grid-column: 1 / -1; font-size: 12px; line-height: 1.55; color: var(--muted); }
.theme-prev { grid-row: 2; grid-column: 2; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.theme-prev:hover { color: var(--text); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 0 8px; border-radius: 0;
  background: var(--yellow); color: var(--on-yellow); font-weight: 700; line-height: 20px; text-transform: uppercase; letter-spacing: .05em;
}
.tag.gray, .tag.red, .tag.blue, .tag.violet, .tag.warn, .tag.ok { --tc: var(--muted); background: transparent; color: var(--tc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 55%, transparent), inset 3px 0 0 var(--tc); padding-left: 10px; }
.tag.red { --tc: var(--danger); }
.tag.blue { --tc: var(--blue); }
.tag.violet { --tc: var(--violet); }
.tag.warn { --tc: var(--warn); }
.tag.ok { --tc: var(--ok); }

/* ---------- 标题 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.section-title h2 { margin: 0; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.section-title h2 svg { color: var(--on-yellow); background: var(--yellow); padding: 5px; width: 30px; height: 30px; }
/* 区块大标题：「↘ ARCHIVE / 最新文章」 */
.title-c { scroll-margin-top: 40px; text-align: left; margin: 84px 0 10px; font-size: clamp(28px, 3.6vw, 40px); text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; position: relative; }
.title-c::before {
  content: "↘ ARCHIVE"; display: block; width: max-content; margin-bottom: 12px; padding: 1px 10px 1px 8px;
  background: var(--ink); color: var(--bg); font: 700 13px/22px var(--font); letter-spacing: .12em;
}
.title-c::after { content: ""; display: block; width: 160px; height: 3px; margin-top: 14px; background: var(--tri); }
.title-c em { font-style: normal; background: var(--yellow); color: var(--on-yellow); padding: 0 .14em; margin-left: .1em; }
.sub-c { text-align: left; color: var(--muted); max-width: 760px; margin: 0 0 26px; font-size: 14px; font-family: var(--font); }
.sub-c::before { content: "// "; color: var(--text); font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 52px 16px; background-image: var(--hatch); }
.card.empty { background: var(--hatch), var(--card); }
.empty .i { font-size: 32px; opacity: .6; display: block; margin: 0 auto 12px; }
.code {
  position: relative; font-family: var(--mono); font-size: 13px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 0; padding: 13px 15px; word-break: break-all; white-space: pre-wrap; user-select: all; color: var(--text-2);
}
.code.term { border-left: 4px solid var(--yellow); }
.code.term::before { content: "$ "; color: var(--mark); user-select: none; font-weight: 700; }
.code.flash { animation: flash .6s var(--ease); }
@keyframes flash { 30% { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); } }
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--border-strong); background: var(--card-2); }

.sk { position: relative; overflow: hidden; background: var(--bar-bg); border-radius: 0 !important; color: transparent !important; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* 国家徽章 */
.cc { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 0; font-size: 20px; line-height: 1; background: var(--card-2); border: 1px solid var(--border); }
.cc.txt { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--yellow); border: 0; background: #111; }
.cc.sm { width: 28px; height: 28px; font-size: 15px; }
.cc.flag { width: 40px; height: 30px; overflow: hidden; padding: 0; background: var(--card-2); border: 1px solid var(--border-strong); }
.cc.flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc.sm.flag { width: 28px; height: 21px; }
.cc.sm.txt { font-size: 10px; }

/* 状态 */
.dot { width: 7px; height: 7px; background: var(--muted); flex: none; position: relative; display: inline-block; }
.dot.on { background: var(--ok); }
.dot.on::after { content: ""; position: absolute; inset: -4px; border: 1px solid var(--ok); opacity: 0; animation: ping 2s var(--ease) infinite; }
.dot.off { background: var(--danger); }
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 80%, 100% { transform: scale(1.3); opacity: 0; } }
.status { display: inline-flex; align-items: center; gap: 7px; font: 700 10.5px/1 var(--mono); padding: 5px 9px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; }
.status.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* 磁贴标签：黑块白字 + 编号 */
.pill-label {
  display: inline-flex; align-items: center; gap: 8px; background: var(--chip-bg); color: var(--chip-fg); font-weight: 700; font-size: 12.5px; line-height: 1;
  padding: 6px 10px 6px 8px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap;
}
.pill-label::before { content: ""; width: 6px; height: 6px; background: var(--yellow); flex: none; }

/* ---------- 首页 Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding: 40px 0 36px; min-height: 480px; }
.hero > div:first-child { position: relative; }
.hero > div:first-child::before {
  content: "[ FIELD TERMINAL ]   ⊕ ——— —— ——————"; display: block; margin-bottom: 26px; white-space: pre;
  font: 700 11px/1 var(--mono); letter-spacing: .16em; color: var(--muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; color: var(--chip-fg); background: var(--chip-bg); padding: 5px 12px; margin-bottom: 22px; text-transform: uppercase; letter-spacing: .1em; }
.eyebrow:hover { color: var(--chip-fg); }
.hero h1 { font-size: clamp(42px, 6.4vw, 84px); line-height: 1.04; margin: 0 0 26px; text-transform: uppercase; letter-spacing: .01em; }
.hero h1 span { display: block; width: max-content; max-width: 100%; }
.hero h1 .hl { background: var(--yellow); color: var(--on-yellow); padding: 0 .12em; margin-left: -.12em; margin-bottom: .06em; }
.hero h1::after { content: ""; display: block; width: 200px; height: 4px; margin-top: 22px; background: var(--tri); }
.hero .lead { margin: 0 0 30px; color: var(--text-2); font-size: 16.5px; max-width: 520px; padding-left: 16px; border-left: 2px solid var(--border-strong); }
.hero .lead b { color: var(--text); }
/* 统计磁贴：2×2 面板网格 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; counter-reset: tile; position: relative; padding: 18px 0 0 18px; }
.tiles::before { content: ""; position: absolute; left: 0; top: 0; width: 60%; height: 60%; background: var(--hatch-strong); z-index: -1; }
.tile {
  --cm: var(--ink);
  counter-increment: tile; position: relative; padding: 18px 20px 20px; min-height: 140px; border: 1px solid var(--border);
  background:
    linear-gradient(var(--cm), var(--cm)) 0 0 / 14px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 0 / 2px 14px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 14px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 2px 14px no-repeat,
    var(--card);
  transition: border-color .25s, box-shadow .25s, transform .3s var(--ease);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.tile::after { content: "0" counter(tile); position: absolute; top: 14px; right: 16px; font: 700 11px/1 var(--mono); color: var(--muted); letter-spacing: .1em; }
.tile:hover { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--yellow); }
.tile .pill-label { position: absolute; top: 14px; left: 14px; }
.tile .tv { font-size: 34px; font-weight: 800; line-height: 1.1; white-space: nowrap; letter-spacing: -.01em; margin-top: 30px; position: relative; z-index: 1; }
.tile .tv small { font-size: 14px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.tile .tsub { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; position: relative; z-index: 1; }
.tile .tsub::before { content: "// "; color: var(--text); }
.tile .ticon { position: absolute; right: 16px; bottom: 14px; font-size: 52px; color: var(--text); opacity: .1; transition: opacity .3s, transform .4s var(--ease); }
.tile:hover .ticon { opacity: .22; transform: translateX(-4px); }
.tile .ticon svg { stroke-width: 1.4; }
.hero-side { min-width: 0; }

/* 首页：游客留言板（磁贴下方，可折叠，留言循环滚动） */
.gb {
  --cm: var(--ink);
  margin: 14px 0 0 18px; border: 1px solid var(--border); position: relative;
  background:
    linear-gradient(var(--cm), var(--cm)) 0 0 / 14px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 0 / 2px 14px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 14px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 2px 14px no-repeat,
    var(--card);
}
.gb-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.gb-count { font: 800 13px/1 var(--mono); color: var(--text); letter-spacing: .06em; }
.gb-count::after { content: " MSG"; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .14em; }
.gb-sig { margin-left: auto; font: 700 10px/1 var(--mono); color: var(--muted); letter-spacing: .16em; white-space: nowrap; }
.gb.off .gb-sig::before { content: "已关闭 · 仅管理员可见  "; color: var(--danger); letter-spacing: .04em; }
.gb-chev { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 1px solid var(--border-strong); font-size: 14px; transition: transform .4s var(--ease), background .2s, color .2s, border-color .2s; }
.gb-head:hover .gb-chev { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.gb.folded .gb-chev { transform: rotate(-90deg); }
.gb-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); }
.gb.folded .gb-body { grid-template-rows: 0fr; }
.gb-inner { min-height: 0; overflow: hidden; }
.gb-view { position: relative; height: 176px; margin: 0 14px; overflow-y: auto; border-top: 1px solid var(--border); scrollbar-width: thin; }
.gb-view.roll {
  overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.gb-view.roll:active { cursor: grabbing; }
.gb-track { will-change: transform; }
.gb-msg { position: relative; padding: 11px 0 11px 14px; border-bottom: 1px dashed var(--border-strong); }
.gb-msg::before { content: ""; position: absolute; left: 0; top: 15px; width: 4px; height: 10px; background: var(--yellow); }
.gb-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.gb-meta b { font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-meta .tag { line-height: 17px; font-size: 10px; }
.gb-meta time { margin-left: auto; font: 600 10.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.gb-del { display: grid; place-items: center; padding: 2px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.gb-del:hover { color: var(--danger); }
.gb-msg p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.gb-empty { display: grid; place-items: center; height: 174px; color: var(--muted); font-size: 13px; background-image: var(--hatch); }
.gb-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.gb-form input[type=text] { padding: 8px 11px; font-size: 13px; }
.gb-form #gb-name { flex: 0 0 104px; }
.gb-form #gb-text { flex: 1; min-width: 0; }
.gb-form .btn { flex: none; }
.gb-hp { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }

/* 首页：文章 */
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; margin: 0 0 24px; }
.tag-filter button { border: 1px solid var(--border-strong); background: var(--card); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; transition: all .2s; }
.tag-filter button:hover { color: var(--text); border-color: var(--ink); }
.tag-filter button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.posts { display: grid; gap: 14px; counter-reset: post; }
.posts.grid { grid-template-columns: repeat(2, 1fr); }
.post-card { padding: 24px 26px; display: flex; gap: 18px; color: inherit; position: relative; overflow: hidden; counter-increment: post; }
.post-card:hover { color: inherit; }
/* 大号描边编号 */
.post-card::after {
  content: counter(post, decimal-leading-zero); position: absolute; right: 16px; bottom: -14px; pointer-events: none;
  font: 800 72px/1 var(--font); color: transparent; -webkit-text-stroke: 1px var(--border-strong); letter-spacing: -.02em;
  transition: -webkit-text-stroke-color .3s;
}
.post-card:hover::after { -webkit-text-stroke-color: var(--muted); }
.post-card .pic { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 22px; color: var(--yellow); background: #111; box-shadow: inset 0 0 0 1px var(--border-strong); position: relative; }
.post-card .pic::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 10px; height: 10px; background: var(--yellow); }
.post-card .body { min-width: 0; flex: 1; position: relative; z-index: 1; }
.post-card h3 { margin: 0 0 6px; font-size: 17px; text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.post-card h3 .arrow { margin-left: auto; color: var(--on-yellow); background: var(--yellow); display: grid; place-items: center; width: 24px; height: 24px; flex: none; opacity: 0; transform: translateX(-8px); transition: all .3s var(--ease); }
.post-card:hover h3 .arrow { opacity: 1; transform: none; }
.post-card p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.meta > span { display: inline-flex; align-items: center; gap: 5px; }
.meta > span:first-child { font-family: var(--mono); letter-spacing: .04em; }

/* ---------- 文章页 ---------- */
#read-progress { position: fixed; top: 0; left: var(--rail); right: 0; width: auto; height: 4px; z-index: 40; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }
.article { max-width: 800px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 4px 10px 4px 6px; border: 1px solid var(--border-strong); }
.back:hover { color: var(--chip-fg); background: var(--chip-bg); border-color: var(--chip-bg); }
.back svg { transition: transform .25s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.article h1.title { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.15; margin: 26px 0 16px; text-transform: uppercase; letter-spacing: .01em; }
.article h1.title::after { content: ""; display: block; width: 140px; height: 4px; margin-top: 18px; background: var(--tri); }
.prose { font-size: 16.5px; line-height: 1.9; overflow-wrap: break-word; color: var(--text-2); }
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.3; margin: 2em 0 .7em; color: var(--text); text-transform: uppercase; }
.prose h2 { font-size: 24px; display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.prose h2::before { content: ""; width: 12px; height: 12px; background: var(--yellow); box-shadow: 0 0 0 1px var(--ink); flex: none; }
.prose h3 { font-size: 19px; }
.prose h3::before { content: "// "; color: var(--muted); }
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--text); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.prose a { color: var(--text); background: linear-gradient(transparent 64%, var(--yellow) 64%); }
:root:not([data-theme="light"]) .prose a { background: none; color: var(--yellow); border-bottom: 1px solid var(--yellow); }
.prose a:hover, :root:not([data-theme="light"]) .prose a:hover { background: var(--yellow); color: var(--on-yellow); }
.prose img { max-width: 100%; border: 1px solid var(--border); }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--card-2); border: 1px solid var(--border); padding: 1px 6px; color: var(--text); }
.prose pre { background: var(--bg-2); border: 1px solid var(--border); border-left: 4px solid var(--yellow); padding: 16px 18px; overflow-x: auto; position: relative; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.7; }
.prose pre .copy-code { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .2s; }
.prose pre:hover .copy-code { opacity: 1; }
.prose blockquote { margin: 0 0 1.1em; padding: 10px 20px; border-left: 4px solid var(--ink); background: var(--hatch), var(--card-2); color: var(--text-2); }
.prose blockquote p { margin: .5em 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .25em 0; }
.prose ul > li { list-style: square; }
.prose li::marker { color: var(--text); font-weight: 800; }
.prose hr { border: 0; height: 3px; background: var(--tri); margin: 2.4em 0; width: 200px; }
/* 表格本身是横向滚动容器；合并边框有一半落在单元格外，留 1px 内边距避免最外圈边框被裁掉 */
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.1em; font-size: 14px; display: block; overflow-x: auto; padding: 1px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--chip-bg); color: var(--chip-fg); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }

/* ---------- 探针 ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 6px 0 26px; counter-reset: tile; }
.summary .tile { min-height: 124px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--border); background: var(--hatch), var(--card); }
.search { position: relative; flex: 1; min-width: 180px; max-width: 340px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; background: var(--card); }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--border-strong); padding: 2px; gap: 2px; position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.panel > *, .sub-box > * { min-width: 0; }
.seg button { position: relative; z-index: 1; border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; transition: color .2s, background .2s; white-space: nowrap; text-transform: uppercase; }
.seg button:hover { color: var(--text); background: var(--card-2); }
.seg button.on { color: var(--sel-fg); background: var(--sel-bg); }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 14px; }
.srv { padding: 18px 20px 14px; cursor: pointer; position: relative; overflow: hidden; }
/* 顶部三色线（悬停出现） */
.srv::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tri); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); }
.srv:hover::before { transform: none; }
.srv.offline { filter: grayscale(1); opacity: .55; }
.srv.offline::after { content: ""; position: absolute; inset: 0; background: var(--hatch); pointer-events: none; }
.srv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--border-strong); }
.srv-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .03em; }
.srv-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; font-weight: 600; font-family: var(--mono); }
.metric { margin: 11px 0; }
.metric-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-bottom: 6px; }
.metric-top .lbl { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.metric-top .val { font-weight: 800; font-size: 13px; font-family: var(--font); }
.metric-top .val small { font-weight: 600; color: var(--muted); margin-left: 6px; font-size: 11px; }
/* 分段进度条 */
.bar {
  height: 8px; background: var(--bar-bg); overflow: hidden;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
  mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
}
.bar > i { display: block; height: 100%; width: 0; background: var(--bar-fill); transition: width .9s var(--ease), background .4s; }
.bar > i.warn { background: var(--warn); }
.bar > i.crit { background: var(--danger); }
.spark-wrap { position: relative; margin: 14px -20px 0; height: 48px; }
.spark-wrap canvas { width: 100%; height: 100%; display: block; }
.spark-legend { position: absolute; top: 2px; left: 20px; right: 20px; display: flex; justify-content: space-between; font: 700 12px/1.4 var(--mono); pointer-events: none; }
.spark-legend span { display: inline-flex; align-items: center; gap: 4px; }
.srv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.srv-stats div { min-width: 0; padding-left: 8px; border-left: 2px solid var(--border-strong); }
.srv-stats span { display: block; font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.srv-stats b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--blue); }
.down { color: var(--accent); }

.servers.list-view { grid-template-columns: 1fr; gap: 8px; }
.servers.list-view .srv { display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(90px, 1fr)) minmax(160px, 1.2fr); align-items: center; gap: 20px; padding: 14px 20px; }
.servers.list-view .srv-head { margin: 0; padding: 0; border: 0; }
.servers.list-view .metric { margin: 0; }
.servers.list-view .spark-wrap { margin: 0; height: 40px; }
.servers.list-view .spark-legend { left: 0; right: 0; top: -2px; }
.servers.list-view .srv-stats { display: none; }

/* ---------- 弹窗：游戏内对话框 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 9, .72); backdrop-filter: blur(6px) grayscale(.6); -webkit-backdrop-filter: blur(6px) grayscale(.6); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade-in .25s var(--ease); }
.modal[hidden] { display: none; }
.modal.closing { animation: fade-out .2s var(--ease) forwards; }
.modal.closing .modal-box { animation: pop-out .2s var(--ease) forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.modal-box {
  --cm: var(--ink);
  width: 100%; max-width: 920px; padding: 40px 28px 28px; position: relative; animation: pop .35s var(--ease);
  background:
    linear-gradient(var(--cm), var(--cm)) 0 0 / 16px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 0 / 2px 16px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 16px 2px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 2px 16px no-repeat,
    var(--card-solid);
  border-color: var(--border-strong); box-shadow: var(--shadow-pop);
}
/* 顶部：黄色块 + 斜纹条 */
.modal-box::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: linear-gradient(90deg, var(--yellow) 0 64px, transparent 64px), var(--hatch-strong);
  border-bottom: 1px solid var(--border);
}
.modal-box.sm { max-width: 520px; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pop-out { to { transform: translateY(8px); opacity: 0; } }
.modal-close { position: absolute; top: 18px; right: 14px; }
.modal-close:hover { background: var(--yellow) !important; color: var(--on-yellow) !important; }
.modal-box h2, .modal-box h3 { text-transform: uppercase; letter-spacing: .02em; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin: 22px 0; }
/* 「标签 | 值」成对字段 */
.info-grid div { display: flex; align-items: stretch; background: var(--card-2); font-size: 13px; min-width: 0; border: 0; }
.info-grid div span { flex: none; display: grid; place-items: center; min-width: 76px; padding: 6px 8px; background: var(--chip-bg); color: var(--chip-fg); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: center; line-height: 1.25; }
.info-grid div b { font-weight: 600; display: block; padding: 6px 10px; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chart { background: var(--card-2); border: 1px solid var(--border); padding: 12px 14px 8px; position: relative; }
.chart::before { content: ""; position: absolute; left: -1px; top: -1px; width: 22px; height: 3px; background: var(--ink); }
.chart h4 { margin: 0 0 6px; font-size: 12px; font-weight: 800; display: flex; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: .1em; }
.chart h4 small { color: var(--muted); font: 700 11.5px var(--mono); letter-spacing: 0; }
.chart canvas { width: 100%; height: 160px; display: block; cursor: crosshair; }
.tip { position: absolute; pointer-events: none; z-index: 2; padding: 7px 11px; font-size: 12px; white-space: nowrap; background: var(--card-solid); border: 1px solid var(--ink); box-shadow: inset 3px 0 0 var(--yellow), 0 10px 28px -10px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s; }
.tip.show { opacity: 1; }
.tip i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }

/* ---------- 管理 ---------- */
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.side { padding: 8px 0; position: sticky; top: 24px; counter-reset: side; }
.side::before { content: "// CONSOLE"; display: block; padding: 4px 16px 10px; font: 700 10.5px/1 var(--mono); letter-spacing: .16em; color: var(--muted); }
.side a { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 16px; color: var(--muted); font-weight: 700; font-size: 13.5px; transition: background .2s, color .2s; text-transform: uppercase; letter-spacing: .05em; counter-increment: side; }
.side a::after { content: "0" counter(side); margin-left: auto; font: 600 10px var(--mono); opacity: .55; }
.side a:hover { background: var(--card-2); color: var(--text); }
.side a.active { background: var(--sel-bg); color: var(--sel-fg); }
.side a.active::before { content: ""; position: absolute; right: 0; top: 0; width: 0; height: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent var(--bg) transparent transparent; }
.side a svg { font-size: 17px; }
.side hr { border: 0; border-top: 1px dashed var(--border-strong); margin: 8px 12px; }
.panel { display: grid; gap: 18px; min-width: 0; }
.panel h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .04em; }
.panel h3 svg { color: var(--on-yellow); background: var(--yellow); padding: 4px; width: 26px; height: 26px; }
.panel .desc { margin: 0 0 18px; font-size: 13px; color: var(--muted); padding-left: 36px; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.list th { text-align: left; font-weight: 700; color: var(--muted); font-size: 10.5px; padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tbody tr { transition: background .2s, box-shadow .2s; }
table.list tbody tr:hover { background: var(--card-2); box-shadow: inset 3px 0 0 var(--yellow); }
table.list tr:last-child td { border-bottom: 0; }
.cell-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.sub-box { display: grid; grid-template-columns: 1fr 184px; gap: 24px; align-items: start; }
.qr {
  --cm: var(--ink);
  background:
    linear-gradient(var(--cm), var(--cm)) 0 0 / 18px 3px no-repeat, linear-gradient(var(--cm), var(--cm)) 0 0 / 3px 18px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 0 / 18px 3px no-repeat, linear-gradient(var(--cm), var(--cm)) 100% 0 / 3px 18px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 0 100% / 18px 3px no-repeat, linear-gradient(var(--cm), var(--cm)) 0 100% / 3px 18px no-repeat,
    linear-gradient(var(--cm), var(--cm)) 100% 100% / 18px 3px no-repeat, linear-gradient(var(--cm), var(--cm)) 100% 100% / 3px 18px no-repeat,
    #fff;
  padding: 14px; width: 184px; height: 184px; transition: opacity .25s;
}
.qr svg { width: 100%; height: 100%; display: block; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor textarea { min-height: 480px; height: 100%; }
.editor .preview { min-height: 480px; max-height: 72vh; overflow-y: auto; padding: 18px 22px; background: var(--bg-2); border: 1px solid var(--border); }
.login { max-width: 420px; margin: 7vh auto; text-align: left; }
.login .logo { width: 60px; height: 60px; margin: 0 0 22px; }
.login h2 { text-transform: uppercase; font-size: 32px; letter-spacing: .02em; }
.login h2::before { content: "↘ ACCESS"; display: block; width: max-content; margin-bottom: 10px; padding: 0 10px 0 8px; background: var(--ink); color: var(--bg); font: 700 12px/22px var(--font); letter-spacing: .14em; }
.login form { text-align: left; }
.login form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tri); }

/* ---------- Toast：黑色通知条 ---------- */
.toasts { position: fixed; left: calc(50% + var(--rail) / 2); bottom: 26px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; background: #111; color: #f3f3f1; border: 1px solid rgba(255, 255, 255, .14); border-left: 5px solid var(--yellow); padding: 11px 18px 11px 14px; font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .7); animation: toast-in .4s var(--ease); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.toast svg { color: var(--yellow); font-size: 17px; }
.toast.err { border-left-color: var(--danger); }
.toast.err svg { color: var(--danger); }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding-top: 24px; }
  .servers.list-view .srv { grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(70px, 1fr)); }
  .servers.list-view .spark-wrap { display: none; }
  .hud { width: 520px; height: 520px; right: -200px; top: -200px; }
}
@media (max-width: 860px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .admin { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; gap: 2px; padding: 4px; }
  .side::before, .side a::after { display: none; }
  .side a { white-space: nowrap; }
  .side hr { display: none; }
  .charts, .editor, .grid-2, .posts.grid { grid-template-columns: 1fr; }
  .editor .preview { display: none; }
  .sub-box { grid-template-columns: 1fr; }
}
/* 手机：竖向导航栏改为顶部横条 */
@media (max-width: 680px) {
  :root { --rail: 0px; }
  body { padding-left: 0; }
  .hud { display: none; }
  .topbar { position: sticky; bottom: auto; width: auto; height: 56px; border-right: 0; border-bottom: 1px solid var(--border); }
  .topbar-in { flex-direction: row; align-items: center; padding: 0 4px 0 10px; }
  .brand { flex-direction: row; gap: 10px; padding: 0; min-width: 0; flex: 1; }
  .logo { width: 34px; height: 34px; }
  #site-title { writing-mode: horizontal-tb; font-size: 14px; max-width: 130px; letter-spacing: .06em; }
  .nav-right { flex: none; flex-direction: row; align-items: center; }
  .nav-right::after { display: none; }
  nav#nav { flex-direction: row; padding: 0; border: 0; }
  nav#nav a { height: 56px; margin: 0; padding: 0 9px; gap: 3px; font-size: 10.5px; }
  nav#nav a svg { font-size: 19px; }
  nav#nav a::after { display: none; }
  nav#nav a.active::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; }
  .nav-sep { display: none; }
  .topbar .icon-btn { width: 36px; height: 36px; margin: 0 0 0 4px; }
  #read-progress { left: 0; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 26px; }
  .servers { grid-template-columns: 1fr; }
  .tiles { gap: 10px; padding: 12px 0 0 12px; }
  .tile { padding: 14px; min-height: 118px; }
  .tile .tv { font-size: 23px; margin-top: 34px; }
  .tile .ticon { font-size: 36px; right: 10px; bottom: 10px; }
  html.intro .topbar { animation-name: sp-rail-top; }
  .splash::before { left: 16px; top: 18px; }
  .splash::after { left: 16px; bottom: 22px; width: 96px; }
  .sp-skip { right: 16px; bottom: 18px; }
  .gb { margin-left: 12px; margin-top: 10px; }
  .gb-sig { display: none; }
  .gb-head .gb-chev { margin-left: auto; }
  .gb-form { flex-wrap: wrap; }
  .gb-form #gb-name { flex: 1 1 100%; }
  .pill-label { font-size: 11px; padding: 5px 8px 5px 6px; }
  .hero h1 { font-size: 44px; }
  .hero > div:first-child::before { content: "[ FIELD TERMINAL ]"; }
  .stat .v { font-size: 17px; }
  .hide-sm { display: none; }
  .toolbar .search { flex: 1 1 100%; max-width: none; }
  .servers.list-view .srv { grid-template-columns: 1fr 1fr; }
  .servers.list-view .srv-head { grid-column: 1 / -1; }
  .post-card { padding: 18px; gap: 14px; }
  .post-card .pic { width: 40px; height: 40px; font-size: 19px; }
  .post-card::after { font-size: 54px; right: 10px; -webkit-text-stroke-color: var(--border); }
  .title-c { margin-top: 60px; }
  .footer-in { padding: 22px 16px 24px; }
  .footer-in::after { display: none; }
  .toasts { left: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
