/* ============ 友军口袋 · 公共样式 ============ */
:root {
  --bg: #0a0a10;
  --bg2: #101019;
  --panel: rgba(255, 255, 255, 0.045);
  --panel2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --txt: #f2f2f8;
  --txt2: #a0a0b2;
  --txt3: #6b6b7e;
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --danger: #f87171;
  --ok: #34d399;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  --font: Poppins, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  /* 星空沉浸底：近黑基底 + 脚部一道极淡的蓝光晕（取自 Vertex 参考稿，永不动画） */
  background:
    linear-gradient(180deg, rgba(25, 127, 255, 0) 38%, rgba(25, 127, 255, 0.042) 54%,
      rgba(25, 127, 255, 0.052) 68%, rgba(25, 127, 255, 0.030) 100%),
    #020204;
  color: var(--txt);
  min-height: 100vh;
  overflow-x: clip; /* clip 而非 hidden：不建滚动容器，避免破坏 fixed/sticky */
  -webkit-font-smoothing: antialiased;
}
/* JS 生成的两层星空（大 box-shadow 列表） */
.stars {
  position: fixed; left: 0; top: 0;
  width: 1px; height: 1px;
  border-radius: 50%;
  background: #fff;
  z-index: 0;
  pointer-events: none;
}
a { color: inherit; text-decoration: none; } /* 按钮文案永不出现下划线 */
button { font-family: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: rgba(34, 211, 238, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 顶栏 · 玻璃胶囊导航（随页面滚动，不吸附，避免遮挡画廊） ---------- */
.topbar {
  position: relative; z-index: 400;
  display: flex; align-items: center; gap: 16px;
  width: min(1240px, calc(100% - 32px));
  height: 62px;
  margin: 10px auto 0;
  padding: 0 10px 0 8px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  background: rgba(255, 255, 255, 0.008);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 34px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-logo {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
}
.brand-logo svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(60, 224, 255, 0.75)); }
.brand-wm { display: flex; flex-direction: column; line-height: 1; }
.brand-kick {
  font-size: 8px; font-weight: 600; letter-spacing: 0.2em;
  color: #fff; opacity: 0.82; margin: 0 0 3px 1px;
}
.brand-name { font-size: 16.5px; font-weight: 900; letter-spacing: 0.02em; color: #fff; }
.toplinks { display: flex; align-items: center; gap: 22px; margin-left: 10px; flex-shrink: 0; }
.toplinks a {
  font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, 0.92);
  white-space: nowrap; transition: opacity 0.25s;
}
.toplinks a:hover { opacity: 0.65; }
.toplinks a.on { font-weight: 600; color: #fff; }
.topbar-spacer { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--panel2); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(139, 92, 246, 0.55); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt2); }
.btn-ghost:hover { color: var(--txt); background: var(--panel); }
.btn-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.6); }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ---------- 辉光按钮（移植 Vertex 像素契约） ----------
   近黑按钮，脚部一bank青色光由背景渐变裁进自身圆角；
   overflow:hidden 是裁剪的关键；唯一外阴影是 8px/10% 的紧凑光。 */
.btn-glow {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; border: none; cursor: pointer;
  font-family: inherit; white-space: nowrap; user-select: none;
  background: linear-gradient(to top,
    #9ad9ec 1px, #89dff0 2px, #79e0f1 3px, #61daef 4px, #3ec8e4 5px,
    #14a8c6 6px, #0596b3 7px, #038aa8 8px, #047796 9px, #006180 10px,
    #025066 12px, #0a4f5e 13px, #04465a 14px, #073746 16px,
    #0a2a37 18px, #0d212e 20px, #0f1824 24px, #0a121e 30px,
    #0a111d 34px, #0a111d 100%);
  box-shadow:
    inset 0 3px 3px -2px rgba(180, 228, 255, 0.10),
    inset 1px 0 0 rgba(255, 255, 255, 0.09),
    inset -1px 0 0 rgba(255, 255, 255, 0.09),
    0 0 8px rgba(60, 190, 235, 0.10),
    0 2px 5px -3px rgba(90, 220, 255, 0.45);
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}
/* 顶部光痕：仅导航实例携带 */
.btn-glow.btn-nav::before {
  content: ""; position: absolute; left: 22%; right: 38%; top: 0.8px; height: 1.9px; z-index: 1;
  filter: blur(0.55px);
  background: linear-gradient(90deg, rgba(120, 225, 255, 0) 0%, rgba(120, 225, 255, 0.58) 34%,
    rgba(160, 240, 255, 0.74) 50%, rgba(120, 225, 255, 0.58) 66%, rgba(120, 225, 255, 0) 100%);
}
/* 侧缘光：13px 内衰减，向上渐弱（mask 必须保留，否则光会淹到顶部） */
.btn-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(200, 245, 255, 0.70), rgba(200, 245, 255, 0) 13px),
              linear-gradient(270deg, rgba(200, 245, 255, 0.70), rgba(200, 245, 255, 0) 13px);
  -webkit-mask: linear-gradient(to top, #000 0, #000 6px, rgba(0, 0, 0, 0.40) 12px,
    rgba(0, 0, 0, 0.15) 18px, rgba(0, 0, 0, 0.09) 24px, rgba(0, 0, 0, 0.02) 30px, rgba(0, 0, 0, 0.02) 100%);
          mask: linear-gradient(to top, #000 0, #000 6px, rgba(0, 0, 0, 0.40) 12px,
    rgba(0, 0, 0, 0.15) 18px, rgba(0, 0, 0, 0.09) 24px, rgba(0, 0, 0, 0.02) 30px, rgba(0, 0, 0, 0.02) 100%);
}
.btn-glow > * { position: relative; z-index: 2; }
.btn-glow, .btn-glow span { line-height: 1; text-shadow: 0 1px 2px rgba(0, 20, 30, 0.5); }
.btn-glow:hover { transform: translateY(-1px); filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(200, 245, 255, 0.6), inset 1px 0 0 rgba(170, 225, 255, 0.35),
              inset -1px 0 0 rgba(170, 225, 255, 0.35), 0 6px 22px rgba(20, 180, 225, 0.55); }
.btn-glow:active { transform: none; }
.btn-glow[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; filter: none; }
/* 两个尺寸实例 */
.btn-glow.btn-nav { height: 40px; padding: 0 18px; border-radius: 14px; font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; }
.btn-glow.btn-hero { height: 52px; min-width: 150px; padding: 0 28px; border-radius: 13px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
/* 大按钮上盖掉顶部光痕（英雄按钮无光痕，导航按钮才有） */
.btn-glow.btn-hero::before { display: none; }

/* ---------- 徽章胶囊（移植 Vertex 像素契约 A） ----------
   固定高度胶囊：左缘内嵌 4px 的青蓝渐变方块 + 右侧左对齐文案；不是居中药丸。 */
.badge-pill {
  position: relative;
  display: inline-flex; align-items: center;
  height: 39px; padding: 0 18px 0 4px;
  border-radius: 12px; z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.115);
  background: linear-gradient(to top,
    rgba(190, 225, 255, 0.175) 0px, rgba(190, 225, 255, 0.128) 2px, rgba(190, 225, 255, 0.075) 4px,
    rgba(190, 225, 255, 0.026) 6px, rgba(255, 255, 255, 0.012) 9px, rgba(255, 255, 255, 0.012) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.badge-pill i {
  width: 29px; height: 29px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; margin-right: 12px;
  background: linear-gradient(to top,
    #46afc8 0px, #35abc7 2px, #0b859d 4px, #026c84 6px, #004e66 8px,
    #053f58 10px, #012c3d 12px, #031a2a 14px, #061125 16px, #090f25 19px,
    #090c1c 23px, #060d16 29px);
  box-shadow: inset 1px 0 0 rgba(150, 220, 250, 0.40),
    inset -1px 0 0 rgba(150, 220, 250, 0.52),
    0 0 6px rgba(60, 190, 230, 0.20), 0 3px 8px -5px rgba(90, 220, 255, 0.6);
}
.badge-pill i svg { width: 14px; height: 16px; position: relative; top: -1px; }
.badge-pill b {
  font-size: 12.5px; font-weight: 400; color: rgba(255, 255, 255, 0.94);
  white-space: nowrap; padding-top: 1.5px; letter-spacing: 0.02em;
}

/* ---------- 输入 ---------- */
.input, .select, textarea.input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--txt);
  font-size: 14px;
  padding: 9px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.input::placeholder { color: var(--txt3); }
.input:focus, .select:focus { border-color: rgba(139, 92, 246, 0.65); background: rgba(139, 92, 246, 0.07); }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: #17171f; color: var(--txt); }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 13px; width: 15px; height: 15px; pointer-events: none; }
.search-wrap .input { padding-left: 38px; width: 240px; background: rgba(9, 13, 26, 0.6); border-color: rgba(255, 255, 255, 0.08); }
.search-wrap .input:focus { background: rgba(9, 13, 26, 0.85); }

/* ---------- 分类 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}
.chip:hover { color: var(--txt); border-color: rgba(255, 255, 255, 0.22); }
.chip.on {
  background: var(--grad); color: #fff; border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.chip .n { font-size: 11.5px; opacity: 0.75; margin-left: 5px; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}
.badge-type { background: rgba(139, 92, 246, 0.85); }
.badge-dur { background: rgba(0, 0, 0, 0.65); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 350; /* 高于灯箱(300)，低于吐司(400) */
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-card {
  width: 100%; max-width: 440px;
  background: linear-gradient(180deg, #191924, #13131c);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 30px 30px 26px;
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-card.wide { max-width: 640px; max-height: 86vh; overflow-y: auto; }
.modal-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { font-size: 13.5px; color: var(--txt2); line-height: 1.7; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }

/* 口令输入 */
.code-input {
  width: 100%;
  text-align: center;
  font-size: 20px;
  letter-spacing: 6px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--txt);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18); }
.code-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; text-align: center; }

/* ---------- 表单行 ---------- */
.form-row { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--txt2); margin-bottom: 7px; font-weight: 500; }

/* ---------- 吐司 ---------- */
#toast-box {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 20px;
  border-radius: 13px;
  background: rgba(24, 24, 34, 0.92);
  border: 1px solid var(--line);
  color: var(--txt);
  font-size: 13.5px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  max-width: 80vw;
}
.toast.err { border-color: rgba(248, 113, 113, 0.5); color: #fecaca; }
.toast.ok { border-color: rgba(52, 211, 153, 0.45); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 锁定状态 chip ---------- */
.lockchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--txt2);
  transition: all 0.2s;
  white-space: nowrap;
}
.lockchip:hover { border-color: rgba(255, 255, 255, 0.25); color: var(--txt); }
.lockchip.unlocked { border-color: rgba(52, 211, 153, 0.4); color: var(--ok); background: rgba(52, 211, 153, 0.08); }
.lockchip svg { width: 13px; height: 13px; }

/* ---------- 进度条 ---------- */
.progress { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0%; background: var(--grad); border-radius: 99px; transition: width 0.15s ease; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 90px 20px; color: var(--txt2); }
.empty-state .ico { font-size: 52px; margin-bottom: 18px; opacity: 0.85; }
.empty-state h3 { font-size: 18px; color: var(--txt); margin-bottom: 8px; font-weight: 600; }
.empty-state p { font-size: 13.5px; line-height: 1.8; }
html[data-theme="light"] .empty-state { color: #6b7280; }

/* ============ 浅色主题（白底画廊，复刻参考图） ============
   由 <html data-theme="light"> 触发；深色为默认。 */
html[data-theme="light"] {
  --bg: #fbfaf8;
  --bg2: #ffffff;
  --panel: #ffffff;
  --panel2: #f2f1ee;
  --line: rgba(20, 22, 26, 0.09);
  --txt: #16181d;
  --txt2: #5b6169;
  --txt3: #8b9098;
  --shadow: 0 18px 48px rgba(20, 22, 26, 0.10);
}
html[data-theme="light"] body {
  background: #fbfaf8;
  color: var(--txt);
}
html[data-theme="light"] .stars { display: none; } /* 白底不需要星空 */
html[data-theme="light"] ::selection { background: rgba(53, 216, 255, 0.35); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #d5d2cc; border-color: #fbfaf8; }

/* 顶栏胶囊 */
html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(20, 22, 26, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(20, 22, 26, 0.07);
}
html[data-theme="light"] .brand-name { color: #16181d; }
html[data-theme="light"] .brand-kick { color: #5b6169; opacity: 1; }
html[data-theme="light"] .brand-logo svg { filter: drop-shadow(0 2px 6px rgba(10, 134, 216, 0.35)); }
html[data-theme="light"] .toplinks a { color: #414852; }
html[data-theme="light"] .toplinks a:hover { opacity: 1; color: #16181d; }
html[data-theme="light"] .toplinks a.on { color: #16181d; }

/* 搜索框 / 下拉 */
html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] textarea.input {
  /* 用 background-color 而非 background 简写：简写会重置 .select 箭头的 repeat/position */
  background-color: #fff;
  border-color: rgba(20, 22, 26, 0.12);
  color: #16181d;
}
html[data-theme="light"] .input::placeholder { color: #9aa0a8; }
html[data-theme="light"] .input:focus,
html[data-theme="light"] .select:focus { border-color: rgba(10, 134, 216, 0.6); background-color: #fff; box-shadow: 0 0 0 3px rgba(53, 216, 255, 0.16); }
html[data-theme="light"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6169' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
html[data-theme="light"] .search-wrap .input { background-color: #fff; border-color: rgba(20, 22, 26, 0.12); }

/* 通用按钮（次要动作） */
html[data-theme="light"] .btn {
  background: #fff;
  border-color: rgba(20, 22, 26, 0.12);
  color: #33383f;
}
html[data-theme="light"] .btn:hover { background: #fff; border-color: rgba(20, 22, 26, 0.24); box-shadow: 0 6px 18px rgba(20, 22, 26, 0.08); }
html[data-theme="light"] .btn-ghost { background: transparent; border-color: transparent; color: #5b6169; }
html[data-theme="light"] .btn-ghost:hover { background: rgba(20, 22, 26, 0.05); color: #16181d; }
html[data-theme="light"] .btn-danger { color: #c0392b; border-color: rgba(192, 57, 43, 0.3); }
/* 主按钮在白底改用纯黑，保持强调（参考图里的黑色标签语言） */
html[data-theme="light"] .btn-primary {
  background: #16181d;
  border-color: #16181d;
  color: #fff;
  box-shadow: 0 6px 20px rgba(20, 22, 26, 0.22);
}
html[data-theme="light"] .btn-primary:hover {
  background: #16181d;
  border-color: #16181d;
  filter: brightness(1.35);
}

/* 主题切换图标按钮 */
.iconbtn {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt2);
  display: grid; place-items: center;
  transition: all 0.2s;
}
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn:hover { color: var(--txt); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-1px); }
html[data-theme="light"] .iconbtn { background: #fff; border-color: rgba(20, 22, 26, 0.12); color: #5b6169; }
html[data-theme="light"] .iconbtn:hover { color: #16181d; border-color: rgba(20, 22, 26, 0.26); box-shadow: 0 6px 18px rgba(20, 22, 26, 0.08); }

/* 解锁徽标 */
html[data-theme="light"] .lockchip { background: #fff; border-color: rgba(20, 22, 26, 0.12); color: #5b6169; }
html[data-theme="light"] .lockchip:hover { color: #16181d; border-color: rgba(20, 22, 26, 0.26); }
html[data-theme="light"] .lockchip.unlocked { background: rgba(16, 163, 74, 0.08); border-color: rgba(16, 163, 74, 0.35); color: #10803a; }

/* 分类 chips */
html[data-theme="light"] .chip { background: #fff; border-color: rgba(20, 22, 26, 0.12); color: #5b6169; }
html[data-theme="light"] .chip:hover { color: #16181d; border-color: rgba(20, 22, 26, 0.28); }
html[data-theme="light"] .chip.on {
  background: #16181d; color: #fff; border-color: #16181d;
  box-shadow: 0 8px 20px rgba(20, 22, 26, 0.18);
}
html[data-theme="light"] .chip .n { opacity: 0.6; }

/* 徽章胶囊（保留青色图标块，底改白） */
html[data-theme="light"] .badge-pill {
  background: #fff;
  border-color: rgba(20, 22, 26, 0.09);
  box-shadow: 0 6px 18px rgba(20, 22, 26, 0.06);
}
html[data-theme="light"] .badge-pill b { color: #33383f; }

/* 弹窗与输入 */
html[data-theme="light"] .modal-mask { background: rgba(28, 30, 36, 0.42); }
html[data-theme="light"] .modal-card {
  background: #fff;
  border-color: rgba(20, 22, 26, 0.08);
  box-shadow: 0 24px 70px rgba(20, 22, 26, 0.18);
}
html[data-theme="light"] .modal-title { color: #16181d; }
html[data-theme="light"] .modal-desc { color: #5b6169; }
html[data-theme="light"] .code-input { background: #f7f6f3; border-color: rgba(20, 22, 26, 0.12); color: #16181d; }
html[data-theme="light"] .code-input:focus { border-color: #35d8ff; background: #fff; }

/* 吐司 */
html[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(20, 22, 26, 0.1);
  color: #16181d;
  box-shadow: 0 12px 32px rgba(20, 22, 26, 0.14);
}
html[data-theme="light"] .toast.err { border-color: rgba(192, 57, 43, 0.4); color: #a5321f; }
html[data-theme="light"] .toast.ok { border-color: rgba(16, 163, 74, 0.4); }

@media (max-width: 860px) {
  .iconbtn { width: 34px; height: 34px; }
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative; z-index: 1;
  text-align: center; padding: 44px 20px 34px;
  color: var(--txt3); font-size: 12.5px; letter-spacing: 0.4px;
}
.footer a { color: var(--txt2); }
.footer a:hover { color: var(--txt); }

@media (max-width: 860px) {
  .topbar { gap: 8px; height: 58px; padding: 0 8px; }
  .toplinks { display: none; }
  .search-wrap { flex: 1 1 70px; min-width: 0; }
  .search-wrap .input { width: 100%; }
  .lockchip { padding: 7px 10px; }
  .lockchip span { display: none; } /* 窄屏只留锁图标，避免挤爆顶栏 */
  .btn-glow.btn-nav { padding: 0 12px; font-size: 12.5px; }
  .brand-kick { display: none; }
  .badge-pill b { font-size: 11.5px; }
  .badge-pill { padding: 0 14px 0 4px; }
}
