:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f7f9fb;
  --line: #e4e8ee;
  --line-2: #d4dae3;
  --text: #1f2a37;
  --muted: #6b7786;
  --primary: #2f6fed;
  --primary-2: #245ed6;
  --primary-soft: #eaf1fe;
  --success: #1f9d55;
  --success-soft: #e6f6ec;
  --danger: #d93025;
  --danger-soft: #fdecea;
  --warn: #b7791f;
  --warn-soft: #fff4de;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex: 0 0 220px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  padding: 20px 22px; font-weight: 700; font-size: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--primary);
}
.sidebar nav { flex: 1; padding: 10px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0; border-radius: 8px; color: var(--text);
}
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-sub { padding: 2px 0 4px; }
.nav-sub-item { display: block; padding: 6px 12px 6px 40px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.nav-sub-item:hover { color: var(--text); text-decoration: none; background: var(--panel-2); }
.nav-sub-item.active { color: var(--primary); font-weight: 600; }
.sidebar-foot { padding: 14px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.content { flex: 1; min-width: 0; padding: 0 28px 40px; }
.topbar { padding: 20px 0 14px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; }
.intro { color: var(--muted); margin: -6px 0 14px; font-size: 13px; }

/* ---------- 卡片 / 表格 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.table-wrap { padding: 0; overflow-x: auto; scrollbar-width: none; }
.table-wrap::-webkit-scrollbar { display: none; height: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.table-tight th, .table-tight td { padding: 6px 8px; }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .3px; }
th:first-child { border-top-left-radius: var(--radius); }
th:last-child { border-top-right-radius: var(--radius); }
tbody tr:hover { background: #fafbfd; }
td.empty { text-align: center; color: var(--muted); padding: 34px; }
th.ops, td.ops { text-align: right; white-space: nowrap; }
.clip { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.clip-short { max-width: 160px; }

/* 可点击编辑的单元格 */
td[data-edit] { cursor: pointer; position: relative; }
td[data-edit]:hover { background: var(--primary-soft); }
td[data-edit]:hover::after {
  content: "✎"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--primary); opacity: .7;
}
td[data-edit="bool"]:hover::after { content: none; }
td.editing { background: #fff; padding: 4px 6px; }
.inline-input {
  width: 100%; min-width: 120px; padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--primary); background: #fff; color: var(--text);
  font: inherit; box-shadow: 0 0 0 3px rgba(47,111,237,.15); outline: none;
}
textarea.inline-input { min-width: 320px; resize: vertical; line-height: 1.5; }
td.editing input[type=number].inline-input { min-width: 100px; }

/* 开关 */
.toggle {
  display: inline-block; width: 36px; height: 20px; border-radius: 10px;
  background: #cfd6e0; position: relative; vertical-align: middle; transition: background .15s;
}
.toggle i {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s;
}
.toggle.on { background: var(--success); }
.toggle.on i { left: 18px; }

/* 出生设置页的自定义出生点开关 */
.birth-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 14px; padding: 12px 16px; border-left: 3px solid #cfd6e0;
}
.birth-switch.on { border-left-color: var(--success); }
.birth-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.birth-text .muted { font-size: 13px; }
.birth-toggle { flex: 0 0 auto; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.birth-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,111,237,.2); }
.birth-toggle:disabled { cursor: progress; opacity: .6; }
.birth-toggle .toggle { width: 44px; height: 24px; border-radius: 12px; }
.birth-toggle .toggle i { width: 20px; height: 20px; }
.birth-toggle .toggle.on i { left: 22px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge.on { background: var(--success-soft); color: var(--success); }
.badge.off { background: #eef1f5; color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #fff; color: var(--text);
  cursor: pointer; font-size: 13px; line-height: 1.4; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel-2); border-color: #c2cad6; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #f3b6b1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 3px 10px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
a.btn { color: var(--text); text-decoration: none; }
a.btn.primary { color: #fff; }
form.inline { display: inline; }

/* ---------- 工具栏 / 表单控件 ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .search { display: flex; gap: 8px; align-items: center; }
.toolbar .search input[type=text] { min-width: 260px; }
.toolbar .search .btn { white-space: nowrap; flex: 0 0 auto; }

input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #fff; color: var(--text);
  font: inherit; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
input[disabled], textarea[disabled] { background: var(--panel-2); color: var(--muted); }
textarea { resize: vertical; }

/* 自定义下拉 */
.sel { position: relative; display: inline-block; min-width: 130px; }
.field .sel, .form-grid .sel { display: block; width: 100%; }
td.saving { opacity: .55; pointer-events: none; }
.sel .sel-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.sel-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff;
  color: var(--text); font: inherit; cursor: pointer; text-align: left; white-space: nowrap;
}
.sel-btn::after {
  content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); flex: 0 0 auto;
}
.sel-btn:hover { border-color: #c2cad6; }
.sel.open .sel-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
.sel-menu {
  position: fixed; z-index: 1200; min-width: 140px; max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 12px 32px rgba(16,24,40,.14);
  animation: pop .12s ease-out;
}
.sel-item { padding: 7px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; font-size: 13px; }
.sel-item:hover { background: var(--primary-soft); }
.sel-item.active { color: var(--primary); font-weight: 600; }
.sel-group { padding: 8px 12px 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.sel-menu.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 6px; align-content: start;
  width: min(820px, calc(100vw - 16px)); max-height: min(440px, calc(100vh - 16px)); padding: 8px;
}
.sel-menu.grid .sel-group, .sel-menu.grid .sel-search { grid-column: 1 / -1; }
.sel-menu.grid .sel-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.sel-menu.grid .sel-group:first-of-type { border-top: 0; margin-top: 0; padding-top: 4px; }
.sel-menu.grid .sel-item { overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.sel-menu.grid .sel-item.active { border-color: var(--primary); background: var(--primary-soft); }
.sel-search { position: sticky; top: -8px; z-index: 1; width: 100%; box-sizing: border-box; margin-bottom: 4px; padding: 7px 10px; font-size: 13px; background: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 表单 ---------- */
.form { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .field { margin: 0; }
.form-grid .field.full { grid-column: 1 / -1; }
.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field .req { color: var(--danger); }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--text) !important; font-weight: 400 !important; font-size: 13px !important; cursor: pointer; margin-top: 4px; }
.switch input { width: 16px; height: 16px; accent-color: var(--primary); }
.actions { margin-top: 18px; display: flex; gap: 8px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-size: 13px; }
.flash.ok { background: var(--success-soft); border-color: #bfe6cc; color: var(--success); }
.flash.error { background: var(--danger-soft); border-color: #f3b6b1; color: var(--danger); }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pagination .muted { margin-right: auto; font-size: 13px; }
.pg { padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 7px; color: var(--text); background: #fff; font-size: 13px; }
.pg:hover { text-decoration: none; background: var(--panel-2); }
.pg.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg.disabled { color: var(--muted); opacity: .5; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 700; margin-top: 2px; letter-spacing: -.5px; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat.accent .value { color: var(--success); }
.stat.link .value { color: var(--primary); }
.stat.warn .value { color: var(--warn); }
.section-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(31, 42, 55, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .15s ease-out;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  width: 100%; max-width: 680px; max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: rise .18s ease-out;
}
.modal.narrow { max-width: 440px; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-close {
  border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px;
  font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--line); }
.modal-body .field { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; right: 20px; top: 20px; z-index: 1300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 14px; border-radius: 8px; background: #1f2a37; color: #fff; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: rise .18s ease-out;
}
.toast.ok { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- 服务器日志 ---------- */
.log-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin: -46px 0 16px; }
.census { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; }
.census-item { display: inline-flex; align-items: baseline; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.census-k { color: var(--muted); font-size: 12px; }
.census-item strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.census-note { color: var(--warn); font-size: 12px; }
.census-link { font: inherit; color: inherit; cursor: pointer; align-items: center; transition: border-color .12s, background .12s, box-shadow .12s; }
.census-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.census-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,111,237,.2); }
.census-link strong { color: var(--primary); }
.census-arrow { color: var(--muted); font-size: 16px; line-height: 1; margin-left: 2px; transition: transform .12s; }
.census-link:hover .census-arrow { transform: translateX(2px); color: var(--primary); }

/* 在线列表 / 踢人 */
#onlineModal[hidden], #kickModal[hidden], #primeModal[hidden] { display: none; }
.online-ops { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.online-modal { width: min(640px, calc(100vw - 32px)); }
.online-total {
  display: inline-block; min-width: 24px; margin-left: 6px; padding: 0 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; text-align: center; vertical-align: 2px;
}
.online-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.online-tools .lt-search { flex: 1 1 auto; min-width: 0; }
.online-sync { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--success); }
.online-sync i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: lt-pulse 1.6s ease-in-out infinite; }
.online-sync.off { color: var(--warn); }
.online-sync.off i { animation: none; }
.online-list {
  max-height: min(460px, calc(100vh - 260px)); overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.online-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.online-row:last-child { border-bottom: 0; }
.online-row:hover { background: var(--panel-2); }
.online-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8efff, #d6e3ff); color: var(--primary); font-weight: 700; font-size: 14px;
}
.online-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.35; }
.online-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-who .mono { font-size: 12px; }
.online-dino {
  flex: 0 0 auto; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 1px 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 12px;
}
.online-dino.none { background: var(--panel-2); color: var(--muted); }
.online-row .btn { flex: 0 0 auto; }
.online-kicking { flex: 0 0 auto; font-size: 12px; color: var(--warn); font-weight: 600; padding: 3px 10px; }
.online-empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.kick-target {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.kick-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.35; }
.kick-who .mono { font-size: 12px; }
.kick-warn {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--danger-soft); color: var(--danger); font-size: 13px;
}
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: #b9271d; border-color: #b9271d; }
.kind-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.kind-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.kind-card:hover { border-color: #c2cad6; }
.kind-card.on { border-color: var(--primary); background: var(--primary-soft); }
.kind-card input { margin-top: 3px; }
.kind-card strong { display: block; font-size: 14px; color: var(--text); }
.kind-card span span { color: var(--muted); font-size: 12px; }
.modal .section-title { margin: 14px 0 8px; }
.modal .section-title:first-child { margin-top: 0; }
.modal .help { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
#sweepModal[hidden], #shoutModal[hidden], #clearAiModal[hidden], #aiSettingsModal[hidden] { display: none; }
.ai-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ai-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ai-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.ai-cell span:first-child { font-size: 12px; font-weight: 600; line-height: 1.3; }
.ai-input { display: flex; align-items: center; gap: 6px; }
.ai-input input, .ai-cell select { width: 100%; }
.ai-input em { flex: 0 0 auto; font-style: normal; color: var(--muted); font-size: 12px; }
.ai-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-picks { grid-template-columns: 1fr; }
}
.log-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line-2); background: #fff; color: var(--text);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.log-stream {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  height: calc(100vh - 260px); min-height: 320px; overflow: auto; padding: 8px 0;
}
.log-empty { color: var(--muted); padding: 28px; text-align: center; }
.log-line { display: flex; gap: 8px; align-items: baseline; padding: 5px 14px; font-size: 13px; }
.log-line:hover { background: var(--panel-2); }
.log-time { color: var(--muted); font-family: Consolas, Menlo, monospace; flex: 0 0 auto; }
.log-cat { flex: 0 0 auto; font-size: 12px; border-radius: 999px; padding: 0 8px; background: var(--panel-2); color: var(--muted); }
.cat-chat { background: #eaf1fe; color: var(--primary); }
.cat-command { background: #fff4de; color: var(--warn); }
.cat-join, .cat-select { background: #e6f6ec; color: var(--success); }
.cat-leave, .cat-kill, .cat-death { background: #fdecea; color: var(--danger); }
.cat-corpse { background: #f3e8ff; color: #7a3eab; }
.cat-judge { background: #fff0e0; color: #c25e00; }
.cat-eco { background: #f3e8ff; color: #7a3eab; }
.log-line.judge-hit { background: #fff7ed; }
.log-line.death-hit { background: var(--danger-soft); }
.death-timeline {
  border: 1px solid var(--line); border-radius: var(--radius); max-height: 420px; overflow: auto; padding: 6px 0; background: #fff;
}
.death-timeline .log-name { max-width: 110px; }
.death-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 16px 0 8px; }
.death-tools strong { margin-right: 6px; }
.death-replay { margin: 14px 0; padding: 14px; }
.death-replay .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.death-replay h3 { margin: 0; font-size: 15px; }
.replay-map { position: relative; height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(circle, #25364a 0 1px, transparent 1px) 0 0/18px 18px, #101b29; }
.replay-player, .replay-dot { position: absolute; transform: translate(-50%, -50%); }
.replay-player.dead { left: 50%; top: 50%; width: 78px; padding: 5px 7px; border-radius: 6px; background: #b33a3a; color: #fff; font-size: 12px; text-align: center; }
.replay-dot { width: 10px; height: 10px; border-radius: 50%; background: #57b7ff; border: 2px solid #d9f1ff; }
.replay-dot-inline { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #57b7ff; margin-right: 4px; }
.replay-dot-inline.dead { background: #b33a3a; }
.replay-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 7px 2px; font-size: 12px; }
.replay-events { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 230px; }
.replay-event { display: flex; gap: 10px; align-items: baseline; padding: 6px 9px; font-size: 12px; border-bottom: 1px solid var(--line); }
.replay-event:last-child { border-bottom: 0; }
.replay-event .muted { margin-left: auto; }
.judge-reason {
  border: 1px solid #f5c08a; background: #fff7ed; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
}
.judge-reason h4 { margin: 0 0 8px; font-size: 14px; color: #c25e00; }
.judge-reason .kv { grid-template-columns: 96px 1fr; }
.log-ch { flex: 0 0 auto; color: var(--primary); font-size: 12px; }
.log-name { flex: 0 0 auto; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-msg { min-width: 0; word-break: break-word; }
.log-line mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }
/* 控制台工具条：上排日期 + 搜索 + 下载，下排分类 + 状态 */
.log-toolbar {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px;
}
.lt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lt-bottom { justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.log-toolbar .log-filters { margin: 0; gap: 6px; }
.log-toolbar .chip { padding: 3px 12px; transition: background .12s, border-color .12s, color .12s; }
.log-toolbar .chip:hover:not(.on) { border-color: #c2cad6; background: var(--panel-2); }

.lt-date {
  display: inline-flex; align-items: stretch; height: 36px; flex: 0 0 auto;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fff; overflow: hidden;
}
.lt-date:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
.lt-date input[type=date] {
  width: 138px; border: 0; padding: 0 6px; font: inherit; font-variant-numeric: tabular-nums;
  color: var(--text); background: transparent; text-align: center; box-shadow: none;
}
.lt-date input[type=date]:focus { box-shadow: none; }
.lt-date input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.lt-step, .lt-today {
  border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; padding: 0 10px;
  transition: background .12s, color .12s;
}
.lt-step { font-size: 18px; line-height: 1; width: 32px; padding: 0; }
.lt-today { border-left: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--primary); }
.lt-step:hover:not([disabled]), .lt-today:hover:not([disabled]) { background: var(--primary-soft); color: var(--primary); }
.lt-step[disabled], .lt-today[disabled] { color: #c3cad4; cursor: default; }

.lt-search { position: relative; flex: 1 1 300px; min-width: 220px; height: 36px; }
.lt-search input {
  height: 100%; padding: 0 34px 0 36px; border-radius: 9px; background: var(--panel-2); border-color: var(--line);
}
.lt-search input:focus { background: #fff; }
.lt-icon { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: #9aa5b3; pointer-events: none; }
.lt-search:focus-within .lt-icon { color: var(--primary); }
.lt-clear {
  position: absolute; right: 7px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border: 0; border-radius: 50%; background: #e3e8ef; color: var(--muted); font-size: 15px; line-height: 22px;
  cursor: pointer; padding: 0;
}
.lt-clear:hover { background: #d2d9e3; color: var(--text); }
.lt-clear[hidden] { display: none; }
.lt-go, .lt-download { height: 36px; padding: 0 16px; border-radius: 9px; }
.lt-download svg { width: 16px; height: 16px; }

.lt-status { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.lt-mode {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.lt-mode i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lt-mode.live { background: var(--success-soft); color: var(--success); }
.lt-mode.live i { animation: lt-pulse 1.6s ease-in-out infinite; }
.lt-mode.search { background: #fff4de; color: var(--warn); }
.lt-mode.history { background: var(--primary-soft); color: var(--primary); }
@keyframes lt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.log-info { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.log-toolbar [hidden] { display: none !important; }
.lt-actions { display: inline-flex; gap: 8px; flex: 0 0 auto; }
.log-toolbar .btn { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 1200px) {
  .lt-search { flex-basis: 100%; order: 3; }
  .lt-actions { margin-left: auto; }
  .lt-status { margin-left: 0; width: 100%; }
}
.log-more { display: block; margin: 10px auto 14px; }
#shoutModal textarea { width: 100%; resize: vertical; }

/* ---------- 页签 / 坐标拖动 ---------- */
.page-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin: -8px 0 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.page-tab {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 112px; padding: 8px 18px; border-radius: 9px;
  color: var(--muted); font-weight: 600; text-decoration: none;
}
.page-tab:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.page-tab.on { background: var(--primary); color: #fff; }
.coord-input { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 13px; }
.drag-col, .drag-handle { width: 42px; text-align: center; color: #b0b8c4; }
.drag-handle { cursor: grab; user-select: none; letter-spacing: -1px; font-size: 16px; }
.drag-handle:active { cursor: grabbing; color: var(--primary); }
table[data-reorder] tbody tr.dragging,
.range-card tbody tr.dragging { opacity: .45; }
table[data-reorder] tbody tr.dragging td,
.range-card tbody tr.dragging td { background: var(--primary-soft); }
.range-board { display: flex; flex-direction: column; gap: 14px; }
.range-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.range-card.dragging { opacity: .45; }
.range-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #f8fafc; border-bottom: 1px solid var(--line); cursor: pointer;
}
.range-card.is-collapsed .range-head { border-bottom: 0; }
.range-card.is-collapsed .range-body { display: none; }
.range-toggle {
  width: 28px; height: 28px; flex: 0 0 28px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.range-toggle:hover { background: #eef2f7; color: var(--text); }
.range-toggle span {
  display: block; width: 7px; height: 7px; margin: -2px auto 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.range-card:not(.is-collapsed) .range-toggle span { transform: rotate(45deg); margin-top: -4px; }
.range-title { font-weight: 700; font-size: 15px; }
.range-head input.range-name {
  width: 220px; max-width: 42%; flex: 0 1 220px;
  border: 1px solid transparent; background: transparent;
  font-weight: 700; font-size: 15px; padding: 4px 8px;
}
.range-head input.range-name:hover { border-color: var(--line-2); background: #fff; }
.range-head input.range-name:focus { background: #fff; }
.range-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.range-card tbody tr.range-placeholder { display: none; }
.range-card tbody tr.range-placeholder:only-child { display: table-row; }
.range-card tbody tr.range-placeholder td { text-align: center; color: var(--muted); padding: 22px; }
pre.sql { white-space: pre-wrap; background: var(--panel-2); padding: 12px; border-radius: 8px; }

/* ---------- 登录 ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #eef3fb, #f6f7f9); }
.login-card {
  width: 380px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 30px; box-shadow: var(--shadow-lg);
}
.login-card h1 { margin: 0 0 22px; font-size: 20px; text-align: center; color: var(--primary); }
.login-card label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.login-card label input { margin-top: 5px; }
.login-card .btn { margin-top: 6px; }
.login-card p { text-align: center; margin: 14px 0 0; }

/* ---------- 动物世界 ---------- */
.eco-empty { color: var(--muted); text-align: center; padding: 34px; }

.eco-master { margin-bottom: 14px; }
.eco-switch-table { width: auto; border: 0; }
.eco-switch-table td {
  border: 0; padding: 4px; background: transparent !important; white-space: nowrap;
}
.eco-switch-table td[data-edit]:hover::after { content: none; }
.eco-switch-table .toggle { width: 44px; height: 24px; border-radius: 12px; }
.eco-switch-table .toggle i { width: 20px; height: 20px; }
.eco-switch-table .toggle.on i { left: 22px; }

.eco-chain { margin-bottom: 14px; }
.eco-chain .section-title { margin-bottom: 12px; }
.eco-chain-flow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.eco-chain-node {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; padding: 7px 14px; border-radius: 999px;
  font-weight: 700; font-size: 13px; border: 1px solid var(--line);
}
.eco-chain-node.diet-3 { background: var(--danger-soft); color: var(--danger); border-color: #f3b6b1; }
.eco-chain-node.diet-2 { background: var(--warn-soft); color: var(--warn); border-color: #f0d59a; }
.eco-chain-node.diet-1 { background: var(--success-soft); color: var(--success); border-color: #bfe6cc; }
.eco-chain-edge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.eco-chain-edge i {
  display: inline-block; width: 18px; height: 8px;
  background: linear-gradient(90deg, var(--line-2), var(--muted));
  clip-path: polygon(0 2px, calc(100% - 6px) 2px, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, calc(100% - 6px) 6px, 0 6px);
}
.eco-chain-notes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px; font-size: 13px;
}
.eco-chain-notes .badge { margin-right: 6px; }

.eco-stats a.card { color: inherit; text-decoration: none; }
.eco-stats a.card:hover { text-decoration: none; border-color: var(--line-2); }
.eco-stats [data-eco-stat="hunt"] .value { color: var(--danger); }
.eco-stats [data-eco-stat="social"] .value { color: var(--success); }
.eco-stats [data-eco-stat="contest"] .value { color: var(--warn); }
.eco-stats [data-eco-stat="broadcast"] .value { color: var(--primary); }
.eco-stat-split { margin: 0 6px; color: var(--muted); font-weight: 500; font-size: 20px; }

.eco-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.eco-board-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.eco-pack { padding: 0; overflow: hidden; border-left: 3px solid var(--line-2); }
.eco-pack.eco-tone-hunt { border-left-color: var(--danger); }
.eco-pack.eco-tone-social { border-left-color: var(--success); }
.eco-pack.eco-tone-contest { border-left-color: var(--warn); }
.eco-pack.eco-tone-gang { border-left-color: #c45c26; }
.eco-pack.eco-tone-physio { border-left-color: var(--primary); }
.eco-pack.eco-tone-say { border-left-color: #8b95a3; }
.eco-pack-head { padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.eco-pack-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.eco-pack-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.eco-table td.eco-name { white-space: normal; line-height: 1.45; }
.eco-table td.eco-name strong { display: block; font-size: 13px; }
.eco-table td.eco-val {
  width: 120px; text-align: right; font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.eco-say { margin: 3px 0 0; font-size: 13px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.eco-table .help { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.eco-table tr.eco-child td.eco-name { padding-left: 28px; }
.eco-table tr.eco-child td.eco-name strong { font-weight: 500; }

.eco-body-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 14px; align-items: start; }
.eco-body-calc { min-width: 0; }
.eco-body-rules { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.eco-calc .section-title { margin-bottom: 6px; }
.eco-calc .help { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.eco-calc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.eco-calc-row .field { margin: 0; }
.eco-meter {
  position: relative; height: 10px; margin: 16px 0 8px;
  border-radius: 999px; background: var(--panel-2);
}
.eco-meter span {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, #f0b429, var(--success));
}
.eco-meter i {
  position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--danger);
}
.eco-meter-labels {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 12px; margin-bottom: 14px;
}
.eco-meter-labels strong { color: var(--text); font-size: 13px; }
.eco-calc-out { margin: 0; }
.eco-calc-out .good { color: var(--success); }
.eco-calc-out .bad { color: var(--danger); }
.eco-calc-out .off { color: var(--muted); }

.eco-legend { color: var(--muted); font-size: 13px; margin: -4px 0 14px; }
.eco-tier { letter-spacing: 1px; color: var(--text); font-size: 12px; }
.eco-tier .muted { letter-spacing: 0; }

.eco-log-bar .lt-step,
.eco-log-bar .lt-today {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted);
}
.eco-log-bar .lt-today { color: var(--primary); font-weight: 600; }
.eco-log-bar .lt-step[aria-disabled] { color: #c3cad4; cursor: default; pointer-events: none; }
.eco-log-bar a.chip { text-decoration: none; }
.eco-log-bar a.lt-clear {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.chip .n { margin-left: 6px; font-size: 12px; opacity: .7; }
.eco-who { display: inline-flex; flex-direction: column; line-height: 1.35; }
.eco-who .muted { font-size: 12px; }
.eco-team { font-size: 12px; margin-top: 2px; }
.eco-team summary { cursor: pointer; }
.eco-team ul, .eco-team-list { margin: 4px 0 0; padding-left: 16px; font-size: 12px; line-height: 1.5; white-space: normal; }
.eco-teams { margin-bottom: 12px; }
.eco-teams > summary { cursor: pointer; padding: 4px 0; }
.eco-vs-cell { width: 28px; text-align: center; color: var(--muted); padding-left: 0; padding-right: 0; }
.eco-vs-arrow { font-size: 14px; opacity: .45; }
td.eco-detail { white-space: normal; max-width: 420px; line-height: 1.5; }
td.eco-down { color: var(--danger); }
td.eco-up { color: var(--success); }

.eco-docs { display: flex; flex-direction: column; gap: 14px; }
.eco-doc h3 { margin: 16px 0 4px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.eco-doc .section-title { display: flex; align-items: center; gap: 8px; }
.eco-doc p, .eco-doc li { font-size: 13px; }
.eco-doc p { margin: 4px 0; }
.eco-doc ul { margin: 4px 0; padding-left: 20px; }
.eco-doc .src { color: var(--muted); font-size: 12px; }
.eco-doc table { margin: 8px 0; }
.eco-doc th, .eco-doc td { white-space: normal; }
.eco-doc pre { margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); white-space: pre-wrap; font-size: 12px; }

@media (max-width: 1100px) {
  .eco-board, .eco-body-layout { grid-template-columns: 1fr; }
}

@media (min-width: 1101px) {
  .eco-body-calc { position: sticky; top: 16px; }
}
/* 搜索服务器 */
#serversModal[hidden] { display: none; }
.servers-modal { width: min(1400px, calc(100vw - 32px)); max-width: none; }
.servers-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.servers-tools .lt-search { flex: 1 1 280px; min-width: 200px; }
.servers-tools select { height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; background: #fff; font: inherit; }
.servers-info { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.servers-note { color: var(--warn); margin-top: 2px; }
.servers-list { max-height: min(560px, calc(100vh - 300px)); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.servers-table th { position: sticky; top: 0; z-index: 1; }
.servers-table th:first-child, .servers-table th:last-child { border-radius: 0; }
.servers-num { font-variant-numeric: tabular-nums; }
.servers-num.full strong { color: var(--danger); }
.servers-ip { border: 0; background: transparent; padding: 0; color: var(--primary); cursor: pointer; }
.servers-ip:hover { text-decoration: underline; }
.servers-ip.copied::after { content: " 已复制"; color: var(--success); font-family: inherit; }

/* ---------- 全站：顶部进度条 + 按下反馈 ---------- */
#tw-progress { position: fixed; left: 0; top: 0; z-index: 99999; height: 3px; width: 0; opacity: 0; pointer-events: none; background: linear-gradient(90deg, var(--primary), #5b9bff); box-shadow: 0 0 8px rgba(47,111,237,.6); }
#tw-progress.run { opacity: 1; width: 82%; transition: width 8s cubic-bezier(.08,.82,.17,1), opacity .1s; }
#tw-progress.done { opacity: 0; width: 100%; transition: width .2s ease, opacity .3s ease .1s; }
.btn, button, .nav-item, .chip, .layui-btn { -webkit-tap-highlight-color: transparent; }
.btn:active, .tw-pressed.btn, .tw-pressed.layui-btn, button.tw-pressed, .chip.tw-pressed { transform: scale(.96); filter: brightness(.95); }
.nav-item.tw-pressed, .nav-item:active { background: var(--primary-soft); color: var(--primary); }
.btn, .layui-btn, .chip, .nav-item { transition: transform .08s ease, filter .08s ease, background-color .12s ease; }
@media (prefers-reduced-motion: reduce) { #tw-progress.run { transition: none; } .btn:active, .tw-pressed { transform: none; } }

/* ---------- 右上角信封 ---------- */
.inbox { position: relative; }
.inbox-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); cursor: pointer; }
.inbox-btn:hover, .inbox-btn[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.inbox-btn.has { color: var(--primary); }
.inbox-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
.inbox-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1300; width: min(360px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-lg); overflow: hidden; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.inbox-all { border: 0; background: none; color: var(--primary); font-size: 12px; cursor: pointer; }
.inbox-list { max-height: 420px; overflow: auto; }
.inbox-empty { padding: 28px 14px; color: var(--muted); text-align: center; font-size: 13px; }
.inbox-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: var(--panel-2); }
.inbox-item.unread { background: var(--primary-soft); }
.inbox-item.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--danger); vertical-align: 1px; }
.inbox-item-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.inbox-item-top span { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.inbox-item p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.inbox-toast { position: fixed; right: 16px; top: 16px; z-index: 99998; width: min(320px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow-lg); cursor: pointer; transform: translateX(120%); transition: transform .25s ease; }
.inbox-toast.show { transform: none; }
.inbox-toast b { font-size: 13.5px; }
.inbox-toast p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- 恐龙库存：操作栏 / 赠送 ---------- */
.dino-ops { display: inline-flex; gap: 6px; justify-content: center; }
.btn.warn { color: var(--warn); border-color: #f0d39b; background: var(--warn-soft); }
.btn.warn:hover { border-color: var(--warn); }
.btn.soft { opacity: .55; }
.gift-who { margin-top: 10px; min-height: 22px; font-size: 13px; }
.gift-user { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.gift-user:hover { border-color: var(--primary); }

/* ---------- 排行榜头像 ---------- */
img.rank-avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; background: var(--panel-2); }

/* 弹窗加载中 */
.modal-loading { display: flex; justify-content: center; gap: 6px; padding: 28px 0; }
.modal-loading i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: tw-dot 0.9s ease-in-out infinite; }
.modal-loading i:nth-child(2) { animation-delay: .15s; }
.modal-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes tw-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
