/* ===================================================================
   纪念碑汉化组 官方网站 · 样式表
   配色取自 logo：羊毛方块彩色 + 金色「纪念碑」+ 蓝色「汉化组」

   主题：:root 为夜间模式（默认），[data-theme="light"] 为日间模式。
   切换逻辑在 public/js/theme.js，按钮位于顶栏「＋」左侧。
   =================================================================== */

:root {
  color-scheme: dark;

  /* 底色与面板 */
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --panel: #191d26;
  --panel-2: #1f2430;
  --line: #2a303d;
  --line-soft: #232936;

  /* 文字 */
  --text: #e8ecf3;
  --text-dim: #9aa4b5;
  --text-mute: #868f9f;
  --text-body: #dde3ec;

  /* 主色 */
  --gold: #f0b03f;
  --gold-soft: #ffd479;
  --gold-border: rgba(240, 176, 63, 0.4);
  --gold-tint: rgba(240, 176, 63, 0.1);
  --gold-tint-strong: rgba(240, 176, 63, 0.16);
  --gold-tint-soft: rgba(240, 176, 63, 0.05);
  --blue: #4a8cf7;
  --blue-text: #8ab8ff;
  --blue-border: rgba(74, 140, 247, 0.35);
  --blue-tint: rgba(74, 140, 247, 0.1);
  --blue-tint-strong: rgba(74, 140, 247, 0.16);
  --green: #3fd07a;
  --green-border: rgba(63, 208, 122, 0.35);
  --green-tint: rgba(63, 208, 122, 0.08);
  --red: #ef5f68;
  --red-tint: rgba(239, 95, 104, 0.1);
  --red-border: rgba(239, 95, 104, 0.4);

  /* 渐变（按钮 / 选中态） */
  --grad-from: #ffd479;
  --grad-to: #f0b03f;
  --grad-text: #14202f;
  --grad-border: #b8801f;
  --blue-grad-from: #6ba3ff;
  --blue-grad-to: #4a8cf7;
  --blue-grad-text: #08152b;
  --blue-grad-border: #2f6bd0;

  /* 特殊区域 */
  --topbar-bg: rgba(0, 0, 0, 0.86);
  --footer-bg: rgba(0, 0, 0, 0.6);
  --toast-bg: rgba(25, 29, 38, 0.97);
  --overlay: rgba(5, 6, 9, 0.92);
  --cover-bg: linear-gradient(135deg, #232936, #171b23);
  --cover-badge-bg: rgba(10, 12, 16, 0.78);
  --media-bg: #0b0d11;
  --code-bg: #0b0d11;
  --logo-bg: #ffffff;
  --chip-hover-border: #3b4457;
  --hover-border: rgba(240, 176, 63, 0.55);
  --hover-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  --focus-ring: rgba(240, 176, 63, 0.12);
  --skeleton-1: #1b202a;
  --skeleton-2: #232936;

  /* 星标 */
  --star-on: #f5c542;
  --star-empty: #4a5262;
  --star-glow: rgba(245, 197, 66, 0.45);

  /* 提示条文字色 */
  --toast-ok-text: #b6f2cd;
  --toast-err-text: #ffc9cd;
  --toast-ok-border: rgba(63, 208, 122, 0.6);
  --toast-err-border: rgba(239, 95, 104, 0.6);

  /* 页面光晕 */
  --glow-gold: rgba(240, 176, 63, 0.09);
  --glow-blue: rgba(74, 140, 247, 0.1);
  --hero-glow-gold: rgba(240, 176, 63, 0.13);
  --hero-glow-blue: rgba(74, 140, 247, 0.14);
  --logo-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, 0.4);
  --hero-logo-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --maxw: 1280px;
}

/* ------------------------------ 日间模式 ------------------------------ */

[data-theme='light'] {
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --panel: #ffffff;
  --panel-2: #f4f6fb;
  --line: #d7deeb;
  --line-soft: #e5eaf3;

  --text: #1a2130;
  --text-dim: #4c5769;
  --text-mute: #66707f;
  --text-body: #2c3444;

  --gold: #dfa01f;
  --gold-soft: #9c6a06;
  --gold-border: rgba(190, 137, 22, 0.42);
  --gold-tint: rgba(223, 160, 31, 0.14);
  --gold-tint-strong: rgba(223, 160, 31, 0.2);
  --gold-tint-soft: rgba(223, 160, 31, 0.08);
  --blue: #2f6fd0;
  --blue-text: #2a62bd;
  --blue-border: rgba(47, 111, 208, 0.32);
  --blue-tint: rgba(47, 111, 208, 0.1);
  --blue-tint-strong: rgba(47, 111, 208, 0.16);
  --green: #17803f;
  --green-border: rgba(23, 128, 63, 0.32);
  --green-tint: rgba(23, 128, 63, 0.1);
  --red: #cf3346;
  --red-tint: rgba(207, 51, 70, 0.09);
  --red-border: rgba(207, 51, 70, 0.34);

  --grad-from: #f7ca6c;
  --grad-to: #e3a327;
  --grad-text: #3a2a06;
  --grad-border: #c1851a;
  --blue-grad-from: #5e9bf0;
  --blue-grad-to: #2f6fd0;
  --blue-grad-text: #ffffff;
  --blue-grad-border: #2760b8;

  --topbar-bg: rgba(255, 255, 255, 0.92);
  --footer-bg: rgba(250, 250, 250, 0.92);
  --toast-bg: rgba(255, 255, 255, 0.98);
  --overlay: rgba(28, 34, 46, 0.86);
  --cover-bg: linear-gradient(135deg, #e8edf6, #dde4f0);
  --cover-badge-bg: rgba(255, 255, 255, 0.86);
  --media-bg: #eef1f7;
  --code-bg: #f5f7fc;
  --logo-bg: #ffffff;
  --chip-hover-border: #b9c3d6;
  --hover-border: rgba(190, 137, 22, 0.55);
  --hover-shadow: 0 16px 30px rgba(26, 40, 70, 0.14);
  --focus-ring: rgba(223, 160, 31, 0.18);
  --skeleton-1: #e8ecf4;
  --skeleton-2: #f2f5fa;

  /* 星标 */
  --star-on: #eaa716;
  --star-empty: #d3d9e4;
  --star-glow: rgba(234, 167, 22, 0.35);


  --toast-ok-text: #12693a;
  --toast-err-text: #a32333;
  --toast-ok-border: rgba(23, 128, 63, 0.5);
  --toast-err-border: rgba(207, 51, 70, 0.5);

  --glow-gold: rgba(223, 160, 31, 0.12);
  --glow-blue: rgba(47, 111, 208, 0.1);
  --hero-glow-gold: rgba(223, 160, 31, 0.16);
  --hero-glow-blue: rgba(47, 111, 208, 0.12);
  --logo-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(26, 40, 70, 0.12);
  --hero-logo-shadow: 0 16px 34px rgba(26, 40, 70, 0.16);

  --shadow: 0 8px 26px rgba(26, 40, 70, 0.1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------- 右下角悬浮球（工具箱） ---------------------------- */

/* 容器只占主球大小，其余元素绝对定位 */
.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  z-index: 220;
}

.fab-main {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: linear-gradient(145deg, #f6c85f, #e0a52a);
  color: #201703;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.fab-main:hover { transform: translateY(-2px); }
.fab-main:active { transform: translateY(0) scale(0.96); }
.fab-main svg { transition: transform 0.24s ease; }
/* 展开时加号转成 ×，暗示可以再点一次收起 */
.fab.is-open .fab-main svg { transform: rotate(45deg); }

/* 二级球：身份申请（🖊） */
.fab-item,
.fab-top {
  position: absolute;
  left: 6px;
  bottom: 68px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.15s ease,
    bottom 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-item {
  opacity: 0;
  transform: translateY(26px) scale(0.5);
  pointer-events: none;
}
.fab.is-open .fab-item { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-item:hover { color: var(--gold); border-color: var(--gold-border); }
.fab-item .fab-emoji { font-size: 21px; line-height: 1.1; }
/* 彩蛋球：排在身份申请上方 */
.fab-item.fab-egg { bottom: 124px; }
/* 🖊 是彩色字形：深色主题下给球体一层金色底，保证看得清 */
[data-theme='dark'] .fab-item { background: var(--gold-tint-strong); border-color: var(--gold-border); }
[data-theme='dark'] .fab-item:hover { background: var(--gold-tint); }

/* 回到顶部：默认藏在二级球下方，滚出页面顶部后才出现 */
.fab-top {
  bottom: 68px;
  opacity: 0;
  transform: translateY(14px) scale(0.7);
  pointer-events: none;
}
.fab.is-scrolled .fab-top { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
/* 展开时让出位置，移到「身份申请」上方 */
.fab.is-open .fab-top { bottom: 180px; }
.fab-top:hover { color: var(--gold); border-color: var(--gold-border); }
.fab-top .fab-icon { display: grid; place-items: center; }

/* 二级球左侧的名称气泡：只在展开时出现 */
.fab-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* 气泡右侧的小尖角，指向球体 */
.fab-tip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  margin-top: -5px;
  border: 5px solid transparent;
  border-left-color: var(--panel-2);
}
.fab.is-open .fab-item .fab-tip,
.fab.is-open .fab-top .fab-tip {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (max-width: 720px) {
  .fab { right: 16px; bottom: 16px; }
}
/* ------------------------------ 顶部栏 ------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.brand img {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--logo-bg);
  box-shadow: var(--logo-shadow);
  transition: transform 0.18s ease;
}
.brand:hover img { transform: translateY(-2px) rotate(-2deg); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font-size: 16px; letter-spacing: 0.5px; }
.brand-text small { color: var(--text-mute); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; }

/* 导航默认不换行，保证顶栏在一排内放下 */
.mainnav { display: flex; align-items: center; flex-wrap: nowrap; gap: 3px; flex: 0 1 auto; min-width: 0; }

.mainnav a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: 0.16s ease;
  border: 1px solid transparent;
}
.mainnav a:hover { color: var(--text); background: var(--panel-2); }
.mainnav a.active { color: var(--grad-text); background: linear-gradient(180deg, var(--grad-from), var(--grad-to)); border-color: var(--grad-border); }

.topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }

.reserve {
  padding: 6px 12px;
  margin-left: 4px;
  font-size: 12px;
  color: var(--text-mute);
  border: 1px dashed var(--line);
  border-radius: 999px;
  white-space: nowrap;
  user-select: none;
}

/* 主题切换按钮（顶栏「＋」左侧） */
.theme-toggle { font-size: 17px; }
.theme-toggle:hover { color: var(--gold-soft); }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold);
  font-size: 21px; line-height: 1;
  cursor: pointer;
  transition: 0.16s ease;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--gold); transform: translateY(-1px); }

.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  white-space: nowrap;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--blue), #8a5cf6);
  color: #fff; font-weight: 700; font-size: 13px;
}
.role-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: var(--gold-tint-strong); color: var(--gold-soft);
  border: 1px solid var(--gold-border);
}

/* ------------------------------ 身份组与账号 ------------------------------ */

.role-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: var(--gold-tint-strong); color: var(--gold-soft);
  border: 1px solid var(--gold-border);
}
.role-tag.role-member { background: var(--blue-tint-strong); color: var(--blue-text); border-color: var(--blue-border); }
.role-tag.role-player { background: transparent; color: var(--text-mute); border-color: var(--line); }

.role-badge {
  display: inline-flex; align-items: center;
  padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--gold-tint-strong); color: var(--gold-soft); border: 1px solid var(--gold-border);
}
.role-badge.role-member { background: var(--blue-tint-strong); color: var(--blue-text); border-color: var(--blue-border); }
.role-badge.role-player { background: var(--panel-2); color: var(--text-dim); border-color: var(--line); }

.role-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.role-note {
  margin-top: 16px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--text-dim); line-height: 1.6;
}
.role-note b { color: var(--gold-soft); margin-right: 4px; }

/* 验证码输入行 */
.code-row { display: flex; gap: 9px; }
.code-row input { flex: 1; letter-spacing: 2px; }
.code-row button { white-space: nowrap; }

/* 表单下方的次要链接（忘记密码 / 返回登录） */
.form-links { display: flex; justify-content: center; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.link-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--gold-soft);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--gold); }
.dev-code {
  display: inline-block; margin-top: 6px; padding: 5px 10px; border-radius: 8px;
  background: var(--gold-tint); border: 1px dashed var(--gold-border);
  color: var(--text-dim); font-size: 12.5px;
}
.dev-code b { color: var(--gold-soft); font-size: 15px; letter-spacing: 2px; margin: 0 3px; }

/* 顶栏用户胶囊（现在是按钮） */
button.user-chip { cursor: pointer; transition: 0.16s ease; }
button.user-chip:hover { border-color: var(--gold); }
.user-chip-name { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-img { object-fit: cover; background: var(--panel-2); }

/* ------------------------------ 个人中心 ------------------------------ */

.me-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }

.profile-edit { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.profile-avatar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.profile-avatar input[type='file'] { display: none; }

.avatar-big-holder { display: grid; place-items: center; }
.avatar-big {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--line); background: var(--panel-2);
}
.avatar-big-fallback {
  display: grid; place-items: center;
  font-size: 42px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--blue), #8a5cf6);
}

.mine-list { display: flex; flex-direction: column; gap: 10px; }
.mine-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
  transition: 0.15s ease;
}
.mine-item:hover { border-color: var(--gold); transform: translateX(3px); }
.mine-item img, .mine-noimg {
  width: 74px; height: 44px; border-radius: 7px; object-fit: cover;
  background: var(--cover-bg); display: grid; place-items: center;
  font-size: 11px; color: var(--text-mute);
}
.mine-item b { display: block; font-size: 14px; }
.mine-item .hint { font-size: 12px; }

/* ------------------------------ 用户管理 ------------------------------ */

.user-table { display: flex; flex-direction: column; }
.user-row {
  display: grid; grid-template-columns: 1.3fr 1.5fr 70px 100px 116px;
  gap: 12px; align-items: center;
  padding: 11px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.user-row:last-child { border-bottom: 0; }
.user-row-head { color: var(--text-mute); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.user-cell-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-cell-name .avatar { flex: 0 0 auto; }
.user-cell-email { color: var(--text-dim); overflow-wrap: anywhere; }
.self-tag {
  font-size: 11px; padding: 0 6px; border-radius: 5px;
  background: var(--blue-tint-strong); color: var(--blue-text); border: 1px solid var(--blue-border);
}
select.role-select { width: auto; padding: 5px 10px; font-size: 13px; }

/* ------------------------------ 布局 ------------------------------ */

.view { max-width: var(--maxw); margin: 0 auto; padding: 30px 22px 70px; min-height: 62vh; }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.section-title h2 { margin: 0; font-size: 21px; }
.section-title span { color: var(--text-mute); font-size: 13px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ------------------------------ 主页 ------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 46px;
  align-items: center;
  padding: 48px;
  margin-bottom: 40px;
  background:
    radial-gradient(600px 300px at 8% 20%, var(--hero-glow-gold), transparent 65%),
    radial-gradient(600px 320px at 92% 80%, var(--hero-glow-blue), transparent 65%),
    var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-logo {
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  background: var(--logo-bg);
  padding: 10px;
  box-shadow: var(--hero-logo-shadow);
}

.hero-right h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: 1px; }
.hero-right .hero-sub { color: var(--text-dim); margin: 0 0 26px; }

.stat-big { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.stat-num {
  font-size: 76px; font-weight: 800; line-height: 1;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 19px; color: var(--text); font-weight: 600; }
.stat-hint { color: var(--text-mute); font-size: 13.5px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.stat-cell { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 13px 16px; }
.stat-cell b { display: block; font-size: 22px; }
.stat-cell span { color: var(--text-mute); font-size: 12.5px; }

.quick-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--gold); color: var(--gold-soft); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--grad-from), var(--grad-to));
  color: var(--grad-text); border-color: var(--grad-border);
}
.btn-primary:hover { color: var(--grad-text); filter: brightness(1.06); }

.btn-blue { background: linear-gradient(180deg, var(--blue-grad-from), var(--blue-grad-to)); color: var(--blue-grad-text); border-color: var(--blue-grad-border); }
.btn-blue:hover { color: var(--blue-grad-text); }
.btn-danger { color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red-tint); color: var(--red); border-color: var(--red); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: transparent; }

/* ------------------------------ 筛选区 ------------------------------ */

.maps-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }

.filter-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.filter-label { color: var(--text-mute); font-size: 12.5px; margin-right: 2px; }

.chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: 0.14s ease;
}
.chip:hover { color: var(--text); border-color: var(--chip-hover-border); }
.chip.active { background: var(--gold-tint-strong); color: var(--gold-soft); border-color: var(--gold-border); }
.chip-more { border-style: dashed; color: var(--text-mute); }

/* ---------------------------- 筛选区（可折叠） ---------------------------- */

.filters-row { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; margin-bottom: 22px; }

.filter-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-head strong { font-size: 13.5px; color: var(--text-dim); font-weight: 600; }
.filter-summary { color: var(--text-mute); font-size: 12.5px; flex: 1; min-width: 120px; }
.filter-toggle { margin-left: auto; flex: 0 0 auto; }
.filter-body { display: flex; flex-direction: column; gap: 14px; }
/* display:flex 会覆盖 hidden 属性，必须显式声明 */
.filter-body[hidden] { display: none; }
.filters-row.is-collapsed { padding-bottom: 14px; }
.filters-row.is-collapsed .filter-head { margin-bottom: 0; }

/* ---------------------------- 分页器 ---------------------------- */

.pager { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 26px; }
.pager:empty { display: none; }
.pager-info { color: var(--text-mute); font-size: 13px; margin-right: 6px; }
.pager-btn {
  min-width: 38px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: 0.14s ease;
}
.pager-btn:hover:not(:disabled) { color: var(--text); border-color: var(--chip-hover-border); }
.pager-btn.active { background: var(--gold-tint-strong); color: var(--gold-soft); border-color: var(--gold-border); font-weight: 600; }
.pager-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.pager-gap { color: var(--text-mute); padding: 0 2px; }

.search-box { position: relative; margin-left: auto; }
.search-box input {
  width: 230px;
  padding: 8px 14px 8px 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
}
.search-box input:focus { border-color: var(--gold); }
/* 放大镜图标：用 mask 画矢量图形，颜色跟随主题（聚焦时变金色） */
.search-box::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  background-color: var(--text-mute);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
  pointer-events: none;
  transition: background-color 0.15s ease;
}
.search-box:focus-within::before { background-color: var(--gold-soft); }

.toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

select, input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  width: 100%;
  transition: 0.15s ease;
}
select:focus, input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--focus-ring); }
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { color: var(--text-mute); font-size: 12px; margin-top: 5px; }

/* ------------------------------ 地图卡片 ------------------------------ */

.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px; }

.map-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: 0.18s ease;
}
.map-card:hover { transform: translateY(-4px); border-color: var(--hover-border); box-shadow: var(--hover-shadow); }

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cover-bg);
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.map-card:hover .cover img { transform: scale(1.05); }
.cover-empty { display: grid; place-items: center; height: 100%; color: var(--text-mute); font-size: 13px; }
.cover-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px; font-size: 12px; border-radius: 999px;
  background: var(--cover-badge-bg); border: 1px solid var(--line);
  color: var(--gold-soft);
}

.map-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.map-card-body h3 { margin: 0; font-size: 17px; }
.map-card-body .en { color: var(--text-mute); font-size: 12px; letter-spacing: 0.4px; margin-top: -6px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 7px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim);
}
.tag.gold { color: var(--gold-soft); border-color: var(--gold-border); background: var(--gold-tint); }
.tag.green { color: var(--green); border-color: var(--green-border); background: var(--green-tint); }
.tag.blue { color: var(--blue-text); border-color: var(--blue-border); background: var(--blue-tint); }

.map-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--text-mute); font-size: 12px; }

/* ------------------------------ 详情页 ------------------------------ */

.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 26px; align-items: start; }

.media-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); background: #000; }
.media-frame iframe, .media-frame > img { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; object-fit: cover; background: var(--media-bg); }
.media-switch { display: flex; gap: 8px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line-soft); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.media-switch button {
  padding: 5px 13px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim); font-size: 13px;
}
.media-switch button.active { color: var(--grad-text); background: linear-gradient(180deg, var(--grad-from), var(--grad-to)); border-color: var(--grad-border); }

.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img {
  width: 108px; height: 62px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--line); cursor: pointer; opacity: 0.72; transition: 0.15s ease;
}
.thumbs img:hover { opacity: 1; }
.thumbs img.active { border-color: var(--gold); opacity: 1; }

.info-panel { padding: 22px 22px 20px; }
.info-panel .name-en { color: var(--text-mute); font-size: 13.5px; letter-spacing: 0.6px; margin-bottom: 4px; }
.info-panel h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.25; }
.info-author { color: var(--green); font-weight: 600; margin-bottom: 16px; font-size: 14.5px; }
.info-author span { color: var(--text-mute); font-weight: 400; }


.info-table { border-top: 1px solid var(--line-soft); }
.info-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.info-row .k { color: var(--text-mute); width: 88px; flex: 0 0 88px; }
.info-row .v { color: var(--text); }

.downloads { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.dl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
  transition: 0.15s ease;
}
.dl-item:hover { border-color: var(--gold); transform: translateX(3px); }
.dl-kind { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--blue-tint-strong); color: var(--blue-text); border: 1px solid var(--blue-border); }
.dl-kind.original { background: rgba(154, 164, 181, 0.14); color: var(--text-dim); border-color: var(--line); }
.dl-label { flex: 1; font-size: 13.5px; }
.dl-arrow { color: var(--text-mute); }

.admin-bar { display: flex; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* ------------------------------ 简介 ------------------------------ */

.tabs { margin-top: 34px; }
.tab-head { display: flex; gap: 8px; margin-bottom: 0; }
.tab-head button {
  padding: 10px 26px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-soft); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-dim); font-weight: 600;
}
.tab-head button.active { background: var(--panel-2); color: var(--gold-soft); }
.tab-body { border: 1px solid var(--line-soft); border-radius: 0 var(--radius) var(--radius) var(--radius); background: var(--panel); padding: 26px 30px; }

.markdown { line-height: 1.85; color: var(--text-body); overflow-wrap: anywhere; }
.markdown h1, .markdown h2, .markdown h3 { margin: 26px 0 12px; line-height: 1.3; }
.markdown h1 { font-size: 25px; border-bottom: 1px solid var(--line-soft); padding-bottom: 9px; }
.markdown h2 { font-size: 21px; }
.markdown h3 { font-size: 17px; }
.markdown p { margin: 12px 0; }
.markdown ul, .markdown ol { padding-left: 24px; margin: 12px 0; }
.markdown li { margin: 5px 0; }
.markdown a { color: var(--blue-text); text-decoration: underline; }
.markdown code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; font-family: Consolas, Monaco, monospace; }
.markdown pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow: auto; }
.markdown pre code { background: none; border: 0; padding: 0; }
.markdown blockquote { margin: 14px 0; padding: 6px 18px; border-left: 3px solid var(--gold); background: var(--gold-tint-soft); color: var(--text-dim); }
.markdown img { border-radius: var(--radius-sm); margin: 14px 0; }
.markdown hr { border: 0; border-top: 1px solid var(--line-soft); margin: 24px 0; }
.markdown table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* ------------------------------ 表单页 / 上传页 ------------------------------ */

.page-narrow { max-width: 640px; margin: 40px auto; padding: 34px 36px; }
.page-narrow h2 { margin: 0 0 6px; }
.page-narrow .sub { color: var(--text-mute); margin: 0 0 24px; font-size: 13.5px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.panel { padding: 24px 26px; }
.panel h3 { margin: 0 0 16px; font-size: 16px; color: var(--gold-soft); }
.panel + .panel { margin-top: 20px; }

.dl-row { display: grid; grid-template-columns: 120px 1fr 1.4fr 40px; gap: 9px; margin-bottom: 9px; align-items: center; }
.dl-row select { width: 100%; }
.dl-row .del {
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--red);
}
.dl-row .del:hover { border-color: var(--red); background: var(--red-tint); }

.preview-img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-top: 10px; }
.shot-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.shot-item { position: relative; }
.shot-item img { width: 96px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.shot-item button {
  position: absolute; top: -7px; right: -7px;
  width: 21px; height: 21px; border-radius: 50%; cursor: pointer;
  background: var(--red); color: #fff; border: 0; font-size: 12px; line-height: 1;
}

.tax-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.tax-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px;
}
.tax-item button { background: none; border: 0; color: var(--text-mute); cursor: pointer; font-size: 14px; padding: 0 2px; }
.tax-item button:hover { color: var(--red); }
.tax-add { display: flex; gap: 7px; margin-bottom: 18px; }
.tax-add input { flex: 1; padding: 6px 11px; font-size: 13px; }

.file-drop {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s ease;
}
.file-drop:hover, .file-drop.over { border-color: var(--gold); color: var(--gold-soft); background: var(--gold-tint-soft); }
.file-drop input { display: none; }

/* ------------------------------ 空状态 / 提示 ------------------------------ */

.empty { text-align: center; padding: 66px 20px; color: var(--text-mute); }
.empty .big { font-size: 44px; margin-bottom: 12px; }
.empty h3 { color: var(--text); margin: 0 0 8px; }

.toast {
  position: fixed; left: 50%; bottom: 38px; transform: translateX(-50%);
  padding: 11px 22px; border-radius: 999px; z-index: 200;
  background: var(--toast-bg); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-size: 14px;
  animation: toastIn 0.22s ease;
}
.toast.ok { border-color: var(--toast-ok-border); color: var(--toast-ok-text); }
.toast.err { border-color: var(--toast-err-border); color: var(--toast-err-text); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: var(--overlay);
  display: grid; place-items: center; padding: 40px; cursor: zoom-out;
}
/* display:grid 会覆盖 hidden 属性的默认 display:none，必须显式关掉 */
.lightbox[hidden] { display: none; }
.toast[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; border-radius: 10px; }

.skeleton { background: linear-gradient(90deg, var(--skeleton-1), var(--skeleton-2), var(--skeleton-1)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 240px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------ 页脚 ------------------------------ */

.footer { border-top: 1px solid var(--line-soft); background: var(--footer-bg); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 22px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--logo-bg); padding: 3px; }
.footer-title { margin: 0; font-weight: 700; }
.footer-sub { margin: 0; color: var(--text-mute); font-size: 12.5px; }
.footer-note { margin: 0 0 0 auto; color: var(--text-mute); font-size: 12.5px; }

/* ------------------------------ 全局搜索 ------------------------------ */

.global-search {
  display: flex; align-items: center; gap: 0;
  flex: 0 1 210px; min-width: 92px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 4px 2px 12px;
  transition: 0.16s ease;
}
.global-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--focus-ring); }
.global-search input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  padding: 6px 0; font-size: 13.5px;
}
.global-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.global-search button {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 50%;
  cursor: pointer; font-size: 13px; color: var(--text-dim);
}
.global-search button:hover { background: var(--panel-2); color: var(--gold-soft); }

/* ------------------------------ 栏目说明 / 上传提示 ------------------------------ */

.section-desc { color: var(--text-mute); margin: -12px 0 16px; font-size: 13.5px; }

.board-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 11px 16px; margin-bottom: 16px;
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13px;
}

/* ------------------------------ 主页随机推荐位 ------------------------------ */

/* d 版：左文字（宽）+ 右随机推荐（窄） */
.hero-home { grid-template-columns: 1fr minmax(290px, 380px); }

.rec-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rec-label { font-size: 12.5px; color: var(--gold-soft); font-weight: 600; letter-spacing: 0.5px; }
.rec-body { cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.rec-body:hover .rec-title { color: var(--gold-soft); }
.rec-cover { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.rec-title { margin: 0; font-size: 17px; transition: 0.15s ease; }
.rec-foot { display: flex; gap: 8px; }

.team-slogan {
  margin: 0 0 22px; font-size: 16px; color: var(--gold-soft);
  letter-spacing: 0.5px; font-weight: 600;
}
.stat-grid-5 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stat-cell em { display: block; color: var(--text-mute); font-size: 11.5px; font-style: normal; margin-top: 2px; }
.stat-cell span { color: var(--text-dim); font-size: 12.5px; }

/* 右下角身份申请入口 */
/* ------------------------------ 身份申请页 ------------------------------ */

.qq-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; margin: 16px 0;
  background: var(--panel-2); border: 1px solid var(--blue-border); border-radius: var(--radius-sm);
}
.qq-label { color: var(--text-mute); font-size: 13px; }
.qq-number { font-size: 26px; letter-spacing: 2px; color: var(--blue-text); }

.apply-list { display: flex; flex-direction: column; gap: 8px; }
.apply-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 13px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px;
}
.apply-status { font-size: 12px; padding: 1px 9px; border-radius: 6px; border: 1px solid var(--line); }
.apply-status.status-pending { color: var(--gold-soft); border-color: var(--gold-border); background: var(--gold-tint); }
.apply-status.status-approved { color: var(--green); border-color: var(--green-border); background: var(--green-tint); }
.apply-status.status-rejected { color: var(--red); border-color: var(--red-border); background: var(--red-tint); }

/* ------------------------------ 管理后台 ------------------------------ */

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item {
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
}
.review-item > img, .review-item > .mine-noimg { width: 96px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.review-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 5px; }
.review-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.review-title a { font-weight: 600; font-size: 15px; }
.review-title a:hover { color: var(--gold-soft); }
.review-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }

/* 审核状态与分类标记 */
.status-badge { top: auto; bottom: 10px; right: 10px; color: var(--gold-soft); border-color: var(--gold-border); background: var(--gold-tint-strong); }
.tag.warn { color: var(--gold-soft); border-color: var(--gold-border); background: var(--gold-tint); }
.info-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }

.category-tabs { margin-bottom: 4px; }
.about-panel { padding: 30px 34px; }

/* ------------------------------ 主题切换过渡 ------------------------------ */

body, .topbar, .card, .panel, .tab-body, .tab-head button, .info-panel, .footer, .toast,
.stat-cell, .tag, .user-chip, .reserve, .media-switch button, .cover, .cover-badge,
input, select, textarea {
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 1280px) {
  /* 中屏：进一步压缩导航与搜索，保证顶栏仍在一排 */
  .mainnav a { padding: 6px 9px; font-size: 13.5px; }
  .global-search { flex-basis: 150px; }
  .topbar-inner { gap: 9px; }
}

@media (max-width: 1080px) {
  .brand-text { display: none; }
  .global-search { flex-basis: 120px; }
  .user-chip-name { max-width: 78px; }
}

@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; }
  /* 导航横向滚动而不是换行，保持一排 */
  .mainnav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .global-search { order: 2; flex: 1 1 120px; }
}

@media (max-width: 720px) {
  .brand-text small { display: none; }
  .user-chip-name { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .dl-row { grid-template-columns: 100px 1fr 40px; }
  .dl-row .url { grid-column: 1 / -1; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
  .tab-body { padding: 18px; }
  .footer-note { margin-left: 0; }
  /* 用户管理在小屏改为上下堆叠 */
  .user-row { grid-template-columns: 1fr 1fr; }
  .user-row-head { display: none; }
  .user-row > span:nth-child(4) { display: none; }
}

@media (max-width: 1000px) {
  .detail { grid-template-columns: 1fr; }
  .upload-layout { grid-template-columns: 1fr; }
  .me-layout { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 30px; gap: 26px; }
  .hero-home { grid-template-columns: 1fr; }
  .hero-logo { max-width: 220px; margin: 0 auto; }
  .stat-num { font-size: 58px; }
}

/* ---------------------------- 评分 / 评论（b 版本） ---------------------------- */

/* 星标 */
/* 星级：每颗星由「空星底 + 金色填充」两层叠加，支持半星 */
.stars { display: flex; align-items: center; gap: 3px; }
.star-slot {
  position: relative;
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}
.stars-sm .star-slot { font-size: 15px; }
.star-glyph,
.star-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  white-space: nowrap;
  line-height: 1;
}
.star-glyph { color: var(--star-empty); }
.star-fill { overflow: hidden; color: var(--star-on); text-shadow: 0 0 10px var(--star-glow); }
.stars.rateable .star-slot { cursor: pointer; transition: transform 0.12s ease; }
.stars.rateable .star-slot:hover { transform: scale(1.12); }
.star-hit {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.star-hit.left { left: 0; }
.star-hit.right { right: 0; }
.star-hit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* 信息栏评分块 */
.rating-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.rating-text { color: var(--text-mute); font-size: 12.5px; }
.rating-block .link-btn { font-size: 12.5px; }

/* 评论标签页 */
.reviews-wrap { display: flex; flex-direction: column; gap: 14px; }
.reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reviews-head strong { font-size: 15px; }
.reviews-sub { color: var(--text-mute); font-size: 12.5px; margin-left: 10px; }
.reviews-list { display: flex; flex-direction: column; gap: 12px; }

/* 单条评论 */
.review-card {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.review-head { display: flex; align-items: flex-start; gap: 11px; flex-wrap: wrap; }
.review-meta { flex: 1; min-width: 160px; }
.review-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.review-verb { color: var(--text-mute); font-size: 12.5px; }
.review-edited { color: var(--text-mute); font-size: 12px; }
.review-time { color: var(--text-mute); font-size: 12px; margin-top: 2px; }
.review-played { color: var(--text-dim); }
.review-head .stars { margin-left: auto; }

.review-stats { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 10px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; }
.review-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-dim); }
.review-stat .ico { opacity: 0.75; }
.review-tag { font-size: 11px; padding: 1px 8px; border-radius: 6px; background: var(--blue-tint-strong); color: var(--blue-text); border: 1px solid var(--blue-border); }

.review-body { color: var(--text-body); font-size: 14px; line-height: 1.72; overflow-wrap: anywhere; }
.review-body p { margin: 0 0 10px; }
.review-body p:last-child { margin-bottom: 0; }
.review-body ul { margin: 0 0 10px; padding-left: 20px; }
.review-body strong { color: var(--text); }
.review-body.is-clamped {
  max-height: 220px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.review-card > .link-btn { margin-top: 6px; }

.review-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--text-mute); font-size: 12.5px; cursor: pointer;
  transition: 0.15s ease;
}
.like-btn:hover { color: var(--red); border-color: var(--red-border); }
.like-btn.liked { color: var(--red); border-color: var(--red-border); background: var(--red-tint); }
.link-btn.danger { color: var(--red); }

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0, 0, 0, 0.62);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal {
  width: min(720px, 100%);
  max-height: min(90vh, 860px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.18s ease;
  overflow: hidden;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98) } to { opacity: 1; transform: none } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-body { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.modal-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text-mute); font-size: 18px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--text); border-color: var(--chip-hover-border); }
.modal-body textarea { width: 100%; resize: vertical; }

.review-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.review-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-form-row { display: flex; align-items: flex-end; gap: 12px; }
.review-form-grid .field, .review-form-row .field { margin: 0; }

.md-toolbar { display: flex; align-items: center; gap: 8px; }
.md-btn {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-dim);
  font-size: 13px; display: grid; place-items: center;
}
.md-btn:hover { color: var(--gold-soft); border-color: var(--gold-border); }
.md-hint { color: var(--text-mute); font-size: 11.5px; }
.review-count { margin-left: auto; color: var(--text-mute); font-size: 12px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }

@media (max-width: 720px) {
  .review-form-grid { grid-template-columns: 1fr; }
  .modal { max-height: 94vh; }
  .review-head .stars { margin-left: 0; }
}
/* 后台评论审核 */
.mod-reviews { display: flex; flex-direction: column; gap: 4px; }
.mod-review { padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.mod-review:last-child { border-bottom: 0; }
.mod-review-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mod-review-actions { display: flex; gap: 8px; margin-top: 6px; }
.mod-link { color: var(--blue-text); font-size: 12.5px; text-decoration: underline; }
.comment-time { color: var(--text-mute); font-size: 12px; }
.ban-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 6px;
  background: var(--red-tint); color: var(--red); border: 1px solid var(--red-border);
}
/* 弹窗里数字/日期输入占满格子 */
.review-form-grid input, .review-form-row input { width: 100%; }
.review-form-grid .field label, .review-form-row .field label { font-size: 12.5px; color: var(--text-mute); }

/* 评分读数、进制单位选择、评论区评分 */
.score-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.star-picker { display: flex; }
.score-readout { font-size: 13px; color: var(--gold-soft); }
.score-readout.muted { color: var(--text-mute); }
.review-score { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.score-num { font-size: 12.5px; color: var(--gold-soft); white-space: nowrap; }
.decimal-row { display: flex; gap: 8px; }
.decimal-row input { flex: 1; min-width: 0; }
.unit-select { width: 86px; flex: 0 0 auto; }

/* ---------------------------- 彩蛋：满屏乱飞的图标 ---------------------------- */

.egg-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;   /* 只有图标本身可点 */
  overflow: hidden;
}

.egg-fly {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  animation: eggPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.22s ease, filter 0.22s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.egg-fly:hover { filter: brightness(1.12); }
.egg-fly.egg-caught {
  opacity: 0;
  filter: brightness(1.6) saturate(1.4);
  pointer-events: none;
}

@keyframes eggPop {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ICP 备案信息：底部居中 */
.footer-beian {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 20px;
  text-align: center;
}
.footer-beian a {
  display: inline-block;
  color: var(--text-mute);
  font-size: 12.5px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-beian a:hover { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
/* ---------------------------- 人机验证弹窗 ---------------------------- */

.captcha-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.15s ease;
}

.captcha-modal {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.18s ease;
}

.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.captcha-head strong { font-size: 16px; letter-spacing: 1px; }
.captcha-sub { margin: -8px 0 0; color: var(--text-mute); font-size: 12.5px; line-height: 1.6; }

.captcha-body { display: flex; align-items: center; gap: 12px; }
.captcha-img {
  flex: 1;
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #101521;
}
.captcha-img svg { display: block; width: 100%; height: auto; }
.captcha-loading { color: var(--text-mute); font-size: 12.5px; }
.captcha-loading.err { color: var(--red); }
.captcha-refresh { flex: 0 0 auto; }

.captcha-tip { margin-top: -6px; color: var(--text-mute); font-size: 12px; }
.captcha-tip.err { color: var(--red); }

.captcha-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }

/* 表单里提示「需要人机验证」时的小标识 */
.captcha-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gold-soft);
  background: var(--gold-tint, rgba(224, 178, 74, 0.12));
  border: 1px solid var(--gold-border, rgba(224, 178, 74, 0.28));
}
/* ---------------------------- 人机验证弹窗 ---------------------------- */

.captcha-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.15s ease;
}

.captcha-modal {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.18s ease;
}

.captcha-head { display: flex; align-items: center; justify-content: space-between; }
.captcha-head strong { font-size: 16px; letter-spacing: 1px; }
.captcha-sub { margin: -8px 0 0; color: var(--text-mute); font-size: 12.5px; line-height: 1.6; }

.captcha-body { display: flex; align-items: center; gap: 12px; }
.captcha-img {
  flex: 1;
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #101521;
}
.captcha-img svg { display: block; width: 100%; height: auto; }
.captcha-loading { color: var(--text-mute); font-size: 12.5px; }
.captcha-loading.err { color: var(--red); }
.captcha-refresh { flex: 0 0 auto; }

.captcha-tip { margin-top: -6px; color: var(--text-mute); font-size: 12px; }
.captcha-tip.err { color: var(--red); }

.captcha-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }

/* 筛选项：拖拽排序 */
.tax-item {
  cursor: grab;
  transition: opacity 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}
.tax-item:active { cursor: grabbing; }
.tax-item .tax-grip {
  color: var(--text-mute);
  opacity: 0.45;
  font-size: 10px;
  letter-spacing: -2px;
  margin-right: 2px;
}
.tax-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.tax-item.drop-before { box-shadow: inset 3px 0 0 var(--gold); }
.tax-item.drop-after { box-shadow: inset -3px 0 0 var(--gold); }
.tax-item .tax-label { margin: 0 2px; }
/* 友情链接：心形副球 + 弹出面板 */
.fab-item.fab-friend { bottom: 180px; }
/* 多了友情链接球，展开时「回到顶部」再往上让一位 */
.fab.is-open .fab-top { bottom: 236px; }
.fab-item.fab-friend .fab-icon { display: grid; place-items: center; }

.fab-links {
  position: absolute;
  /* 弹在小球左侧，不遮住副球，方便再点一次心形收起 */
  right: calc(100% + 14px);
  bottom: 0;
  width: 224px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 3;
  animation: fabPanelIn 0.18s ease;
}
.fab-links[hidden] { display: none; }

.fab-links-title {
  padding: 2px 8px 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-mute);
}

.fab-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.14s ease;
}
.fab-link:hover { background: var(--panel-2); }
.fab-link b { font-size: 13px; font-weight: 600; }
.fab-link-host { font-size: 11.5px; color: var(--gold-soft); }

@keyframes fabPanelIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* 友情链接面板打开时，隐藏各球的名称气泡（避免与面板重叠）
   选择器要压过 .fab.is-open .fab-item .fab-tip 的优先级 */
.fab.is-open.has-links .fab-item .fab-tip,
.fab.is-open.has-links .fab-top .fab-tip {
  opacity: 0;
  transform: translate(6px, -50%) scale(0.9);
  pointer-events: none;
}

/* 下载次数统计 */
.download-stat {
  margin: 2px 0 12px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.download-stat::before {
  content: '⤓';
  margin-right: 6px;
  color: var(--gold-soft);
  font-size: 12px;
}
.mine-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mine-head h3 { margin-bottom: 8px; }
.mine-total { font-size: 12.5px; color: var(--gold-soft); }
.mine-downloads { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-mute); }

/* ===== d 版：上部拆成两块独立卡片（左文字 / 右随机推荐） ===== */
.hero.hero-home {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  gap: 18px;
  align-items: stretch;
}
.hero-home .hero-right {
  padding: 34px 36px;
  background:
    radial-gradient(560px 280px at 8% 20%, var(--hero-glow-gold), transparent 66%),
    var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-home .hero-left { display: flex; min-width: 0; }
.hero-home .hero-left .rec-card { flex: 1; }

@media (max-width: 900px) {
  .hero-home .hero-right { padding: 26px 22px; }
}
/* ---------- 最近收录：4 件 + 竖排「查看更多 →」（与 a/b/c 版同步） ---------- */
.home-latest .latest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 16px;
  align-items: stretch;
}
.latest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.more-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: 0.18s ease;
}
.more-tile:hover { color: var(--gold-soft); border-color: var(--gold-border); background: var(--panel); }
.more-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 6px;
  font-size: 13px;
  font-weight: 600;
}
.more-arrow { font-size: 18px; line-height: 1; }

@media (max-width: 1180px) {
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-latest .latest-row { grid-template-columns: minmax(0, 1fr) 52px; }
}
@media (max-width: 620px) {
  .latest-grid { grid-template-columns: 1fr; }
}
/* 相关链接面板：6 条链接，限制高度可滚动 */
.fab-links {
  width: 236px;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fab-links::-webkit-scrollbar { width: 6px; }
.fab-links::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
/* 相关链接条目：左侧图标 + 右侧文字 */
.fab-link {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.fab-link-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.fab-link-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  border-radius: 5px;
  background: transparent;
}
/* 关于我们：悬浮球里的第四个副球，排在相关链接上方 */
.fab-item.fab-about { bottom: 236px; }
/* 多了一个球，展开时「回到顶部」再往上让一位 */
.fab.is-open .fab-top { bottom: 292px; }
/* ============================== 站内信 ============================== */

/* 顶栏按钮上的红点 */
.icon-btn.msg-btn { position: relative; }
.msg-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2545b;
  box-shadow: 0 0 0 2px var(--bg);
}
.msg-dot[hidden] { display: none; }
.icon-btn.msg-btn.has-unread { color: var(--gold); border-color: var(--gold-border); }

/* 页面 */
.msg-page { display: flex; flex-direction: column; gap: 16px; }
.msg-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.msg-head h1 { margin: 0 0 6px; font-size: 24px; }
.msg-head-actions { display: flex; gap: 8px; }

.msg-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line-soft); padding-bottom: 2px; }
.msg-tab {
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: 0.15s ease;
}
.msg-tab:hover { color: var(--text); }
.msg-tab.active { color: var(--gold-soft); border-bottom-color: var(--gold); }

.msg-list { display: flex; flex-direction: column; gap: 10px; }

.msg-item {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.msg-item:hover { border-color: var(--line); }
.msg-item.unread { border-color: var(--gold-border); background: var(--panel-2); }

.msg-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.msg-dot-icon { font-size: 17px; line-height: 1; }
.msg-main { flex: 1; min-width: 0; }
.msg-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-meta { color: var(--text-mute); font-size: 12px; margin-top: 3px; }
.msg-new {
  flex: 0 0 auto;
  font-size: 11px;
  color: #fff;
  background: #f2545b;
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.6;
}
.msg-caret { color: var(--text-mute); font-size: 12px; }

.msg-body { padding: 0 16px 16px; border-top: 1px dashed var(--line-soft); margin-top: -1px; }
.msg-text {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: var(--text);
  margin: 14px 0 10px;
  line-height: 1.8;
}
.msg-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 写站内信 */
.msg-compose .card.panel { display: flex; flex-direction: column; gap: 12px; }
.msg-compose .field { display: flex; flex-direction: column; gap: 6px; }
.msg-compose .field > span { color: var(--text-dim); font-size: 12.5px; }
.msg-compose input,
.msg-compose select,
.msg-compose textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}
.msg-compose textarea { resize: vertical; min-height: 120px; }
.msg-compose-foot { display: flex; gap: 10px; }
.msg-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 12.5px;
}
/* 每条站内信的删除键 */
.msg-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: 0.15s ease;
}
.msg-del:hover { color: #f2545b; border-color: #f2545b33; background: #f2545b1a; }

/* 危险操作按钮（清空收件箱） */
.btn.btn-danger-ghost { color: #f2545b; border-color: #f2545b44; }
.btn.btn-danger-ghost:hover { background: #f2545b1a; border-color: #f2545b; }
/* ============================== 翻译工作台（paratranz 版） ============================== */

.pt-page { display: flex; flex-direction: column; gap: 16px; }

.pt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pt-head h1 { margin: 0 0 6px; font-size: 26px; }
.pt-token { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.pt-token code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; color: var(--gold-soft); }
.pt-token .warn { color: #f2545b; }
.pt-searchbox { display: flex; gap: 8px; align-items: center; }
.pt-search {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; min-width: 220px;
}

/* 项目卡片 */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pt-proj {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: 0.16s ease;
}
.pt-proj:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.pt-proj-head { display: flex; align-items: center; gap: 12px; }
.pt-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex: 0 0 40px; }
.pt-logo.ph { display: grid; place-items: center; color: var(--text-mute); font-size: 14px; }
.pt-proj-title { flex: 1; min-width: 0; }
.pt-proj-title h3 { margin: 0 0 3px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-proj-sub { color: var(--text-mute); font-size: 11.5px; }
.pt-pct { color: var(--gold-soft); font-weight: 700; font-size: 13px; }
.pt-proj-desc { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-proj-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--text-mute); font-size: 11.5px; flex-wrap: wrap; }

/* 进度条 */
.pt-bar { position: relative; height: 7px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.pt-bar-trans { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #4b7bec, #5aa9ff); }
.pt-bar-check { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2fbf71, #61d99a); z-index: 1; }

/* 编辑器 */
.pt-editor-head { display: flex; flex-direction: column; gap: 10px; }
.pt-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-crumb h1 { margin: 0; font-size: 21px; }
.pt-back { color: var(--gold-soft); text-decoration: none; font-size: 13px; }
.pt-back:hover { text-decoration: underline; }
.pt-write { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); }
.pt-write.ok { color: #2fbf71; border-color: #2fbf7155; background: #2fbf7114; }
.pt-write.ro { color: #f2545b; border-color: #f2545b55; background: #f2545b14; }
.pt-progress { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pt-progress .pt-bar { flex: 1; min-width: 220px; }
.pt-progress-text { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }

.pt-warn {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px; border-radius: 10px; font-size: 12.5px;
  background: #f2545b14; border: 1px solid #f2545b44; color: #ff9ba0;
}
.pt-warn[hidden] { display: none; }

.pt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pt-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-tab {
  border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text-dim);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; transition: 0.15s ease;
}
.pt-tab:hover { color: var(--text); }
.pt-tab.active { background: var(--gold-tint-strong); border-color: var(--gold-border); color: var(--gold-soft); font-weight: 600; }
.pt-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.pt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.pt-strings { display: flex; flex-direction: column; gap: 10px; }
.pt-string {
  background: var(--panel); border: 1px solid var(--line-soft); border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.pt-string.st-translated { border-left-color: #5aa9ff; }
.pt-string.st-reviewed { border-left-color: #2fbf71; }
.pt-string.st-disputed { border-left-color: #f0a93b; }
.pt-string.st-hidden { opacity: 0.6; }

.pt-string-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-file, .pt-key {
  font-size: 11px; color: var(--text-mute); background: var(--panel-2);
  padding: 1px 7px; border-radius: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pt-key { color: var(--text-dim); }
.pt-spacer { flex: 1; }
.pt-stage { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); }
.pt-stage.st-translated { color: #5aa9ff; border-color: #5aa9ff55; background: #5aa9ff14; }
.pt-stage.st-reviewed { color: #2fbf71; border-color: #2fbf7155; background: #2fbf7114; }
.pt-stage.st-disputed { color: #f0a93b; border-color: #f0a93b55; background: #f0a93b14; }

.pt-st {
  border: 1px solid var(--line-soft); background: transparent; color: var(--text-mute);
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px; cursor: pointer; transition: 0.15s ease;
}
.pt-st:hover { color: var(--text); border-color: var(--line); }

.pt-string-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pt-original {
  font-size: 13.5px; line-height: 1.75; color: var(--text-dim); white-space: pre-wrap; word-break: break-word;
  padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px;
  max-height: 200px; overflow: auto;
}
.pt-target {
  width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.75; resize: vertical;
}
.pt-target:focus { outline: none; border-color: var(--gold-border); }
.pt-target[readonly] { opacity: 0.75; }
.pt-context { font-size: 12px; color: var(--text-mute); border-top: 1px dashed var(--line-soft); padding-top: 8px; white-space: pre-wrap; }

/* 术语表 */
.pt-terms {
  position: sticky; top: 90px; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px;
  max-height: 70vh; overflow: auto;
}
.pt-terms-head { font-weight: 700; font-size: 13px; color: var(--gold-soft); }
.pt-term { display: flex; flex-direction: column; gap: 2px; font-size: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--line-soft); }
.pt-term b { color: var(--text); font-weight: 600; }
.pt-term span { color: var(--text-mute); }

.pt-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 0 20px; }

@media (max-width: 1080px) {
  .pt-layout { grid-template-columns: 1fr; }
  .pt-terms { position: static; max-height: none; }
  .pt-string-body { grid-template-columns: 1fr; }
}
/* 工作台：绑定面板 / 添加项目 / 移除按钮 */
.pt-bind, .pt-add { display: flex; flex-direction: column; gap: 10px; }
.pt-bind h3, .pt-add h3 { margin: 0; font-size: 15px; }
.pt-steps { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 13px; line-height: 1.9; }
.pt-steps a { color: var(--gold-soft); }
.pt-token-input {
  flex: 1; min-width: 260px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; font-family: ui-monospace, Consolas, monospace;
}
.pt-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pt-add-row .pt-search { flex: 1; min-width: 260px; }
.pt-remove {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--text-mute); cursor: pointer; font-size: 15px; line-height: 1;
}
.pt-remove:hover { color: #f2545b; border-color: #f2545b44; background: #f2545b1a; }
/* ============================== 三栏翻译工作台 ============================== */

.pt-workspace { display: flex; flex-direction: column; gap: 10px; }
.pt-3col {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: stretch;
  min-height: 72vh;
}

.pt-col-left, .pt-col-mid, .pt-col-right {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 左栏 */
.pt-left-tools { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line-soft); }
.pt-select {
  padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 12.5px;
}
.pt-left-tools .pt-search { min-width: 0; width: 100%; padding: 7px 10px; font-size: 12.5px; }
.pt-list { flex: 1; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.pt-list-empty { padding: 24px 12px; color: var(--text-mute); font-size: 12.5px; text-align: center; }
.pt-row {
  display: flex; gap: 8px; align-items: flex-start; width: 100%;
  padding: 8px 10px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: 0.12s ease;
}
.pt-row:hover { background: var(--panel-2); }
.pt-row.active { background: var(--gold-tint-strong); border-color: var(--gold-border); }
.pt-row-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 7px; background: #8a93a6; }
.pt-row-dot.st-translated { background: #5aa9ff; }
.pt-row-dot.st-reviewed { background: #2fbf71; }
.pt-row-dot.st-disputed { background: #f0a93b; }
.pt-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pt-row-orig { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-row-trans { font-size: 11.5px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-list-foot {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-top: 1px solid var(--line-soft); font-size: 11.5px;
}

/* 中栏 */
.pt-mid { display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow: auto; }
.pt-mid-empty { display: grid; place-items: center; height: 100%; color: var(--text-mute); font-size: 13px; }
.pt-mid-head { display: flex; align-items: center; gap: 10px; }
.pt-orig-box {
  font-size: 15px; line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-word;
  padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px;
  max-height: 180px; overflow: auto;
}
.pt-trans-input {
  width: 100%; min-height: 120px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.8; resize: vertical;
}
.pt-trans-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--focus-ring); }
.pt-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-mute); }
.pt-meta code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; color: var(--text-dim); }
.pt-mid-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pt-ai { border-top: 1px dashed var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pt-ai-title { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.pt-ai-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pt-ai-hint { font-size: 12px; color: var(--text-mute); }
.pt-ai-hint.err { color: #f2545b; }
.pt-ai-result {
  font-size: 14px; line-height: 1.8; padding: 10px 12px; border-radius: 10px;
  background: #5aa9ff10; border: 1px solid #5aa9ff44; color: var(--text); white-space: pre-wrap;
}

/* 右栏 */
.pt-right-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.pt-right-tabs { display: flex; gap: 6px; }
.pt-rtab {
  border: 1px solid transparent; background: transparent; color: var(--text-dim);
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.pt-rtab.active { background: var(--gold-tint-strong); border-color: var(--gold-border); color: var(--gold-soft); font-weight: 600; }
.pt-right-body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pt-terms-sub { font-size: 11.5px; color: var(--gold-soft); }
.pt-term.hit { background: var(--gold-tint); border-radius: 8px; padding: 4px 6px; }
.pt-context-text { font-size: 13px; line-height: 1.8; color: var(--text-dim); white-space: pre-wrap; }
.pt-hist { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }

/* 弹层 */
.pt-modal {
  position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, 0.55);
  display: grid; place-items: center; padding: 20px;
}
.pt-modal-card { width: min(480px, 94vw); display: flex; flex-direction: column; gap: 10px; }
.pt-modal-card .field { display: flex; flex-direction: column; gap: 5px; }
.pt-modal-card .field > span { font-size: 12.5px; color: var(--text-dim); }
.pt-modal-card .pt-token-input { width: 100%; min-width: 0; }
.pt-modal-foot { display: flex; gap: 8px; flex-wrap: wrap; }

.btn.btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 8px; }

@media (max-width: 1280px) {
  .pt-3col { grid-template-columns: 260px minmax(0, 1fr); }
  .pt-col-right { grid-column: 1 / -1; min-height: 220px; }
}
@media (max-width: 860px) {
  .pt-3col { grid-template-columns: 1fr; }
  .pt-col-left { max-height: 320px; }
}
/* ===== 工作台：三栏各自独立滚动（左栏条目总览单独滑动） ===== */
.pt-workspace {
  /* 顶栏 66 + 视图上边距 + 项目头部/告警 ≈ 100px，剩下的给三栏 */
  height: calc(100vh - 104px);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pt-3col { flex: 1 1 auto; min-height: 0; align-items: stretch; }
.pt-col-left,
.pt-col-mid,
.pt-col-right { min-height: 0; overflow: hidden; }

/* 左栏：工具区固定，列表自己滚 */
.pt-left-tools { flex: 0 0 auto; }
.pt-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.pt-list-foot { flex: 0 0 auto; }

/* 中栏 / 右栏同样独立滚动 */
.pt-col-mid > .pt-mid { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pt-right-head { flex: 0 0 auto; }
.pt-right-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* 细滚动条，日/夜都看得见 */
.pt-list::-webkit-scrollbar,
.pt-mid::-webkit-scrollbar,
.pt-right-body::-webkit-scrollbar { width: 8px; }
.pt-list::-webkit-scrollbar-thumb,
.pt-mid::-webkit-scrollbar-thumb,
.pt-right-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.pt-list::-webkit-scrollbar-thumb:hover,
.pt-mid::-webkit-scrollbar-thumb:hover,
.pt-right-body::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

/* 窄屏：不再锁高度，回到整页滚动 */
@media (max-width: 860px) {
  .pt-workspace { height: auto; min-height: 0; }
  .pt-col-left { max-height: 60vh; }
  .pt-col-mid, .pt-col-right { max-height: none; }
}
/* ===== 快捷键弹窗 / 术语弹窗 ===== */
.pt-right-actions { display: flex; gap: 6px; }
.pt-link {
  border: 0; background: none; color: var(--gold-soft); font: inherit; font-size: 12px;
  cursor: pointer; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px;
}
.pt-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-modal-head h3 { margin: 0; }
.pt-modal-x {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--text-mute); cursor: pointer; font-size: 14px; line-height: 1;
}
.pt-modal-x:hover { color: var(--text); border-color: var(--line); }

.pt-sc-card { width: min(560px, 94vw); }
.pt-sc-rows { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; }
.pt-sc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 2px; border-bottom: 1px dashed var(--line-soft); font-size: 13px;
}
.pt-sc-label { color: var(--text-dim); }
.pt-kbd {
  min-width: 92px; padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: 12px; font-family: ui-monospace, Consolas, monospace;
  cursor: pointer; transition: 0.14s ease; white-space: nowrap;
}
.pt-kbd:hover { border-color: var(--gold-border); color: var(--gold-soft); }
.pt-kbd.capturing { border-color: var(--gold); color: var(--gold); background: var(--gold-tint); }

.pt-term-card { width: min(560px, 94vw); }
.pt-term-card .field { display: flex; flex-direction: column; gap: 6px; }
.pt-term-card .pt-token-input { width: 100%; min-width: 0; }
.pt-variants { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12px;
}
.pt-chip-x { border: 0; background: none; color: var(--text-mute); cursor: pointer; font-size: 13px; line-height: 1; }
.pt-chip-x:hover { color: #f2545b; }
.pt-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.pt-check input { width: 15px; height: 15px; accent-color: var(--gold); }
/* 右栏头部：标签与按钮不再挤成两行 */
.pt-right-head { flex-wrap: wrap; row-gap: 6px; }
.pt-right-tabs { flex-wrap: nowrap; flex: 0 0 auto; }
.pt-rtab { white-space: nowrap; padding: 4px 10px; font-size: 12px; }
.pt-right-actions { margin-left: auto; display: flex; gap: 5px; flex: 0 0 auto; }
.pt-right-actions .btn { padding: 4px 9px; font-size: 11.5px; white-space: nowrap; }
/* 右栏图标按钮（＋ 创建术语 / ⌨ 快捷键），保证一行排得下 */
.pt-icon-btn {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  font: inherit; font-size: 14px; line-height: 1;
  cursor: pointer; transition: 0.14s ease;
}
.pt-icon-btn:hover { color: var(--gold-soft); border-color: var(--gold-border); background: var(--gold-tint); }
.pt-right-head .pt-right-actions { margin-left: auto; gap: 6px; flex: 0 0 auto; }
/* 设置弹窗：标签页 / 分段按钮 */
.pt-set-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); padding-bottom: 2px; }
.pt-set-tab {
  border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 4px; cursor: pointer; border-bottom: 2px solid transparent;
}
.pt-set-tab.active { color: var(--gold-soft); border-bottom-color: var(--gold); }
.pt-set-body { min-height: 220px; }
.pt-set-pane { display: flex; flex-direction: column; gap: 10px; }
.pt-set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 2px; }
.pt-set-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pt-set-label .hint { font-size: 12px; }
.pt-seg-group { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex: 0 0 auto; }
.pt-seg {
  border: 0; background: transparent; color: var(--text-dim); font: inherit; font-size: 12.5px;
  padding: 6px 16px; cursor: pointer; transition: 0.14s ease;
}
.pt-seg + .pt-seg { border-left: 1px solid var(--line); }
.pt-seg:hover { color: var(--text); }
.pt-seg.on { background: var(--gold-tint-strong); color: var(--gold-soft); font-weight: 600; }
/* 设置弹窗：内容自适应高度（辅助功能只有一项时不留大片空白） */
.pt-set-body { min-height: 0; }