/* ═══════════════════════════════════════════════════════════════════════
   prtools 共享主题 —— 两个站点、所有页面唯一的颜色/字体/基础控件来源。
   页面里【不许】再自定义颜色和字体;需要新语义色先加在这里。
   主题:暗橄榄绿(默认) / 亮色(html[data-theme="light"]),由 theme.js 按 localStorage 切换。
   字体:Saira(界面/标题) + IBM Plex Mono(数字/日志/代码),
        ★0903 从 Saira Condensed 换成正常宽度的 Saira:压缩体是给窄栏省地方的,
        我们的表本来就不缺横向空间,压得只剩"又小又挤"(站主原话)。基准字号同时 14 -> 15px。
        中文回退 PingFang SC / HarmonyOS Sans SC / MiSans / Microsoft YaHei。
   字体文件由 theme.js 非阻塞注入(国内 fonts.googleapis 被墙时 @import 会卡首屏,所以这里不 @import)。
   ═══════════════════════════════════════════════════════════════════════ */

:root, html[data-theme="dark"] {
  /* 面 */
  --bg: #101408;        /* 页面底 */
  --panel: #171d0e;     /* 卡片/面板 */
  --panel2: #1d2413;    /* 面板内的次级面 / 表头 / 悬停 */
  --line: #2c3520;      /* 分隔线、边框 */
  --bar: rgba(16, 20, 8, .975);   /* 顶栏(半透) */
  /* 字 */
  --ink: #d8dcc4;       /* 正文 */
  --dim: #7d8567;       /* 次要文字、标签 */
  /* 强调 */
  --accent: #b6c22e;    /* 品牌色:按钮、选中、链接 */
  --acc-ink: #101408;   /* 强调色上的文字 */
  /* 语义色(与强调色分开,不拿来当装饰) */
  --ok: #8fbf4a;        /* 通过 / 在线 / 正常 */
  --warn: #d7a52b;      /* 注意 / 待办 */
  --bad: #d4593f;       /* 错误 / 违规 / 封禁 */
  --blu: #5aa3d9;       /* 蓝队 / 信息 */
  --red: #d9695a;       /* 红队 */
  /* 遮罩:左实右透,右侧透出地图(主站回合卡片用) */
  --ov1: rgba(23, 29, 14, .97);
  --ov2: rgba(23, 29, 14, .35);
  --tagl: 68%;          /* 彩色标签文字亮度 */
  /* 形 */
  --r: 12px;            /* 大圆角(卡片) */
  --r-s: 4px;           /* 小圆角(按钮/标签/输入框) */
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  /* 字体族 */
  --font: "Saira", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, "PingFang SC", "Microsoft YaHei", monospace;
  /* 兼容别名(老页面用过的名字,新代码用上面的正名) */
  --acc: var(--accent);
  --no: var(--bad);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #eee9db; --panel: #f8f5ec; --panel2: #e8e2cf; --line: #cfc6ab;
  --bar: rgba(248, 245, 236, .98);
  --ink: #2c2817; --dim: #877e5f;
  --accent: #6d7d17; --acc-ink: #fdfcf7;
  --ok: #4a7a1c; --warn: #966a06; --bad: #a83a20; --blu: #2e6da4; --red: #b0472f;
  --ov1: rgba(248, 245, 236, .97); --ov2: rgba(248, 245, 236, .4);
  --tagl: 30%;
  --shadow: 0 8px 24px rgba(60, 50, 20, .18);
  color-scheme: light;
}

/* ── 基础 ─────────────────────────────────────────────────────────── */
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: .01em; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: .93em; }
pre { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; overflow-x: auto; }
hr { border: 0; border-top: 1px solid var(--line); }
::selection { background: var(--accent); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* ── 面板 / 卡片 ───────────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel2 { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-s); }

/* ── 控件 ─────────────────────────────────────────────────────────── */
button, .btn, input, select, textarea { font-family: var(--font); font-size: 13.5px; color: var(--ink); }
.btn, button.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--panel2); color: var(--ink); cursor: pointer; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 500;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--acc-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--acc-ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
input[type="text"], input[type="search"], input[type="number"], input[type="password"], select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 5px 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }

/* ── 标签 / 状态 ──────────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: 1px 7px; font-size: 10px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  border: 1px solid var(--line); background: var(--panel2); color: var(--dim);
}
.tag.ok { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tag.warn { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tag.bad { color: var(--bad); border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tag.acc { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dim { color: var(--dim); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }

/* ── 表格 ─────────────────────────────────────────────────────────── */
table.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--dim); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel2); position: sticky; top: 0; }
table.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl tr:hover td { background: var(--panel2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── 顶栏 ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; background: var(--bar); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
}
.topbar .brand { font-weight: 700; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.topbar .brand:hover { color: var(--accent); text-decoration: none; }
.topbar .sp { flex: 1; }

/* ── 动画礼貌 ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
