/* =====================================================================
   SVR后台 · 全站样式
   双 UI 主题：data-theme="dark"（默认） / data-theme="light"
   所有颜色走 CSS 变量，方便一键切换，也方便以后改色
   ===================================================================== */

:root,
[data-theme="dark"] {
  --bg: #0a0b12;
  --bg-2: #0f1120;
  --panel: rgba(255, 255, 255, .035);
  --panel-solid: #121426;
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eef1f8;
  --text-2: #a7afc4;
  --text-3: #6d7691;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-soft: rgba(59, 130, 246, .14);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  --glow: 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 40px rgba(59, 130, 246, .16);
  --radius: 14px;
  --side-bg: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  --input-bg: rgba(255, 255, 255, .045);
}

[data-theme="light"] {
  --bg: #f2f4f9;
  --bg-2: #e9edf6;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-2: #f7f9fd;
  --line: #e2e7f0;
  --line-strong: #cfd7e6;
  --text: #14192a;
  --text-2: #4b5568;
  --text-3: #8b95a8;
  --accent: #2563eb;
  --accent-2: #0891b2;
  --accent-soft: rgba(37, 99, 235, .1);
  --ok: #059669;
  --warn: #b45309;
  --err: #dc2626;
  --shadow: 0 18px 40px rgba(19, 27, 51, .1);
  --glow: 0 0 0 1px rgba(19, 27, 51, .04), 0 8px 24px rgba(37, 99, 235, .1);
  --radius: 14px;
  --side-bg: linear-gradient(180deg, #ffffff, #f8faff);
  --input-bg: #f7f9fd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(59, 130, 246, .18), transparent 60%),
    radial-gradient(800px 480px at 92% 8%, rgba(34, 211, 238, .12), transparent 65%),
    radial-gradient(700px 500px at 50% 110%, rgba(52, 211, 153, .07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: rgba(107, 140, 255, .32); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
[data-theme="light"] .card { background: var(--panel-solid); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title small { color: var(--text-3); font-weight: 400; font-size: 12px; }
/* 标题前的色条：替代图标，保持统一的分区识别 */
.card-title::before {
  content: "";
  width: 3px; height: 13px; border-radius: 2px; flex: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: .9;
}

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: .2px;
}
.input, .field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 76px; }
.field .tip { font-size: 11px; color: var(--text-3); margin-top: 5px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
}
.btn-ok { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .35); color: var(--ok); }
.btn-warn { background: rgba(251, 191, 36, .14); border-color: rgba(251, 191, 36, .35); color: var(--warn); }
.btn-danger { background: rgba(248, 113, 113, .13); border-color: rgba(248, 113, 113, .35); color: var(--err); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text-2);
}
.badge-ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
.badge-err { color: var(--err); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .1); }
.badge-warn { color: var(--warn); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.badge-accent { color: var(--accent); border-color: rgba(107, 140, 255, .35); background: var(--accent-soft); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--text-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: var(--panel-2); }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--text-3); padding: 42px 10px; }
.empty .big {
  width: 54px; height: 54px; margin: 0 auto 10px;
  border-radius: 16px; display: grid; place-items: center;
  font-size: 20px; font-weight: 700; line-height: 1;
  color: var(--text-3); background: var(--panel-2);
  border: 1px solid var(--line);
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.switch { position: relative; display: inline-block; width: 42px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--line-strong); border-radius: 999px; transition: .25s;
}
.switch span::before {
  content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .25s;
}
.switch input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch input:checked + span::before { transform: translateX(19px); }

/* ---------------- 登录页 ---------------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  position: relative;
  z-index: 1;
}
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(59, 130, 246, .12), rgba(34, 211, 238, .06) 55%, transparent);
}
.auth-art h2 {
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.auth-art h2 em {
  font-style: normal;
  background: linear-gradient(120deg, #ffd479, #f0b429 45%, #fff3c4 70%, #d4a017);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-art p { color: var(--text-2); max-width: 430px; }
.auth-quote {
  margin-top: 30px; max-width: 440px;
  padding: 18px 20px; border-radius: 14px;
  border: 1px solid rgba(240, 180, 41, .22);
  background: linear-gradient(135deg, rgba(240, 180, 41, .09), rgba(34, 211, 238, .05));
}
.auth-quote b { display: block; font-size: 16px; letter-spacing: .2px; }
.auth-quote span { display: block; margin-top: 7px; font-size: 12.5px; color: var(--text-3); letter-spacing: .5px; }
.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 25px; margin-bottom: 6px; letter-spacing: -.3px; }
.auth-box .sub { color: var(--text-3); font-size: 13px; margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-3); font-size: 13px; }
.auth-switch a { cursor: pointer; font-weight: 600; }
.alert {
  padding: 10px 13px; border-radius: 10px; font-size: 13px; margin-bottom: 14px;
  border: 1px solid transparent; animation: fadeDown .25s ease;
}
.alert-err { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: var(--err); }
.alert-ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); color: var(--ok); }
.alert-info { background: var(--accent-soft); border-color: rgba(107, 140, 255, .3); color: var(--accent); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.qq-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--line-strong); background: var(--panel-2);
  margin-top: 8px;
}
.qq-preview img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line-strong); object-fit: cover; background: var(--bg-2); }
.qq-preview .t { font-size: 12px; color: var(--text-3); }
.qq-preview .n { font-size: 13px; font-weight: 600; }

/* ---------------- 后台布局 ---------------- */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; position: relative; z-index: 1; }

.side {
  background: var(--side-bg);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(107, 140, 255, .35);
}
.brand-t { font-weight: 700; font-size: 14px; line-height: 1.25; }
.brand-t small { display: block; color: var(--text-3); font-weight: 400; font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent; transition: .18s;
  user-select: none;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-color: rgba(107, 140, 255, .28);
  color: var(--text); font-weight: 700;
}
.nav-item.active::before {
  content: ""; width: 3px; height: 16px; border-radius: 3px; margin-left: -12px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
/* 菜单图标：单字方块，不用表情符号 */
.nav-item > span {
  width: 22px; height: 22px; flex: none; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: var(--text-3); background: var(--panel-2);
  border: 1px solid var(--line);
  transition: color .18s, background .18s, border-color .18s;
}
.nav-item:hover > span { color: var(--text-2); }
.nav-item.active > span {
  color: var(--accent); background: var(--accent-soft);
  border-color: rgba(107, 140, 255, .3);
}

.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.me-mini { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.me-mini img, .me-mini .ph {
  width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover;
  border: 2px solid var(--line-strong); background: var(--panel-2);
  display: grid; place-items: center; font-weight: 700;
}
.me-mini .nm { font-size: 13px; font-weight: 700; line-height: 1.2; }
.me-mini .rl { font-size: 11px; color: var(--text-3); }

.main { padding: 22px 28px 44px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.topbar h1 { font-size: 21px; letter-spacing: -.3px; }
.topbar p { color: var(--text-3); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.theme-btn {
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--panel-2);
  display: grid; place-items: center; font-size: 15px; transition: .2s;
}
.theme-btn:hover { box-shadow: var(--glow); transform: translateY(-1px); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }

.stat {
  padding: 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); position: relative; overflow: hidden;
}
.stat .k { color: var(--text-3); font-size: 12px; }
.stat .v { font-size: 25px; font-weight: 800; letter-spacing: -.6px; margin-top: 4px; }
.stat .ic {
  position: absolute; right: 14px; top: 12px;
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: var(--text-3); background: var(--panel-2);
  border: 1px solid var(--line);
}

/* ---------------- 镀金 VIP 卡 ---------------- */
.vip-card {
  position: relative;
  border-radius: 22px;
  padding: 24px 26px;
  overflow: hidden;
  color: #2a1c04;
  background:
    radial-gradient(120% 140% at 8% 0%, #fff6cf 0%, #f6d372 26%, #e0ac3c 52%, #b8862a 74%, #8a5f16 100%);
  box-shadow: 0 26px 60px rgba(184, 134, 42, .38), inset 0 1px 0 rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 236, 170, .8);
  isolation: isolate;
}
.vip-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.05) 55%, transparent 70%);
  background-size: 250% 100%;
  animation: goldShine 6.5s linear infinite;
  opacity: .85;
}
.vip-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 1px, transparent 1px 8px),
    radial-gradient(60% 80% at 90% 110%, rgba(255,255,255,.45), transparent 60%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
@keyframes goldShine {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}
.vip-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vip-tier {
  font-size: 11px; font-weight: 800; letter-spacing: 2.4px;
  text-transform: uppercase; opacity: .8;
}
.vip-name {
  font-size: 26px; font-weight: 900; letter-spacing: -.6px; margin-top: 2px;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.vip-chip {
  width: 44px; height: 32px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, #fff8dd, #e6c469 45%, #a97c22);
  box-shadow: inset 0 0 0 1px rgba(120, 84, 12, .35), inset 0 2px 3px rgba(255,255,255,.7);
  position: relative;
}
.vip-chip::before {
  content: ""; position: absolute; inset: 6px 5px;
  border-radius: 3px;
  background-image:
    linear-gradient(90deg, transparent 33%, rgba(120,84,12,.35) 33% 34%, transparent 34% 66%, rgba(120,84,12,.35) 66% 67%, transparent 67%),
    linear-gradient(0deg, transparent 48%, rgba(120,84,12,.35) 48% 52%, transparent 52%);
}
.vip-body { display: flex; align-items: center; gap: 14px; margin: 20px 0 16px; }
.vip-avatar {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  border: 2.5px solid rgba(255, 250, 225, .95);
  box-shadow: 0 6px 18px rgba(120, 84, 12, .35);
  background: #fff8dd;
}
.vip-info .u { font-size: 16px; font-weight: 800; }
.vip-info .q { font-size: 12px; opacity: .75; font-family: ui-monospace, Menlo, monospace; }
.vip-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.vip-bal { font-size: 12px; opacity: .72; letter-spacing: .4px; }
.vip-bal b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.vip-stars { font-size: 13px; letter-spacing: 3px; opacity: .85; }
.vip-expire { font-size: 11px; opacity: .7; margin-top: 2px; }
.vip-locked {
  filter: grayscale(.72) contrast(.95);
  background: linear-gradient(135deg, #cfd6e4, #9aa5bb 55%, #6f7b93);
  box-shadow: 0 18px 40px rgba(60, 70, 92, .28), inset 0 1px 0 rgba(255,255,255,.5);
  color: #1b2231;
}
.vip-locked::before { animation: none; opacity: .25; }

/* ---------------- 功能卡 ---------------- */
.feature {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  background: var(--panel); display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
  position: relative;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--glow); border-color: var(--line-strong); }
.feature.locked { opacity: .62; }
.feature .fi {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; line-height: 1;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(107, 140, 255, .22);
}
.feature .fn { font-weight: 700; font-size: 14px; }
.feature .fd { font-size: 12px; color: var(--text-3); min-height: 18px; }
.feature .fp { font-size: 12px; font-weight: 700; color: var(--warn); }
.feature .fbar { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------------- 弹窗 / 抽屉 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 14, .62); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .18s ease;
}
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
  animation: pop .2s ease;
}
.modal.wide { max-width: 820px; }
.modal h3 { font-size: 17px; margin-bottom: 4px; }
.modal .mh { color: var(--text-3); font-size: 12.5px; margin-bottom: 18px; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* 计费提示行：放在表单底部，明确本次要花多少钱 */
.cost-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(107, 140, 255, .22);
  border-radius: 10px; padding: 9px 12px; margin: 2px 0 12px;
}

/* 代码块 / 终端 */
.term {
  background: #06070d; color: #c9f7d8; border-radius: 12px;
  padding: 14px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.75; max-height: 300px; overflow: auto;
  border: 1px solid rgba(255, 255, 255, .08);
}
[data-theme="light"] .term { background: #10131c; }
.term div.err { color: #ff8a8a; }
.term div.ok { color: #7dffb2; }
.term div.warn { color: #ffd479; }

.copy-code {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px dashed var(--line-strong);
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
}
.copy-code:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; max-height: 220px; overflow: auto; padding: 2px; }
.chip {
  padding: 5px 10px; border-radius: 8px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); transition: .15s;
  user-select: none;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.grp-title { font-size: 12px; font-weight: 700; color: var(--text-3); margin: 12px 0 6px; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 200; display: grid; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); animation: slideIn .22s ease;
  border-left: 3px solid var(--accent); max-width: 360px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------------- 授权短链页 ---------------- */
.lic-body { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.lic-wrap { width: 100%; max-width: 620px; position: relative; z-index: 1; }
.lic-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
[data-theme="light"] .lic-card { background: var(--panel-solid); }
.lic-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.lic-logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.lic-head h1 { font-size: 17px; }
.lic-head p { font-size: 12px; color: var(--text-3); }
.lic-head .theme-btn { margin-left: auto; }
.lic-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px; border-radius: 12px; background: var(--panel-2);
  border: 1px solid var(--line); margin-bottom: 18px;
}
.lic-meta span { font-size: 11px; color: var(--text-3); display: block; }
.lic-meta b { font-size: 13.5px; }
.gold-text {
  background: linear-gradient(120deg, #ffd479, #e0ac3c 50%, #fff3c4);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lic-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lic-tab {
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 6px; align-items: center;
}
.lic-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-color: transparent;
}
.lic-tab span {
  width: 18px; height: 18px; border-radius: 5px; flex: none;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  color: var(--accent); background: var(--accent-soft);
}
.lic-tab.active span { color: #fff; background: rgba(255, 255, 255, .18); }
.btn-gold {
  width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  font-size: 15px; font-weight: 800; color: #2a1c04; letter-spacing: .3px;
  background: linear-gradient(135deg, #ffe9a8, #f0b429 45%, #d9a125 100%);
  box-shadow: 0 12px 30px rgba(217, 161, 37, .32);
  transition: transform .15s, box-shadow .2s;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(217, 161, 37, .45); }
.btn-gold:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.hint { font-size: 12px; color: var(--text-3); min-height: 18px; margin: 4px 0 10px; }
.lic-result { margin-top: 16px; padding: 14px; border-radius: 12px; font-size: 13px; }
.lic-result.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.lic-result.err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3); }
.lic-result p { margin-top: 6px; color: var(--text-2); word-break: break-all; }
.lic-invalid { text-align: center; padding: 34px 10px; }
.lic-invalid .big {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
  color: var(--err); background: var(--panel-2); border: 1px solid var(--line);
}
.lic-invalid h2 { font-size: 19px; margin: 10px 0 6px; }
.lic-invalid p { color: var(--text-3); font-size: 13px; }
.lic-foot { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 18px; }
.items-picker { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--input-bg); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1120px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 244px; z-index: 80;
    transform: translateX(-100%); transition: transform .26s ease;
    box-shadow: var(--shadow);
  }
  .side.open { transform: none; }
  .main { padding: 16px 14px 40px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .lic-meta { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 9px 7px; }
}
.menu-btn { display: none; }
@media (max-width: 900px) { .menu-btn { display: grid; } }
.hide { display: none !important; }

/* =====================================================================
   界面形态：电脑版 / 手机版（data-ui）
   与明暗主题完全独立 —— 任何设备都能自由切换，功能一致，只是版式不同
   ===================================================================== */

.color-input { padding: 3px; height: 42px; cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 7px; }

/* 手机版入口：底部中间一颗「宫格」方键，点开就是居中的功能方格 */
.tabbar { display: none; }
.grid-btn {
  position: relative; width: 60px; height: 60px; border-radius: 19px;
  border: 1px solid var(--line-strong); background: var(--panel-solid);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  display: grid; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px);
  gap: 5px; place-content: center; cursor: pointer;
}
.grid-btn i { width: 9px; height: 9px; border-radius: 2.5px; background: var(--accent); opacity: .92; }
.grid-btn em {
  position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%);
  font-style: normal; font-size: 10px; color: var(--text-3); white-space: nowrap;
}
.grid-btn:active { transform: scale(.96); }

/* ---------------- 宫格工作台 ---------------- */
.home-wrap { max-width: 520px; margin: 8px auto 0; }
.home-hero { text-align: center; padding: 14px 0 22px; }
.home-hero .hh-t { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.home-hero .hh-s { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.home-sec {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-3); margin: 6px 2px 12px;
}
.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-tile {
  aspect-ratio: 1 / 1; border-radius: 18px; border: 1px solid var(--line);
  background: var(--panel); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 9px; cursor: pointer; padding: 6px;
  transition: transform .16s, border-color .2s, box-shadow .2s, background .2s;
}
.home-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--glow); }
.home-tile:active { transform: scale(.97); }
.home-tile .ti {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: var(--accent); background: var(--accent-soft);
}
.home-tile .tn { font-size: 11.5px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.2; }
.grid-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-tools .btn { width: 100%; }

@media (max-width: 380px) {
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------- 源码部署 ---------------- */
.upload-zone {
  border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 26px 18px;
  text-align: center; cursor: pointer; background: var(--panel-2);
  transition: border-color .18s, background .18s;
}
.upload-zone:hover, .upload-zone.on { border-color: var(--accent); background: var(--accent-soft); }
.uz-icon {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .6px;
  color: var(--accent); background: var(--accent-soft);
}
.uz-t { font-weight: 700; font-size: 14px; }
.uz-s { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.uz-file { margin-top: 9px; font-size: 12px; color: var(--text-2); word-break: break-all; }
.dp-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.dp-progress .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.dp-progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .18s; }
.dp-progress span { font-size: 11.5px; color: var(--text-3); min-width: 34px; text-align: right; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpl-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 8px;
}
.tpl-n { font-weight: 700; font-size: 13.5px; }
.tpl-d { font-size: 11.5px; color: var(--text-3); line-height: 1.6; flex: 1; }
.tpl-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-3); }

.dp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dp-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  background: var(--panel); display: flex; flex-direction: column; gap: 10px;
}
.dp-head { display: flex; align-items: center; gap: 10px; }
.dp-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  color: var(--accent); background: var(--accent-soft);
}
.dp-n { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-m { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.dp-url {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11.5px; color: var(--accent); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dp-code { font-size: 11.5px; color: var(--text-3); }
.dp-code b { color: var(--warn); letter-spacing: 1px; font-family: var(--mono, monospace); }
.dp-code span { color: var(--accent); cursor: pointer; margin-left: 6px; }
.dp-stats { display: flex; gap: 14px; font-size: 11px; color: var(--text-3); }
.dp-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-acts .btn { padding: 5px 10px; font-size: 11.5px; }

.dp-crumbs { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.dp-crumb { cursor: pointer; color: var(--accent); }
.dp-table td { font-size: 12px; }
.dp-name { cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.dp-name:hover { color: var(--accent); }
.dp-dir { font-style: normal; color: var(--warn); font-weight: 800; }
.dp-ext {
  font-style: normal; font-size: 9px; text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 4px; min-width: 24px; text-align: center;
}
.code-editor {
  width: 100%; min-height: 380px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.65; tab-size: 2;
  padding: 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); cursor: pointer; }

/* 手机版界面：宽屏时也保持"手机宽度"，两侧留白 */
[data-ui="mobile"] .shell {
  display: block; max-width: 560px; margin: 0 auto; min-height: 100vh;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: var(--bg);
}
[data-ui="mobile"] .side { display: none; }
[data-ui="mobile"] .menu-btn { display: none; }
[data-ui="mobile"] .main { padding: 0 14px 96px; }
[data-ui="mobile"] .topbar {
  position: sticky; top: 0; z-index: 30;
  margin: 0 -14px 14px; padding: 13px 14px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
[data-ui="mobile"] .topbar h1 { font-size: 18px; letter-spacing: -.2px; }
[data-ui="mobile"] .topbar p { font-size: 11.5px; }
[data-ui="mobile"] .topbar-actions { gap: 6px; }
[data-ui="mobile"] .topbar-actions .badge { font-size: 10px; padding: 2px 7px; }
[data-ui="mobile"] .theme-btn { width: 32px; height: 32px; font-size: 13px; }

[data-ui="mobile"] .g2,
[data-ui="mobile"] .g3,
[data-ui="mobile"] .g4 { grid-template-columns: 1fr; }
[data-ui="mobile"] .row2,
[data-ui="mobile"] .row3 { grid-template-columns: 1fr; }
[data-ui="mobile"] .card { padding: 16px; border-radius: 15px; }
[data-ui="mobile"] .vip-card { padding: 20px; border-radius: 18px; }
[data-ui="mobile"] .vip-name { font-size: 22px; }
[data-ui="mobile"] .stat { padding: 14px; }
[data-ui="mobile"] .stat .v { font-size: 21px; }

/* 表格在手机版里横向滚动，避免挤成一团 */
[data-ui="mobile"] table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
[data-ui="mobile"] th, [data-ui="mobile"] td { padding: 9px 8px; font-size: 12px; }
[data-ui="mobile"] td.actions { display: table-cell; }

/* 弹窗变成底部抽屉 */
[data-ui="mobile"] .modal-mask { align-items: flex-end; padding: 0; }
[data-ui="mobile"] .modal {
  max-width: 100%; width: 100%; max-height: 92vh;
  border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { opacity: .5; transform: translateY(36px); } to { opacity: 1; transform: none; } }
[data-ui="mobile"] .modal-foot { position: sticky; bottom: 0; background: var(--panel-solid); padding-top: 12px; }
[data-ui="mobile"] .modal-foot .btn { flex: 1; }

[data-ui="mobile"] body.logged-in .tabbar {
  display: block;
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 60;
  background: none; border: 0; box-shadow: none; padding: 0;
}

/* 手机版下登录页也收成单列 */
[data-ui="mobile"] .auth-page { grid-template-columns: 1fr; }
[data-ui="mobile"] .auth-art { display: none; }
[data-ui="mobile"] .auth-form-wrap { padding: 0 18px; }
[data-ui="mobile"] .auth-box { max-width: 420px; margin: 0 auto; }

[data-ui="mobile"] .toast-wrap { left: 12px; right: 12px; top: 12px; }
[data-ui="mobile"] .toast { max-width: none; }

/* 更多菜单（手机版） */
.more-menu { display: grid; gap: 6px; }
.more-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2);
  font-weight: 600; font-size: 13.5px; text-align: left;
}
.more-item i {
  font-style: normal; width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-3); background: var(--panel); border: 1px solid var(--line);
}
.more-foot { display: grid; gap: 8px; margin-top: 14px; }
.more-foot .btn { width: 100%; }

/* ---------------- 站点卡片 ---------------- */
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
[data-ui="mobile"] .site-grid { grid-template-columns: 1fr; }
[data-ui="mobile"] .dp-grid,
[data-ui="mobile"] .tpl-grid { grid-template-columns: 1fr; }
[data-ui="mobile"] .home-wrap { padding-bottom: 84px; }
[data-ui="mobile"] .grid-tools .btn { font-size: 11.5px; padding: 9px 4px; }
.site-grid .site-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  background: var(--panel); display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.site-grid .site-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--glow); }
.site-card-head { display: flex; align-items: center; gap: 10px; }
.site-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}
.site-t { min-width: 0; flex: 1; }
.site-t b { display: block; font-size: 14.5px; }
.site-t span { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-url { width: 100%; justify-content: center; font-size: 11px; }
.site-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center;
  padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
}
.site-stats b { display: block; font-size: 14.5px; letter-spacing: -.2px; }
.site-stats span { font-size: 10.5px; color: var(--text-3); }
.site-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.site-card-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.site-card-foot .btn { flex: 1 1 auto; }

/* 未开通提示 */
.lock-card { display: flex; align-items: center; gap: 16px; border-style: dashed; flex-wrap: wrap; }
.lock-card .lock-ic {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(107, 140, 255, .22);
}

/* 计费流程 */
.flow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.flow-step {
  flex: 1 1 150px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 2px;
}
.flow-step i {
  width: 20px; height: 20px; border-radius: 50%; margin-bottom: 6px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 11px; font-weight: 800; font-style: normal;
}
.flow-step b { font-size: 13px; }
.flow-step span { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.flow-arrow { display: grid; place-items: center; color: var(--text-3); font-size: 14px; }
[data-ui="mobile"] .flow-arrow { display: none; }

.chip-cost { font-style: normal; margin-left: 6px; font-size: 10.5px; font-weight: 700; color: var(--warn); }
.fee-note {
  padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px;
  font-size: 12.5px; color: var(--text-2); background: var(--panel-2);
}

/* 用户选择器 */
.user-pick { max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 3px; }
.up-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.up-item:hover { background: var(--panel-2); }
.up-item input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.up-av {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.up-n { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 站点落地页 ---------------- */
.site-body { background: var(--bg); }
.site-landing { border-top: 3px solid var(--accent); }
.site-logo { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.site-announce {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); margin-bottom: 16px;
}
.site-announce b { color: var(--text); font-size: 12px; }
.site-gate {
  padding: 20px 18px; border: 1px dashed var(--line-strong); border-radius: 16px;
  background: var(--panel-2); text-align: center;
}
.gate-title { font-weight: 800; font-size: 15.5px; }
.gate-sub { color: var(--text-3); font-size: 12px; margin: 5px 0 15px; }
.gate-row { display: flex; gap: 8px; }
.gate-row input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--input-bg); outline: none;
  font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px;
}
.gate-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.site-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 12px; }
.site-code-bar a { cursor: pointer; color: var(--text-3); }
.site-code-bar a:hover { color: var(--accent); }

/* ---------------- 细节打磨 ---------------- */
.btn:active { transform: translateY(0) scale(.985); }
.nav-item:active { transform: scale(.99); }
.btn:focus-visible, .theme-btn:focus-visible, .chip:focus-visible, .nav-item:focus-visible, .tab-item:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.stat { transition: transform .18s, border-color .18s, box-shadow .2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--glow); }
.copy-code:active { transform: scale(.98); }
.card-title { letter-spacing: .1px; }
.field > label { letter-spacing: .3px; }
.empty .big { filter: saturate(.9); }
.badge { line-height: 1.6; }
td.actions { align-items: center; }

@media (max-width: 1120px) {
  .site-grid { grid-template-columns: 1fr; }
}

/* ==================== 灵动岛（顶部胶囊通知） ==================== */
.island {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 8px;
  min-width: 78px;
  max-width: min(72vw, 460px);
  border-radius: 999px;
  background: rgba(12, 14, 18, .92);
  color: #f4f6fb;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .07);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: width .28s cubic-bezier(.5, 1.4, .4, 1), height .22s, padding .22s, opacity .2s, transform .28s;
}
.island-dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #8ea0b8;
  box-shadow: 0 0 0 0 rgba(126, 226, 158, .5);
  transition: background .2s, box-shadow .3s;
}
.island-txt {
  font-size: 12px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 0; opacity: 0;
  transition: max-width .3s cubic-bezier(.5, 1.4, .4, 1), opacity .22s, margin .28s;
}
.island[data-state="active"] { min-width: 180px; padding: 0 14px; height: 34px; }
.island[data-state="active"] .island-txt { max-width: min(60vw, 400px); opacity: 1; }
.island[data-type="ok"] .island-dot { background: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, .8); }
.island[data-type="err"] .island-dot { background: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, .8); animation: island-blink .9s infinite; }
.island[data-type="info"] .island-dot { background: #6b8cff; box-shadow: 0 0 10px rgba(107, 140, 255, .8); }
@keyframes island-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* 位置 */
.island-left { left: 18px; transform: none; }
.island-right { left: auto; right: 18px; transform: none; }
/* 大小 */
.island-sm { height: 26px; min-width: 64px; }
.island-sm[data-state="active"] { height: 30px; }
.island-sm .island-txt { font-size: 11px; }
.island-lg { height: 36px; min-width: 96px; }
.island-lg[data-state="active"] { height: 40px; }
.island-lg .island-txt { font-size: 13px; }
/* 关闭状态 */
.island-off { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-16px); }
.island-off.island-left, .island-off.island-right { transform: translateY(-16px); }
/* 手机版界面：更贴顶、更窄 */
[data-ui="mobile"] .island { top: calc(8px + env(safe-area-inset-top, 0px)); max-width: 86vw; }
[data-ui="mobile"] .island[data-state="active"] { min-width: 150px; max-width: 86vw; }
[data-ui="mobile"] .island[data-state="active"] .island-txt { max-width: 64vw; }

/* ==================== 成品号列表 · 操作条 ==================== */
.act-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.act-bar .btn { flex: 0 0 auto; }

/* ==================== AI 助手（DeepSeek 代理） ==================== */
.ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  width: 52px; height: 52px; border-radius: 16px; cursor: pointer;
  display: grid; place-items: center; color: #fff; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(34, 211, 238, .28), 0 6px 16px rgba(0, 0, 0, .22);
  transition: transform .18s ease, box-shadow .2s ease;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(34, 211, 238, .38); }
.ai-fab:active { transform: scale(.96); }
.ai-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, .5); animation: aiPulse 2.4s ease-out infinite;
}
@keyframes aiPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .45); }
  70% { box-shadow: 0 0 0 14px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.ai-panel {
  position: fixed; right: 22px; bottom: 86px; z-index: 130;
  width: 360px; max-width: calc(100vw - 28px); height: 460px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden; animation: aiRise .2s ease;
}
@keyframes aiRise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(34, 211, 238, .08));
}
.ai-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, .8); flex: none; }
.ai-close {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text-2); font-size: 18px; line-height: 1;
  display: grid; place-items: center;
}
.ai-close:hover { color: var(--text); border-color: var(--line-strong); }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg {
  max-width: 86%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.ai-sys { align-self: center; text-align: center; color: var(--text-3); background: var(--panel-2); border: 1px dashed var(--line-strong); font-size: 12.5px; }
.ai-user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 4px; }
.ai-bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; }
.ai-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--panel-solid); }
.ai-input input {
  flex: 1; min-width: 0; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--input-bg); outline: none; font-size: 13px;
}
.ai-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-send {
  padding: 10px 16px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; font-size: 13px;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform .15s, opacity .2s;
}
.ai-send:hover { transform: translateY(-1px); }
.ai-send:active { transform: scale(.97); }

/* 手机版界面：助手面板贴底、占满宽度 */
[data-ui="mobile"] .ai-panel {
  right: 10px; left: 10px; bottom: 10px; width: auto;
  height: calc(100vh - 20px); max-height: none;
}
[data-ui="mobile"] .ai-fab { right: 16px; bottom: 16px; }

/* ---------------- 链接套餐（自定义 / 套餐） ---------------- */
.pkg-box { border: 1px solid #e2e4e8; background: #fafbfc; padding: 10px 12px; }
.pkg-t { font-size: 12px; color: #8f98a3; margin-bottom: 6px; }
.pkg-l { font-size: 13px; line-height: 2; color: #1f2329; }
.pkg-i { display: inline-block; margin-right: 14px; white-space: nowrap; }
.pkg-i::after { content: ""; }

/* =====================================================================
   手机版界面（data-ui="mobile"）· 重做
   顶部标题栏 + 统计带 + 白卡 KPI + 通知条 + 分类标签 + 功能胶囊 + 底部三栏
   参考手机 App 首页的信息层级，但配色与结构按本项目重排
   ===================================================================== */
[data-ui="mobile"] {
  --m-bg: #f3f5fa;
  --m-band: linear-gradient(180deg, #dfe9ff 0%, #eaf1ff 62%, #f3f5fa 100%);
  --m-card: #ffffff;
  --m-line: #e8ecf4;
  --m-text: #151a26;
  --m-sub: #7d879b;
  --m-accent: #2f6fed;
}
[data-ui="mobile"] body {
  background: var(--m-bg);
  color: var(--m-text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---- 顶部标题栏 ---- */
[data-ui="mobile"] .m-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--m-line);
}
[data-ui="mobile"] .mh-l { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
[data-ui="mobile"] .mh-shield {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2f6fed, #4fa3ff);
}
[data-ui="mobile"] .mh-name {
  font-size: 14px; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-ui="mobile"] .mh-btn {
  width: 30px; height: 30px; flex: none; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--m-line); background: #fff; color: #56617a;
  display: grid; place-items: center;
}
[data-ui="mobile"] .mh-btn:active { background: #eef2fa; }

/* ---- 框架：让出头部与底部栏 ---- */
[data-ui="mobile"] .shell {
  display: block; max-width: 100%; margin: 0;
  border: 0; background: transparent;
  min-height: 100vh;
  padding-top: calc(52px + env(safe-area-inset-top, 0px));
}
[data-ui="mobile"] .side { display: none !important; }
[data-ui="mobile"] .topbar { display: none !important; }
[data-ui="mobile"] .main { padding: 0 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
[data-ui="mobile"] #pageBody { padding: 0; }

/* ---- 通用小零件 ---- */
[data-ui="mobile"] .card {
  background: var(--m-card); border: 1px solid var(--m-line);
  border-radius: 18px; padding: 16px; box-shadow: 0 4px 18px rgba(21, 30, 51, .05);
}
[data-ui="mobile"] .card-title { font-size: 14.5px; margin-bottom: 12px; }
[data-ui="mobile"] .step, [data-ui="mobile"] .empty-lite { padding: 22px 6px; text-align: center; color: var(--m-sub); font-size: 12.5px; }
.step { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px; color: var(--text-3); font-size: 13px; }
.spin {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 首页 ---- */
.mhome { padding-top: 2px; }
.mband {
  margin: 0 -14px; padding: 8px 14px 40px;
  background: var(--m-band);
  border-bottom-left-radius: 22px; border-bottom-right-radius: 22px;
}
.mband-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px 0 0; }
.mband-i { text-align: center; display: flex; flex-direction: column; gap: 1px; }
.mband-i .k { font-size: 11.5px; color: #5a6a86; }
.mband-i .v { font-size: 19px; font-weight: 800; letter-spacing: -.6px; color: #12172a; font-variant-numeric: tabular-nums; }
.mband-i .s { font-size: 10.5px; color: #7d8aa3; }

.mcard {
  margin: -30px 2px 0; border-radius: 20px; background: #fff;
  border: 1px solid var(--m-line);
  box-shadow: 0 10px 26px rgba(24, 38, 68, .07);
  padding: 16px 6px;
}
.mkpis { display: grid; grid-template-columns: repeat(4, 1fr); }
.mkpi { text-align: center; position: relative; }
.mkpi + .mkpi::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--m-line);
}
.mkpi b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.4px; color: #12172a; font-variant-numeric: tabular-nums; }
.mkpi span { font-size: 11px; color: var(--m-sub); }

.mnotice {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 14px 0 4px; padding: 11px 14px; cursor: pointer;
  border: 1px solid var(--m-line); border-radius: 14px; background: #fff;
  font-size: 12.5px; color: #2b3550; text-align: left;
}
.mnotice .mtag {
  flex: none; font-size: 10.5px; font-weight: 800; color: var(--m-accent);
  background: #eaf1ff; border-radius: 6px; padding: 2px 6px;
}
.mnotice .mtxt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnotice .marr { color: #b9c2d4; font-size: 16px; line-height: 1; }

.mtabs { display: flex; gap: 20px; margin: 16px 2px 12px; overflow-x: auto; scrollbar-width: none; }
.mtabs::-webkit-scrollbar { display: none; }
.mtab {
  position: relative; flex: none; border: 0; background: none; padding: 4px 0 8px;
  font-size: 14px; color: #6b7688; cursor: pointer; font-weight: 600;
}
.mtab.active { color: #12172a; font-weight: 800; }
.mtab.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 22px; height: 3px; border-radius: 3px; background: var(--m-accent);
}

.mpills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mpill {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 10px; border-radius: 13px; cursor: pointer; text-align: left;
  border: 1px solid var(--m-line); background: #fff;
  box-shadow: 0 2px 8px rgba(21, 30, 51, .04);
}
.mpill:active { transform: scale(.98); }
.mpill .pi {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.mpill .pn { font-size: 12px; font-weight: 600; color: #2b3550; line-height: 1.25; }
.pi-blue { color: #2f6fed; background: #e9f0ff; }
.pi-green { color: #12996a; background: #e6f7f0; }
.pi-orange { color: #c4761b; background: #fdf1e3; }
.pi-purple { color: #7a52d6; background: #f0ebff; }
.pi-cyan { color: #0f93a8; background: #e3f7fa; }
.pi-pink { color: #d1478c; background: #fdeaf3; }
.pi-gray { color: #5c6a82; background: #eff2f7; }

.msec { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 8px; }
.msec span { font-size: 13.5px; font-weight: 700; color: #12172a; }
.msec a { font-size: 12px; color: var(--m-sub); cursor: pointer; }
.mbox { background: #fff; border: 1px solid var(--m-line); border-radius: 16px; overflow: hidden; }
.mbox.empty-lite { padding: 18px; text-align: center; color: var(--m-sub); font-size: 12.5px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f2f4f9; }
.mrow:last-child { border-bottom: 0; }
.mrow-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow-l b { font-size: 13px; font-weight: 600; }
.mrow-l span { font-size: 11px; color: var(--m-sub); }
.mfoot-tip { text-align: center; font-size: 11px; color: #a3adc0; margin: 22px 0 6px; }

/* ---- 底部三栏 ---- */
[data-ui="mobile"] .tabbar {
  padding: 0; border: 0; background: none; box-shadow: none;
}
[data-ui="mobile"] .tabbar .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 6px; border: 0; background: none; cursor: pointer;
  color: #8b95a8; font-size: 10.5px; border-radius: 16px;
  transition: color .18s, background .18s;
}
[data-ui="mobile"] .tabbar .tab-item .ti-ic { display: grid; place-items: center; }
[data-ui="mobile"] .tabbar .tab-item.active { color: var(--m-accent); font-weight: 700; }
[data-ui="mobile"] .tabbar .tab-item.active .ti-ic { transform: translateY(-1px); }

/* 首页 / 消息 / 我的 三页通用 ---- */
.mpage { padding-top: 2px; }
.mmsg { padding: 16px; }
.mmsg-t { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.mmsg-b { font-size: 12.8px; color: #4b5670; line-height: 1.75; white-space: pre-wrap; }
.mmsg-f { font-size: 11px; color: #a3adc0; margin-top: 10px; }
.mme {
  display: flex; align-items: center; gap: 12px;
  padding: 18px; border-radius: 20px; background: #fff;
  border: 1px solid var(--m-line); box-shadow: 0 6px 20px rgba(24, 38, 68, .06);
}
.mme img, .mme .mme-ph {
  width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2f6fed, #4fa3ff);
}
.mme-i { flex: 1; min-width: 0; }
.mme-i b { display: block; font-size: 15px; }
.mme-i span { font-size: 11.5px; color: var(--m-sub); }
.mme-b { text-align: right; }
.mme-b b { display: block; font-size: 16px; font-weight: 800; color: #12172a; }
.mme-b span { font-size: 11px; color: var(--m-sub); }

.mlist { margin-top: 14px; }
.mlink {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 14px 16px; border: 0; border-bottom: 1px solid #f2f4f9;
  background: #fff; text-align: left; cursor: pointer;
}
.mlink:last-child { border-bottom: 0; }
.mlink .ml-i { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mlink .ml-i b { font-size: 13.5px; font-weight: 600; color: #1a2133; }
.mlink .ml-i span { font-size: 11.5px; color: var(--m-sub); }
.mlink .ml-a { color: #c3cad8; font-size: 18px; line-height: 1; }
.mlink.danger .ml-i b { color: #c0392b; }

/* ---- 手机版底部三栏：胶囊条 ---- */
[data-ui="mobile"] body.logged-in .tabbar {
  display: flex; width: min(92vw, 430px);
  padding: 5px 6px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--m-line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(20, 30, 55, .14);
  backdrop-filter: blur(16px);
}

/* ---- 侧栏遮罩（电脑版界面在手机上打开时用） ---- */
.side-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 18, 30, .42);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.side-mask.on { opacity: 1; pointer-events: auto; }

/* =====================================================================
   电脑版界面（data-ui="desktop"）在手机 / 平板上打开
   ---------------------------------------------------------------------
   旧版问题：桌面布局固定 192px 侧栏 + 宽表格，视口不足时整页被撑宽，
   浏览器横向滚动后视觉上「内容整体偏右、左侧一片空白」。
   这里在窄屏把侧栏收成抽屉、表格改为容器内横向滚动，并禁止整页横向溢出。
   ===================================================================== */
@media (max-width: 900px) {
  html, body { max-width: 100%; }
  body { overflow-x: hidden; }




  /* 表格：自身横向滚动，不把整页撑宽 */

}

/* =====================================================================
   链接库 / 领取向导 / 快速充值 · 组件
   ===================================================================== */
/* 步骤条 */
.lk-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.lk-step {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 2px;
}
.lk-step i {
  width: 20px; height: 20px; border-radius: 50%; margin-bottom: 4px; font-style: normal;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  color: var(--accent); background: var(--accent-soft);
}
.lk-step b { font-size: 12.5px; }
.lk-step span { font-size: 11px; color: var(--text-3); }

/* 类型大按钮 */
.lk-kind-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lk-kind {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--panel-2);
}
.lk-kind:hover { border-color: var(--accent); }
.lk-kind.off { opacity: .55; }
.lk-k-t { font-size: 14px; font-weight: 700; }
.lk-k-s { font-size: 11.5px; color: var(--text-3); }
.lk-k-a { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 4px; }

/* 作者：分类卡片 */
.lk-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.lk-cat {
  min-width: 168px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 2px;
}
.lk-cat.on { border-color: var(--accent); background: var(--accent-soft); }
.lk-cat .lc-k {
  align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  color: var(--accent); background: rgba(47, 111, 237, .1); border-radius: 5px; padding: 1px 5px;
}
.lk-cat .lc-n { font-size: 13.5px; font-weight: 700; }
.lk-cat .lc-s { font-size: 11px; color: var(--text-3); }
.lk-cat.add { justify-content: center; align-items: center; border-style: dashed; color: var(--text-3); }
.lk-cat.add .lc-n { font-size: 12.5px; font-weight: 600; }

.lk-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lk-sub {
  cursor: pointer; text-align: left; border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 12px; background: var(--panel-2);
  display: flex; flex-direction: column; gap: 1px;
}
.lk-sub b { font-size: 13px; }
.lk-sub span { font-size: 11px; color: var(--text-3); }
.lk-sub.on { border-color: var(--accent); background: var(--accent-soft); }
.lk-sub.add { justify-content: center; color: var(--text-3); font-size: 12.5px; border-style: dashed; }
.lk-import { border-top: 1px dashed var(--line); padding-top: 14px; }

/* 领取向导 */
.step-t { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; }
.step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  background: var(--panel-2); cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
}
.step-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.step-card .sc-t { font-size: 15px; font-weight: 700; }
.step-card .sc-s { font-size: 12px; color: var(--text-3); }

.step-list { display: grid; gap: 12px; max-height: 52vh; overflow: auto; }
.step-grp-t { font-size: 11.5px; font-weight: 700; color: var(--text-3); margin: 4px 0 6px; }
.step-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); text-align: left;
  margin-bottom: 6px;
}
.step-row:hover { border-color: var(--accent); }
.step-row .sr-n { flex: 1; font-size: 13.5px; font-weight: 600; }
.step-row .sr-s { font-size: 11.5px; color: var(--text-3); }
.step-row .sr-a { font-size: 12px; color: var(--accent); font-weight: 700; }

.claim-ok { border: 1px solid rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .07); border-radius: 14px; padding: 14px; }
.claim-ok .co-t { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.claim-ok .co-url {
  font-size: 13px; word-break: break-all; line-height: 1.7;
  background: var(--panel-solid); border: 1px dashed var(--line-strong);
  border-radius: 10px; padding: 10px 12px;
}
.claim-ok .co-tip { font-size: 11.5px; color: var(--text-3); margin-top: 8px; }

/* 快速充值 */
.qk-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.qk-tab {
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer;
  border-radius: 9px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2);
}
.qk-tab em {
  font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 5px;
  background: var(--panel-solid); border-radius: 5px; padding: 0 4px;
}
.qk-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.qk-tab.on em { background: rgba(255, 255, 255, .24); color: #fff; }
.qk-tab.has em { background: #ffe4b8; color: #8a5a00; }
.qk-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.qk-tools .char-search { flex: 1; min-width: 160px; }
.qk-list {
  max-height: 380px; overflow: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
  background: var(--input-bg);
}
.qk-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px;
  font-size: 12.5px; cursor: pointer; border-radius: 8px; min-width: 0;
}
.qk-item:hover { background: var(--panel-2); }
.qk-item.on { background: var(--accent-soft); }
.qk-item input { width: 14px; height: 14px; accent-color: var(--accent); flex: none; }
.qk-item .qk-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qk-item .qk-c { font-size: 10.5px; color: var(--text-3); font-family: ui-monospace, Menlo, monospace; }
.qk-bar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.qk-bar-i { flex: 1; font-size: 12.5px; color: var(--text-2); }
.qk-bar-i b { font-size: 16px; color: var(--accent); }
.qk-bar-i span { margin-left: 10px; color: var(--text-3); }

/* 历史短信样式（保留占位，不影响布局） */
.sms-phone {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px;
  font-weight: 700; letter-spacing: 1px; color: var(--text);
}
.sms-code {
  display: inline-block; margin-top: 10px; padding: 8px 16px; border-radius: 10px;
  font-size: 22px; font-weight: 800; letter-spacing: 3px;
  background: var(--accent-soft); color: var(--accent);
}
.sms-raw {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px dashed var(--line-strong);
  font-size: 12.5px; color: var(--text-2); word-break: break-all;
}

/* 手机版：这些组件收窄 */
[data-ui="mobile"] .lk-steps { grid-template-columns: repeat(3, 1fr); gap: 6px; }
[data-ui="mobile"] .lk-step { padding: 8px; }
[data-ui="mobile"] .lk-kind-list { grid-template-columns: 1fr 1fr; }
[data-ui="mobile"] .lk-cat { min-width: 0; flex: 1 1 45%; }
[data-ui="mobile"] .qk-list { grid-template-columns: 1fr; max-height: 52vh; }
[data-ui="mobile"] .step-grid { grid-template-columns: 1fr; }
[data-ui="mobile"] .qk-bar { bottom: 84px; }
[data-ui="mobile"] .lk-subs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
[data-ui="mobile"] .lk-sub { flex: none; }

/* 手机版：提示条下移到标题栏之下；灵动岛在手机版整体隐藏（顶部已有标题栏，放了会压住通知条） */
[data-ui="mobile"] .toast-wrap { top: calc(62px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; }
[data-ui="mobile"] .island { display: none !important; }
[data-ui="mobile"] .ai-fab {
  right: 14px; bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: 46px; height: 46px; border-radius: 14px;
}
[data-ui="mobile"] .mpill .pn { font-size: 11.5px; }

/* 领取向导：弹窗正文容器（不要套用加载态的 .step 居中样式） */
.step-body { display: block; }
[data-ui="mobile"] .step-body { padding-bottom: 2px; }

/* 手机版：快速充值底部结算条固定悬浮；助手按钮在手机版隐藏，避免挡住操作 */
[data-ui="mobile"] .qk-bar {
  position: fixed; left: 14px; right: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  padding: 10px 14px; border-radius: 16px; margin: 0;
}
[data-ui="mobile"] .qk-wrap { padding-bottom: 92px; }
[data-ui="mobile"] .ai-fab { display: none; }

/* =====================================================================
 * 电脑版界面在手机 / 平板上的收尾微调
 * 目标：窄屏下顶栏不挤成两行，标题单行省略，右侧操作按钮保持一行
 * ===================================================================== */
@media (max-width: 900px) {
  /* 窄屏顶栏放不下 4 个标签，会员等级在「我的资料」里也能看到，这里先收起 */
  /* 会员卡 / 资料卡在窄屏下内边距收一点，避免出现横向滚动 */
  /* 弹窗内的两列按钮改成整行，手指更好点 */
}

/* =====================================================================
 * 手机版：栅格防溢出
 * 原因：`1fr` 的隐含最小值是 min-content，卡片里一旦出现表格 / 长链接 /
 *       三栏步骤条，轨道就会被撑到 400px+，把整页撑出横向滚动，
 *       连带底部抽屉弹窗也跟着变宽（fixed 遮罩按视口算，视口被撑大）。
 * 处理：手机版所有栅格轨道改 minmax(0, 1fr)，并给子项 min-width:0。
 * ===================================================================== */
[data-ui="mobile"] .g2,
[data-ui="mobile"] .g3,
[data-ui="mobile"] .g4,
[data-ui="mobile"] .row2,
[data-ui="mobile"] .row3,
[data-ui="mobile"] .grid,
[data-ui="mobile"] .lk-steps,
[data-ui="mobile"] .lk-kind-list,
[data-ui="mobile"] .site-grid,
[data-ui="mobile"] .tpl-grid,
[data-ui="mobile"] .dp-grid,
[data-ui="mobile"] .home-grid {
  grid-template-columns: minmax(0, 1fr);
}
[data-ui="mobile"] .lk-kind-list,
[data-ui="mobile"] .lk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-ui="mobile"] .lk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

[data-ui="mobile"] .grid > *,
[data-ui="mobile"] .g2 > *,
[data-ui="mobile"] .g3 > *,
[data-ui="mobile"] .g4 > *,
[data-ui="mobile"] .row2 > *,
[data-ui="mobile"] .row3 > *,
[data-ui="mobile"] .lk-steps > *,
[data-ui="mobile"] .lk-kind-list > * { min-width: 0; }

/* 表格 / 长链接自己滚，不要把外层撑宽 */
[data-ui="mobile"] .card,
[data-ui="mobile"] .modal { overflow-wrap: anywhere; }

/* 电脑版界面在窄屏下若打开「首页」，蓝色统计带的负边距要和 #pageBody 的 12px 对齐 */
@media (max-width: 900px) {
}

/* 手机版：列表里的小按钮（复制 / 删除 / 查看）统一成小圆角胶囊，别用桌面那种方角大按钮 */
[data-ui="mobile"] .mini-btn {
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9px;
  border: 1px solid var(--m-line);
  background: #fff;
  color: var(--m-accent);
}
[data-ui="mobile"] .mini-btn:active { background: #eef3ff; }
[data-ui="mobile"] .mrow .mini-btn { flex: none; }

/* 手机版：统计卡（库/取/站/类）走 2×2，比竖着排 4 个大卡片紧凑得多 */
[data-ui="mobile"] .g4,
[data-ui="mobile"] .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-ui="mobile"] .g4 .stat,
[data-ui="mobile"] .g3 .stat { padding: 12px 14px; }

/* =====================================================================
 * v3.5 新增：游戏功能折叠 / 我的套餐 / 实时消息 / 公告
 * ===================================================================== */

/* ---------- 通用色彩块 ---------- */
.pi-blue   { background: #e8f0ff; color: #2b6cff; }
.pi-green  { background: #e6f8ef; color: #12945a; }
.pi-orange { background: #fff1e2; color: #d97706; }
.pi-violet { background: #efe9ff; color: #6d4aff; }
.pi-cyan   { background: #e2f7fb; color: #0891b2; }
.pi-pink   { background: #ffe9f2; color: #db2777; }
.pi-purple { background: #f0e9ff; color: #7c3aed; }
.pi-gray   { background: #eef1f6; color: #64748b; }

/* ---------- 游戏功能：折叠列表 ---------- */
.acc { display: flex; flex-direction: column; gap: 10px; }
.acc-item {
  background: var(--m-card, var(--panel));
  border: 1px solid var(--m-line, var(--line));
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.acc-item.open { border-color: rgba(47, 111, 237, .35); box-shadow: 0 6px 20px rgba(47, 111, 237, .08); }
.acc-hd {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; background: none; border: 0; cursor: pointer;
  text-align: left; color: var(--text); font: inherit;
}
.acc-hd:active { background: rgba(47, 111, 237, .04); }
.acc-ic {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.acc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acc-t b { font-size: 14.5px; font-weight: 650; }
.acc-t em {
  font-style: normal; font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acc-right { display: flex; align-items: center; gap: 8px; flex: none; }
.acc-p { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.acc-ar { flex: none; color: var(--text-3); font-size: 20px; line-height: 1; transition: transform .2s; }
.acc-item.open .acc-ar { transform: rotate(90deg); }
.acc-bd { display: none; border-top: 1px dashed var(--m-line, var(--line)); }
.acc-item.open .acc-bd { display: block; }
.acc-inner { padding: 14px 16px 16px; }
.acc-desc { font-size: 13px; line-height: 1.8; color: var(--text-2); margin-bottom: 10px; }
.acc-kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--m-line, var(--line));
  font-size: 12.5px; color: var(--text-3);
}
.acc-kv b { color: var(--text); font-weight: 650; }
.acc-tip { margin-top: 10px; font-size: 12px; color: var(--err); }
.acc-btns { margin-top: 14px; display: flex; gap: 10px; }
.acc-btns .btn { flex: 1; }
.acc-item.locked .acc-ic { filter: grayscale(.6); opacity: .7; }
.acc-item.locked .acc-t b { color: var(--text-2); }

/* ---------- 我的套餐 ---------- */
.pkg-top .pkg-lead { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin: 6px 0 12px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.pkg-card {
  background: var(--m-card, var(--panel));
  border: 1px solid var(--m-line, var(--line));
  border-radius: 14px; padding: 14px 16px;
}
.pkg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pkg-h b { font-size: 15px; font-weight: 650; }
.pkg-h span { font-size: 12px; color: var(--text-3); flex: none; }
.pkg-f { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pkg-chip {
  font-size: 11.5px; padding: 4px 9px; border-radius: 8px;
  background: rgba(47, 111, 237, .08); color: #2f6fed; font-weight: 600;
}
.pkg-chip.off { background: rgba(220, 38, 38, .08); color: var(--err); }
.pkg-t { font-size: 11.5px; color: var(--text-3); }
.pkg-bar { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pkg-bar .mini-btn { flex: none; }
.mini-btn.primary { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.mini-btn.danger { color: var(--err); border-color: rgba(220, 38, 38, .3); }
.pkg-note { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 10px; }
.pkg-pick { max-height: 220px; overflow-y: auto; }
.pkg-pick .chip em { font-style: normal; opacity: .6; margin-left: 5px; font-size: 11px; }
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lic-card {
  border: 1px solid var(--m-line, var(--line)); border-radius: 14px;
  padding: 13px 15px; background: var(--m-card, var(--panel));
}
.lc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-h b { font-size: 14px; }
.lc-f { font-size: 12px; color: var(--text-2); margin-top: 7px; line-height: 1.6; }
.lc-m { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* ---------- 公告（用户端） ---------- */
.mnlist { padding: 4px 0; }
.mnrow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--m-line, var(--line));
  text-align: left; color: inherit; font: inherit; cursor: pointer;
}
.mnrow:last-child { border-bottom: 0; }
.mnrow-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mnrow-b b { font-size: 14px; font-weight: 650; }
.mnrow-b span {
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mnrow-t { flex: none; font-size: 11.5px; color: var(--text-3); }
.mtag { flex: none; font-size: 10.5px; padding: 3px 7px; border-radius: 6px; background: rgba(47,111,237,.1); color: #2f6fed; font-weight: 700; }
.mtag.imp { background: rgba(220, 38, 38, .1); color: var(--err); }
.mtag.pin { background: rgba(217, 119, 6, .12); color: #d97706; }

.notice-body { font-size: 13.5px; line-height: 1.95; color: var(--text); white-space: normal; }
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item {
  text-align: left; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; color: inherit; font: inherit; cursor: pointer;
}
.notice-item .ni-h { display: flex; align-items: center; gap: 8px; }
.notice-item .ni-h b { font-size: 14px; }
.notice-item .ni-b { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.notice-item .ni-t { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* ---------- 消息：微信式消息流 ---------- */
.mchat { display: flex; flex-direction: column; gap: 14px; padding: 6px 2px 10px; }
.mc-day { text-align: center; font-size: 11px; color: var(--text-3); margin: 4px 0 2px; }
.mc-row { display: flex; gap: 9px; align-items: flex-start; }
.mc-av {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.mc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mc-bub {
  max-width: 100%; background: var(--m-card, #fff);
  border: 1px solid var(--m-line, var(--line));
  border-radius: 4px 14px 14px 14px;
  padding: 10px 13px; position: relative;
}
.mc-bub.st-running { border-color: rgba(47, 111, 237, .35); background: rgba(47, 111, 237, .05); }
.mc-bub.st-fail { border-color: rgba(220, 38, 38, .28); background: rgba(220, 38, 38, .04); }
.mc-h { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.mc-h b { font-size: 13.5px; font-weight: 650; }
.mc-bub p { font-size: 12.8px; line-height: 1.75; color: var(--text-2); word-break: break-word; }
.mc-tag { font-style: normal; font-size: 10px; padding: 2px 6px; border-radius: 5px; font-weight: 700; }
.mc-tag.run { background: rgba(47,111,237,.12); color: #2f6fed; }
.mc-tag.err { background: rgba(220,38,38,.12); color: var(--err); }
.mc-time { font-size: 10.5px; color: var(--text-3); padding-left: 2px; }
.mc-row.new .mc-bub { box-shadow: 0 0 0 2px rgba(47, 111, 237, .12); }
.mc-bar {
  position: sticky; bottom: 0; margin-top: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  text-align: center;
}
.mc-lock { font-size: 12px; color: var(--text-3); }

/* 底部三栏：未读红点 */
.tab-item .ti-ic { position: relative; }
.ti-dot {
  position: absolute; top: -5px; left: 12px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #ef4444; color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700; line-height: 16px;
  text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* ---------- 公告管理（作者端） ---------- */
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 14px; }
.nt-card {
  background: var(--m-card, var(--panel)); border: 1px solid var(--m-line, var(--line));
  border-radius: 14px; padding: 14px 16px;
}
.nt-card.draft { opacity: .78; border-style: dashed; }
.nt-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-h b { font-size: 14.5px; flex: 1; min-width: 0; }
.nt-b { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-top: 8px; }
.nt-t { font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.ck { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 10px 0; }
.ck input { width: 16px; height: 16px; }

/* ---------- 手机版适配 ---------- */
[data-ui="mobile"] .acc-hd { padding: 13px 14px; }
[data-ui="mobile"] .acc-t em { font-size: 11.5px; }
[data-ui="mobile"] .acc-right .badge { display: none; }
[data-ui="mobile"] .acc-p { font-size: 12px; }
[data-ui="mobile"] .pkg-grid,
[data-ui="mobile"] .lic-grid,
[data-ui="mobile"] .nt-grid { grid-template-columns: minmax(0, 1fr); }
[data-ui="mobile"] .mc-bub { background: #fff; }
[data-ui="mobile"] .mc-bar { margin-bottom: 4px; }
[data-ui="mobile"] .mchat-page { padding-bottom: 8px; }
[data-ui="mobile"] .pkg-card,
[data-ui="mobile"] .lic-card,
[data-ui="mobile"] .nt-card { padding: 13px 14px; }
[data-ui="mobile"] .pkg-bar .mini-btn { flex: 1; height: 34px; }
[data-ui="mobile"] .acc-btns .btn { height: 40px; }

/* =====================================================================
 * v3.5.1 新增
 * 1) 侧栏分组折叠（对齐参考图：分组标题 + 箭头，点开露出子项）
 * 2) 游戏功能：分组折叠列表（组标题一行，展开是功能行，不再是方格）
 * 3) 电脑版在手机上按 1000px 渲染后的紧凑微调
 * ===================================================================== */

/* ---------- 侧栏分组 ---------- */
.nav-grp { margin: 0; }
.nav-grp-h {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; padding: 12px 14px 6px; border: 0; background: none;
  font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .4px;
  color: var(--text-3); cursor: pointer; text-align: left;
}
.nav-grp-h:hover { color: var(--text-2); }
.nav-grp-h i {
  font-style: normal; font-size: 14px; line-height: 1;
  color: var(--text-3); transition: transform .18s ease; transform: rotate(0deg);
}
.nav-grp.open .nav-grp-h i { transform: rotate(90deg); }
.nav-grp-b { display: none; }
.nav-grp.open .nav-grp-b { display: block; }

/* ---------- 游戏功能：顶部统计 ---------- */
.fstat {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.fstat > div {
  background: var(--m-card, var(--panel)); border: 1px solid var(--m-line, var(--line));
  border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.fstat b { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.fstat span { font-size: 11.5px; color: var(--text-3); }

/* ---------- 游戏功能：分组折叠 ---------- */
.acc { display: flex; flex-direction: column; gap: 10px; }
.acc-grp {
  background: var(--m-card, var(--panel));
  border: 1px solid var(--m-line, var(--line));
  border-radius: 14px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.acc-grp.open { border-color: rgba(47, 111, 237, .3); box-shadow: 0 6px 20px rgba(47, 111, 237, .07); }
.acc-gh {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; background: none; border: 0; cursor: pointer;
  text-align: left; color: var(--text); font: inherit;
}
.acc-gh:active { background: rgba(47, 111, 237, .04); }
.acc-gi {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.acc-gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-gt b { font-size: 14.5px; font-weight: 650; }
.acc-gt em { font-style: normal; font-size: 12px; color: var(--text-3); }
.acc-gc {
  flex: none; font-size: 11.5px; font-weight: 600; color: var(--text-3);
  background: rgba(15, 23, 42, .05); border-radius: 7px; padding: 3px 8px;
}
.acc-ar {
  flex: none; color: var(--text-3); font-size: 19px; line-height: 1;
  transition: transform .2s ease;
}
.acc-grp.open .acc-ar { transform: rotate(90deg); }
.acc-gb { display: none; border-top: 1px dashed var(--m-line, var(--line)); }
.acc-grp.open .acc-gb { display: block; }

.acc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px dashed var(--m-line, var(--line));
  cursor: pointer; transition: background .15s;
}
.acc-row:last-child { border-bottom: 0; }
.acc-row:hover { background: rgba(47, 111, 237, .045); }
.acc-row:active { background: rgba(47, 111, 237, .08); }
.acc-rl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-rl b { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; }
.acc-rl em { font-style: normal; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-lk {
  font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 5px; background: rgba(220, 38, 38, .1); color: var(--err);
}
.acc-rr { flex: none; display: flex; align-items: center; gap: 6px; }
.acc-p { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.acc-go { color: var(--text-3); font-size: 17px; line-height: 1; }
.acc-row.locked { opacity: .62; }
.acc-row.locked .acc-p { color: var(--text-3); }

/* ---------- 电脑版在手机上（viewport 1000）时收紧一点 ---------- */
@media (min-width: 901px) and (max-width: 1080px) {
}

/* 手机版：功能分组卡片内边距小一点，一行能放全 */
[data-ui="mobile"] .fstat { gap: 8px; }
[data-ui="mobile"] .fstat > div { padding: 10px 12px; }
[data-ui="mobile"] .fstat b { font-size: 17px; }
[data-ui="mobile"] .acc-gh { padding: 12px 14px; gap: 10px; }
[data-ui="mobile"] .acc-gi { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
[data-ui="mobile"] .acc-gt b { font-size: 14px; }
[data-ui="mobile"] .acc-row { padding: 11px 14px; }
[data-ui="mobile"] .acc-rl b { font-size: 13.5px; }
[data-ui="mobile"] .acc-rl em { font-size: 11.5px; }

/* 1000px 逻辑宽（手机上看电脑版）时，登录页改成单列，避免表单超出首屏 */
@media (max-width: 1080px) {
}

/* ---------- 快速充值：元信息行（版本 / 角色数 / 计费） ---------- */
.qk-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px;
  margin: 12px 0 4px; font-size: 12.5px; color: var(--text-3);
}
.qk-meta > span { position: relative; }
.qk-meta > span + span::before {
  content: ''; position: absolute; left: -9px; top: 50%;
  width: 1px; height: 11px; margin-top: -6px; background: var(--line-strong, var(--line));
}
.qk-meta b { color: var(--text); font-weight: 650; }

/* 底部结算条是 fixed 的，页面要留出足够空白，否则最后一行角色被压住 */
[data-ui="mobile"] .qk-wrap { padding-bottom: 178px; }
[data-ui="mobile"] .qk-meta { gap: 4px 16px; font-size: 12px; }
[data-ui="mobile"] .char-grid { max-height: none; overflow: visible; }

/* ---------- 手机版角色选择：两列卡片，别挤成一段文字 ---------- */
[data-ui="mobile"] .char-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 10px;
}
[data-ui="mobile"] .char-chip {
  display: flex; align-items: center; gap: 7px;
  min-height: 0; padding: 10px 11px;
  border: 1px solid var(--m-line, var(--line));
  border-radius: 11px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
[data-ui="mobile"] .char-chip.on {
  border-color: #2f6fed;
  background: #eef4ff;
  color: #1b4fd8;
  font-weight: 600;
}
[data-ui="mobile"] .char-chip input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0; flex: none;
  accent-color: #2f6fed;
}
[data-ui="mobile"] .char-chip .nm {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-ui="mobile"] .char-chip .sk {
  flex: none; font-size: 10.5px; color: var(--text-3); font-weight: normal;
}
[data-ui="mobile"] .char-chip.on .sk { color: #4d7ae8; }

/* 手机版：套餐/短链卡片的操作按钮三等分，别让「删除」被挤出卡片 */
[data-ui="mobile"] .pkg-bar { gap: 6px; }
[data-ui="mobile"] .pkg-bar .mini-btn {
  flex: 1 1 0; min-width: 0;
  padding: 0 4px; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  justify-content: center;
}
[data-ui="mobile"] .pkg-note { margin-top: 14px; }
[data-ui="mobile"] .lic-card .pkg-bar .mini-btn { font-size: 11.5px; }

/* 卡片里紧跟在按钮后面的说明文字，留一点距离，别贴在一起 */
.card > .btn + .tip,
.card > .btn + .pkg-lead,
.card > .btn + .pkg-note { margin-top: 12px; }
.card > .btn + .tip { margin-top: 14px; }

/* 手机版：除首页（蓝色统计带要顶到标题栏）外，其余页面首个卡片跟标题栏留一点距离 */
[data-ui="mobile"] #pageBody > .card:first-child,
[data-ui="mobile"] #pageBody > .fstat:first-child,
[data-ui="mobile"] #pageBody > .qk-wrap:first-child { margin-top: 10px; }

/* 消息页公告行：标题单行省略，避免「版」字掉到第二行 */
.mnrow-b b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnrow { align-items: flex-start; }
.mnrow-t { margin-top: 2px; }
.mnrow > .mtag { margin-top: 2px; }
