/* ============================================================
   观澜 · 斗鱼监控数据中枢 —— 浅色玻璃 Bento 设计系统
   浅灰白底 + 蓝紫数据色 + 细腻玻璃拟态 + 克制霓虹光晕
   ============================================================ */
:root {
  /* 基底 */
  --bg: #f4f6fb;
  --bg-deep: #eef1f9;

  /* 玻璃 */
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-soft: rgba(255, 255, 255, .5);
  --glass-border: rgba(99, 102, 241, .14);
  --glass-border-strong: rgba(99, 102, 241, .28);
  --hairline: rgba(28, 36, 58, .07);
  --blur: blur(18px);

  /* 文字 */
  --ink: #1b2433;
  --ink-2: #55627a;
  --ink-3: #93a0b5;

  /* 数据色系（蓝紫为主） */
  --primary: #6366f1;
  --primary-deep: #4f46e5;
  --primary-soft: rgba(99, 102, 241, .10);
  --violet: #8b5cf6;
  --purple: #a855f7;
  --sky: #0ea5e9;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, .10);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, .10);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, .10);
  --slate: #64748b;

  /* 霓虹光晕（克制） */
  --glow-primary: 0 0 0 1px rgba(99, 102, 241, .10), 0 10px 34px rgba(99, 102, 241, .14);
  --glow-hover: 0 0 0 1px rgba(139, 92, 246, .20), 0 16px 44px rgba(99, 102, 241, .20), 0 0 40px rgba(139, 92, 246, .12);

  /* 布局 */
  --card-radius: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 16px;
  --card-pad: 20px;

  --shadow: 0 2px 6px rgba(30, 41, 59, .04), 0 14px 36px rgba(30, 41, 59, .07);
  --shadow-pop: 0 20px 60px rgba(30, 41, 59, .18);
  --shadow-sheet: 0 -16px 60px rgba(30, 41, 59, .22);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-num: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.truncate { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
/* 环境光晕：极淡蓝紫霓虹，克制 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(99, 102, 241, .12), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(1000px 620px at 55% 108%, rgba(14, 165, 233, .08), transparent 60%);
}

/* ============ 顶部导航（玻璃） ============ */
.topbar {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .38), 0 0 24px rgba(139, 92, 246, .25);
}
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .01em; color: var(--ink); }
.brand-ver { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }

.topnav { display: flex; gap: 2px; padding: 4px; background: var(--glass-soft); border: 1px solid var(--hairline); border-radius: 14px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.nav-item {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 11px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 650;
  cursor: pointer; white-space: nowrap; transition: all .16s;
}
.nav-item:hover:not(.active):not(.disabled) { color: var(--ink); background: rgba(255, 255, 255, .7); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #7c5cf0);
  box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}
.nav-item .nav-sub { font-size: 10.5px; opacity: .75; font-weight: 600; }
.nav-item.disabled { color: #b8c2d4; cursor: default; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none; }
.clock-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--radius-pill, 999px);
  font-size: 12px; color: var(--ink-2); font-weight: 650;
  background: var(--glass-soft); border: 1px solid var(--hairline);
  white-space: nowrap;
}
.mode-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 650; color: var(--ink-2);
  background: var(--glass-soft); border: 1px solid var(--hairline);
  white-space: nowrap;
}
.mode-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-soft), 0 0 12px rgba(16, 185, 129, .5); }
.tool-btn {
  padding: 7px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 650;
  background: var(--glass); color: var(--ink-2);
  border: 1px solid var(--hairline); cursor: pointer;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: all .16s;
}
.tool-btn:hover { color: var(--primary); border-color: var(--glass-border-strong); box-shadow: 0 0 0 3px var(--primary-soft); }
.tool-btn.on { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, .3); }

/* 本地测试视角条 */
.dev-perspective {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 10px 16px;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: var(--radius);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.dev-perspective-label { font-size: 13px; color: #b45309; font-weight: 700; }
.dev-perspective-actions { display: flex; gap: 6px; margin-left: auto; }
.dev-role-btn {
  padding: 6px 15px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--hairline);
  color: var(--ink-2); font-size: 12px; cursor: pointer;
}
.dev-role-btn.active { background: linear-gradient(135deg, #f59e0b, #f97316); border-color: transparent; color: #fff; font-weight: 700; }

/* ============ 布局 ============ */
.main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 22px 64px; }
.page-panel { display: none; animation: fadeIn .24s ease; }
.page-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-title { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.panel-sub { margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.panel-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--primary); text-transform: uppercase; }

.server-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650;
  background: var(--emerald-soft); color: #059669;
  border: 1px solid rgba(16, 185, 129, .3);
}
.server-pill.down { background: var(--rose-soft); color: var(--rose); border-color: rgba(244, 63, 94, .3); }
.server-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.error-banner {
  margin-bottom: 16px; padding: 11px 16px; border-radius: var(--radius);
  background: var(--rose-soft); border: 1px solid rgba(244, 63, 94, .3);
  color: var(--rose); font-size: 13px;
}

/* ============ Bento Grid + 玻璃瓦片 ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 86px;
  gap: var(--gap);
  grid-auto-flow: dense;
}
.tile {
  position: relative;
  min-width: 0; min-height: 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--glow-hover); border-color: var(--glass-border-strong); }
.tile h3, .tile .tile-title { font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.tile .tile-sub { margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.tile .tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex: none; }
.tile-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(99, 102, 241, .3) transparent; }
.tile-body::-webkit-scrollbar { width: 4px; }
.tile-body::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, .3); border-radius: 4px; }

/* span 工具类 */
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; }
.span-12 { grid-column: span 12; }
.r-1 { grid-row: span 1; } .r-2 { grid-row: span 2; } .r-3 { grid-row: span 3; }
.r-4 { grid-row: span 4; } .r-5 { grid-row: span 5; } .r-6 { grid-row: span 6; } .r-8 { grid-row: span 8; }

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-12, .span-10, .span-9, .span-8, .span-7 { grid-column: span 6; }
  .span-6, .span-5 { grid-column: span 6; }
  .span-4 { grid-column: span 3; } .span-3 { grid-column: span 3; }
}
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-12 { grid-column: span 1; }
  .r-2, .r-3, .r-4, .r-5, .r-6, .r-8 { grid-row: span 1; }
  .tile { min-height: 0; }
}

/* 通用共享组件（app.js 动态内容复用） */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 15px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.section-note { margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.head-actions { display: flex; align-items: center; gap: 8px; }

.picker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--glass-soft); border: 1px solid var(--hairline);
  color: var(--ink-2); font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  transition: all .15s;
}
.picker:hover { color: var(--primary); border-color: var(--glass-border-strong); }

.empty { padding: 22px 8px; color: var(--ink-3); font-size: 13px; text-align: center; }
.empty.small { padding: 12px 4px; font-size: 12px; }

button { font-family: inherit; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
input { font-family: inherit; border: none; outline: none; background: transparent; color: var(--ink); }

.room-input, .cs-nick-input, .cs-backfill-input, .nickname-input {
  background: var(--glass-soft);
  border: 1px solid var(--hairline);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.room-input:focus, .cs-nick-input:focus, .cs-backfill-input:focus, .nickname-input:focus {
  border-color: var(--glass-border-strong);
  background: var(--glass-strong);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.room-input::placeholder, .cs-nick-input::placeholder, .cs-backfill-input::placeholder, .nickname-input::placeholder { color: var(--ink-3); }

/* 状态行（在线状态/对局速览） */
.live-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed rgba(28, 36, 58, .05); }
.live-row:last-child { border-bottom: none; }
.live-row .live-k { flex: none; width: 62px; color: var(--ink-3); font-size: 11.5px; }
.live-row b { font-weight: 650; }
.live-row .truncate { flex: 1 1 auto; }

/* ============ 图表容器 ============ */
.svg-box { width: 100%; }
.svg-box svg { display: block; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut-legend { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-swatch { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.donut-label { flex: 1 1 auto; min-width: 0; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.donut-value { color: var(--ink); font-weight: 700; }

.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-list-row { display: grid; grid-template-columns: 22px minmax(0, 92px) minmax(0, 1fr) 52px; gap: 9px; align-items: center; font-size: 12px; }
.bar-rank { color: var(--ink-3); font-weight: 700; }
.bar-rank.top { color: var(--primary); }
.bar-name { color: var(--ink-2); }
.bar-track { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; }
.bar-value { color: var(--ink); font-weight: 700; text-align: right; }

/* 在线状态灯（房间） */
.status-dot, .cs-target-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.status-dot.ok { background: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-soft), 0 0 12px rgba(16, 185, 129, .55); }
.status-dot.wait { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft), 0 0 12px rgba(245, 158, 11, .5); }
.status-dot.error, .status-dot.live { background: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft), 0 0 12px rgba(244, 63, 94, .5); }
.status-dot.loop { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot.offline { background: #b6c0d0; box-shadow: 0 0 0 3px rgba(182, 192, 208, .2); }
.cs-target-dot { width: 8px; height: 8px; background: #b6c0d0; }
.cs-target-dot.live { background: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-soft), 0 0 12px rgba(16, 185, 129, .5); }

/* ============ 监控：房间搜索与列表 ============ */
.search-wrap { position: relative; z-index: 30; }
.add-row { display: flex; gap: 9px; }
.room-input { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 15px; border-radius: 11px; font-size: 13.5px; }
.add-btn {
  flex: none; height: 42px; padding: 0 20px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #7c5cf0);
  color: #fff; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(99, 102, 241, .35);
  transition: transform .1s, box-shadow .15s;
}
.add-btn:hover { box-shadow: 0 10px 24px rgba(99, 102, 241, .45); }
.add-btn:active { transform: scale(.97); }
.search-state { padding: 9px 4px; font-size: 12px; color: var(--ink-2); }

.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  overflow: hidden; z-index: 40;
}
.suggestion-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; transition: background .12s; }
.suggestion-row:hover { background: var(--primary-soft); }
.suggestion-main { flex: 1 1 auto; min-width: 0; }
.suggestion-title-line { display: flex; align-items: center; gap: 8px; }
.suggestion-name { font-size: 13px; color: var(--ink); font-weight: 650; }
.suggestion-detail { margin-top: 2px; font-size: 11.5px; color: var(--ink-2); }
.suggestion-add { flex: none; font-size: 12px; color: var(--primary); font-weight: 700; }
.picker-menu { position: fixed !important; width: 220px !important; max-height: 280px; overflow-y: auto; }
.picker-menu .suggestion-name { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.stream-chip { flex: none; display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; line-height: 17px; }
.stream-chip.live { color: #e11d48; background: rgba(244, 63, 94, .1); }
.stream-chip.loop { color: #b45309; background: rgba(245, 158, 11, .1); }
.stream-chip.offline, .stream-chip.stopped { color: var(--ink-3); background: rgba(148, 163, 184, .12); }
.stream-chip.play { color: #059669; background: var(--emerald-soft); }

.room-list { display: flex; flex-direction: column; gap: 8px; }
.room-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--radius);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .5);
  cursor: pointer; transition: all .15s;
}
.room-row:hover { background: var(--glass-strong); border-color: var(--hairline); }
.room-row.selected {
  background: var(--primary-soft);
  border-color: var(--glass-border-strong);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 6px 18px rgba(99, 102, 241, .14);
}
.room-row.selected .room-name { color: var(--primary-deep); }

.room-main { flex: 1 1 auto; min-width: 0; }
.room-title-line { display: flex; align-items: center; gap: 8px; }
.room-name { font-size: 14px; font-weight: 750; }
.room-detail { margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.room-heat-row { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.room-heat-data { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.heat-caption { color: var(--ink-3); }
.heat-current { font-size: 14px; font-weight: 750; color: #7c3aed; }
.heat-change { font-size: 11px; }
.heat-change.up { color: var(--rose); }
.heat-change.down { color: var(--emerald); }
.heat-change.flat { color: var(--ink-3); }

.heat-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.heat-badge.rise { color: #b45309; background: var(--amber-soft); }
.heat-badge.surge { color: #7c3aed; background: rgba(139, 92, 246, .12); }
.heat-badge.burst { color: #6d28d9; background: rgba(124, 58, 237, .14); box-shadow: 0 0 0 2px rgba(139, 92, 246, .16), 0 0 18px rgba(139, 92, 246, .25); }
.selected-mark { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--primary); background: rgba(255, 255, 255, .75); border: 1px solid var(--glass-border-strong); }
.room-pin, .remove-btn {
  flex: none; padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 650; cursor: pointer;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--hairline); color: var(--ink-2);
  transition: all .15s;
}
.room-pin:hover { color: #b45309; border-color: rgba(245, 158, 11, .4); }
.room-pin.active { background: var(--amber-soft); border-color: rgba(245, 158, 11, .4); color: #b45309; }
.remove-btn:hover { color: var(--rose); border-color: rgba(244, 63, 94, .4); background: var(--rose-soft); }

/* ============ 监控：指标区 ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi-cell {
  background: var(--glass-soft); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 12px 10px; min-width: 0; text-align: center;
}
.kpi-label { font-size: 10.5px; color: var(--ink-3); margin-bottom: 3px; letter-spacing: .03em; }
.kpi-value { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); color: var(--ink); }
.kpi-cell.violet .kpi-value { color: var(--violet); }
.kpi-cell.sky .kpi-value { color: var(--sky); }
.kpi-cell.amber .kpi-value { color: var(--amber); }
.kpi-cell.rose .kpi-value { color: var(--rose); }
.kpi-cell .kpi-unit { font-size: 10px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.kpi-cell .kpi-sub { margin-top: 3px; font-size: 10px; color: var(--ink-3); }

/* 弹幕舞台（玻璃） */
.danmaku-stage {
  position: relative; height: 100%; min-height: 170px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(238, 241, 249, .5));
  border: 1px solid var(--hairline); border-radius: var(--radius);
}
.danmaku-empty { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 12.5px; color: var(--ink-3); }
.danmaku-item {
  position: absolute; left: 100%; white-space: nowrap;
  font-size: 13.5px; font-weight: 650;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .9);
  will-change: transform;
  animation: danmakuMove linear forwards;
}
@keyframes danmakuMove { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 380px)); } }

/* 高光 */
.highlight-item { border-top: 1px solid var(--hairline); padding: 11px 2px; }
.highlight-item:first-child { border-top: none; padding-top: 2px; }
.highlight-time-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.highlight-play-dot { color: var(--primary); font-size: 11px; }
.highlight-time { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.highlight-heat { margin-left: auto; color: var(--violet); font-weight: 700; }
.highlight-panel { background: var(--glass-soft); border-radius: var(--radius); padding: 11px 13px; border-left: 3px solid var(--primary); }
.highlight-title { font-size: 13.5px; font-weight: 700; }
.highlight-description { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.highlight-excerpts { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.highlight-excerpt { display: flex; align-items: flex-start; gap: 8px; background: rgba(255, 255, 255, .45); border-radius: 8px; padding: 7px 11px; font-size: 12px; color: var(--ink-2); }
.highlight-chat-icon { color: var(--primary); }
.highlight-excerpt-text { flex: 1 1 auto; min-width: 0; }
.highlight-like { flex: none; color: var(--violet); font-weight: 650; }
.highlight-error { padding: 12px; font-size: 12.5px; color: var(--rose); }

/* 牌子/环形图卡 */
.badge-summary { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }

/* ============ 封禁 ============ */
.clear-btn { padding: 7px 15px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .6); border: 1px solid rgba(244, 63, 94, .35); color: var(--rose); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.clear-btn:hover { background: var(--rose-soft); }
.ban-item { border-top: 1px solid var(--hairline); padding: 13px 2px; }
.ban-item:first-child { border-top: none; padding-top: 4px; }
.ban-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.ban-room { color: var(--ink); font-weight: 650; }
.ban-chain { display: flex; align-items: center; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.actor { color: var(--primary-deep); font-weight: 700; }
.actor.anchor { padding: 1px 8px; border-radius: 6px; background: var(--primary-soft); }
.arrow { color: var(--ink-3); font-size: 12px; }
.target { color: var(--rose); font-weight: 700; }
.ban-info { display: flex; gap: 18px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.last-box { margin-top: 9px; background: rgba(255, 255, 255, .45); border-radius: 10px; padding: 9px 13px; }
.last-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.last-text { font-size: 12.5px; line-height: 1.5; }
.last-text.muted { color: var(--ink-3); }
.cid { margin-top: 4px; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* ============ CS ============ */
.cs-status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--glass-soft); border: 1px solid var(--hairline); color: var(--ink-2); }
.cs-status-pill.live { background: var(--emerald-soft); color: #059669; border-color: rgba(16, 185, 129, .3); }
.cs-search-row { display: flex; gap: 9px; margin-bottom: 11px; }
.cs-nick-input { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 15px; border-radius: 11px; font-size: 13.5px; }
.cs-monitor-btn { flex: none; height: 42px; padding: 0 22px; border-radius: 11px; background: linear-gradient(135deg, #6366f1, #7c5cf0); color: #fff; font-size: 13.5px; font-weight: 700; box-shadow: 0 8px 18px rgba(99, 102, 241, .35); }
.cs-rank-refresh { padding: 7px 14px; border-radius: 999px; background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .28); color: var(--primary); font-size: 12px; font-weight: 650; cursor: pointer; }
.cs-target-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.cs-target-chip { display: flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, .3); }
.cs-target-chip-name { font-size: 12px; color: #059669; font-weight: 650; }
.cs-target-remove { width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .8); color: var(--ink-2); font-size: 11px; line-height: 18px; text-align: center; padding: 0; cursor: pointer; }
.cs-target-remove:hover { color: var(--rose); }
.cs-error { margin-top: 9px; font-size: 12.5px; color: var(--rose); }
.cs-major-capture { margin-top: 11px; border-top: 1px dashed rgba(99, 102, 241, .25); padding-top: 12px; }
.cs-admin-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #7c3aed; font-weight: 750; margin-bottom: 5px; }
.cs-mode-note { font-size: 11.5px; color: var(--ink-2); margin-bottom: 9px; }
.cs-major-capture-btn { width: 100%; height: 38px; border-radius: 10px; background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .3); color: #7c3aed; font-size: 13px; font-weight: 700; cursor: pointer; }
.cs-major-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.cs-major-target-card { background: rgba(255, 255, 255, .5); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 10px 12px; }
.cs-major-target-top { display: flex; align-items: center; gap: 8px; }
.cs-major-target-name { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-major-target-score { margin-top: 5px; font-size: 15px; font-weight: 800; color: #7c3aed; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-wait-card { text-align: center; padding: 34px 16px; }
.cs-wait-icon { font-size: 32px; color: rgba(148, 163, 184, .8); margin-bottom: 9px; }
.cs-wait-title { font-size: 15px; font-weight: 700; }
.cs-wait-note { margin-top: 5px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.cs-match-divider { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; }
.cs-match-number { font-size: 14px; font-weight: 750; margin-right: 10px; }
.cs-match-targets { font-size: 12px; color: var(--ink-2); }
.cs-mini-status { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: rgba(148, 163, 184, .12); color: var(--ink-2); font-weight: 650; }
.cs-mini-status.live { color: #059669; background: var(--emerald-soft); }
.cs-mini-status.waiting { color: #b45309; background: var(--amber-soft); }
.cs-mini-status.ended { color: #7c3aed; background: rgba(139, 92, 246, .12); }
.cs-card-wait { padding: 22px 14px; }

.cs-score-card { text-align: center; position: relative; padding: 22px 18px; }
.cs-ended-chip { position: absolute; top: 12px; left: 14px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #7c3aed; background: rgba(139, 92, 246, .12); }
.cs-map { font-size: 15px; font-weight: 800; }
.cs-half { margin-top: 3px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-big-score { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 6px; }
.cs-team-score { display: flex; align-items: baseline; gap: 8px; }
.cs-side-name { font-size: 13px; font-weight: 750; }
.cs-team-score.ct .cs-side-name { color: var(--sky); }
.cs-team-score.t .cs-side-name { color: var(--violet); }
.cs-score-num { font-size: 48px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-team-score.ct .cs-score-num { color: var(--sky); text-shadow: 0 0 24px rgba(14, 165, 233, .35); }
.cs-team-score.t .cs-score-num { color: var(--violet); text-shadow: 0 0 24px rgba(139, 92, 246, .35); }
.cs-score-colon { color: var(--ink-3); font-size: 24px; font-weight: 750; }
.cs-round { font-size: 12px; color: var(--ink-2); }

.cs-teams-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 760px) { .cs-teams-wrap { grid-template-columns: 1fr; } }
.cs-team-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; background: rgba(255, 255, 255, .5); }
.cs-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cs-side-head > div { display: flex; align-items: center; gap: 8px; }
.cs-side-badge { padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.cs-side-head.ct .cs-side-badge { background: rgba(14, 165, 233, .12); color: var(--sky); }
.cs-side-head.t .cs-side-badge { background: rgba(139, 92, 246, .12); color: var(--violet); }
.cs-avg { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-side-head > span { font-size: 11px; color: var(--ink-2); }
.cs-score-table { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .75fr) minmax(0, .65fr); gap: 8px; align-items: center; font-size: 12px; }
.cs-score-head { padding: 2px 0 6px; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.cs-player-row { padding: 6px 2px; border-top: 1px solid rgba(28, 36, 58, .06); cursor: pointer; transition: background .12s; border-radius: 6px; }
.cs-player-row:hover { background: var(--primary-soft); }
.cs-player-row.target { background: var(--primary-soft); }
.cs-player-row.dead { opacity: .5; }
.cs-player-name { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cs-player-name > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-star { color: var(--primary); }
.cs-fb { padding: 0 5px; border-radius: 4px; background: var(--rose-soft); color: var(--rose); font-size: 9.5px; font-weight: 700; flex: none; }
.cs-rank { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cs-rank > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-rank-points { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-kda, .cs-adr, .cs-hs { font-variant-numeric: tabular-nums; color: var(--ink); }
.cs-adr { color: #7c3aed; font-weight: 650; }

.cs-feed-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; }
.cs-feed-killer { font-weight: 700; color: var(--sky); }
.cs-feed-weapon { padding: 1px 7px; border-radius: 5px; background: rgba(148, 163, 184, .14); font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-feed-arrow { color: var(--ink-3); }
.cs-feed-victim { color: var(--rose); font-weight: 650; }
.cs-streak-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.cs-streak-card { background: rgba(255, 255, 255, .5); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 11px 13px; }
.cs-streak-title { font-size: 12.5px; font-weight: 750; margin-bottom: 6px; }
.cs-streak-title.kill { color: var(--sky); }
.cs-streak-title.death { color: var(--rose); }
.cs-streak-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-streak-empty { font-size: 12px; color: var(--ink-3); }

.cs-awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cs-award { border-radius: var(--radius); padding: 13px; border: 1px solid var(--hairline); }
.cs-award.mvp { background: rgba(139, 92, 246, .08); border-color: rgba(139, 92, 246, .3); }
.cs-award.svp { background: rgba(14, 165, 233, .07); border-color: rgba(14, 165, 233, .28); }
.cs-award-label { font-size: 11px; font-weight: 800; margin-bottom: 5px; letter-spacing: .06em; }
.cs-award.mvp .cs-award-label { color: var(--violet); }
.cs-award.svp .cs-award-label { color: var(--sky); }
.cs-award-name { font-size: 15px; font-weight: 750; }
.cs-award-rank { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.cs-award-stats { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* Major */
.cs-major-empty { padding: 18px 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.cs-major-scroll { overflow-x: auto; scrollbar-width: none; }
.cs-major-scroll::-webkit-scrollbar { display: none; }
.cs-major-table { display: grid; grid-template-columns: 40px 96px 46px 46px 58px 64px 76px 70px 50px; gap: 10px; align-items: center; min-width: 550px; font-size: 12px; padding: 7px 2px; }
.cs-major-head { color: var(--ink-3); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--hairline); }
.cs-major-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 650; }
.cs-major-rank { color: var(--violet); font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-major-wins { color: var(--emerald); font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-major-rating { color: var(--primary); font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-major-adr { color: #7c3aed; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-major-kda { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-major-hs { color: var(--sky); font-variant-numeric: tabular-nums; font-family: var(--font-num); }

.cs-admin-panel { border-top: 1px dashed rgba(99, 102, 241, .25); margin-top: 13px; padding-top: 11px; }
.cs-backfill-row { display: flex; gap: 9px; margin: 9px 0; }
.cs-backfill-input { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-backfill-btn { flex: none; padding: 0 15px; height: 38px; border-radius: 10px; background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .3); color: #7c3aed; font-size: 13px; font-weight: 700; cursor: pointer; }
.cs-backfill-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; margin-bottom: 9px; }
.cs-admin-subtitle { font-size: 12px; color: #7c3aed; font-weight: 750; margin: 10px 0 5px; }
.cs-backfill-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.cs-backfill-info { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-backfill-info span:last-child { color: var(--ink-2); font-size: 11px; }
.cs-backfill-delete { padding: 4px 11px; border-radius: 7px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(244, 63, 94, .35); color: var(--rose); font-size: 11.5px; cursor: pointer; }
.cs-review-heading { margin: 13px 0 6px; }
.cs-admin-empty { padding: 13px 4px; font-size: 12px; color: var(--ink-3); }
.cs-review-item { border-top: 1px solid var(--hairline); padding: 10px 2px; }
.cs-review-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 650; }
.cs-review-map { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-review-id { margin-top: 3px; font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-review-players { margin-top: 4px; font-size: 11.5px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-review-actions { display: flex; gap: 10px; margin-top: 9px; }
.cs-review-btn { padding: 6px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700; }
.cs-review-btn.approve { background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .3); color: #7c3aed; }
.cs-review-btn.approve.disabled { opacity: .5; cursor: not-allowed; background: rgba(148, 163, 184, .12); border-color: var(--hairline); color: var(--ink-3); }
.cs-review-btn.reject { background: rgba(255, 255, 255, .6); border: 1px solid rgba(244, 63, 94, .35); color: var(--rose); }
.cs-approved-block { margin-top: 11px; border-top: 1px dashed rgba(99, 102, 241, .25); padding-top: 9px; }
.cs-approved-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 12.5px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-approved-remove { flex: none; padding: 4px 11px; border-radius: 7px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(244, 63, 94, .35); color: var(--rose); font-size: 11.5px; cursor: pointer; }

/* ============ DOTA ============ */
.dota-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dota-head-btn { padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dota-head-btn.refresh { background: rgba(14, 165, 233, .1); border: 1px solid rgba(14, 165, 233, .3); color: var(--sky); }
.dota-head-btn.gg { background: var(--rose-soft); border: 1px solid rgba(244, 63, 94, .3); color: var(--rose); }
.dota-head-btn.rank { background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .3); color: #7c3aed; }
.dota-ti-pill { padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 6px 16px rgba(99, 102, 241, .4), 0 0 20px rgba(168, 85, 247, .3); }

.dota-intro-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.dota-intro-note { margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.dota-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.dota-rule-grid > div { background: rgba(255, 255, 255, .5); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 13px 8px; text-align: center; }
.dota-rule-grid span:first-child { display: block; font-size: 18px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-rule-label { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-2); }
.dota-attr-legend { font-size: 11.5px; color: var(--ink-2); margin: 2px 0 8px; }
.dota-attr-legend.compact { margin-bottom: 10px; }
.dota-primary-btn {
  display: block; width: 100%; margin-top: 14px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 14.5px; font-weight: 800;
  box-shadow: 0 10px 22px rgba(99, 102, 241, .38);
  transition: transform .1s, box-shadow .15s;
}
.dota-primary-btn:hover { box-shadow: 0 12px 28px rgba(99, 102, 241, .48); }
.dota-primary-btn:active { transform: scale(.985); }

.dota-tournament-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dota-tournament-label { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.dota-tournament-sub { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.dota-tournament-controls { flex: none; text-align: right; }
.dota-bo3-pill { display: inline-block; padding: 3px 10px; border-radius: 6px; background: rgba(148, 163, 184, .12); border: 1px solid var(--hairline); color: var(--ink-2); font-size: 11px; font-weight: 750; }
.dota-series-inline-action { margin-top: 8px; padding: 7px 16px; border-radius: 999px; background: var(--primary-soft); border: 1px solid var(--glass-border-strong); color: var(--primary-deep); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dota-series-score-row { margin-top: 12px; }
.dota-series-score-main { display: flex; align-items: center; justify-content: center; gap: 16px; }
.dota-series-side { display: flex; align-items: baseline; gap: 10px; }
.dota-series-side span { font-size: 13px; color: var(--ink-2); font-weight: 650; }
.dota-series-side b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-series-side.player b { color: var(--primary); text-shadow: 0 0 22px rgba(99, 102, 241, .45); }
.dota-series-side.ai b { color: var(--sky); text-shadow: 0 0 22px rgba(14, 165, 233, .4); }
.dota-series-vs { color: var(--ink-3); font-size: 21px; font-weight: 750; }

.dota-round-chip { flex: none; padding: 4px 11px; border-radius: 999px; background: rgba(99, 102, 241, .09); border: 1px solid rgba(99, 102, 241, .25); color: var(--primary); font-size: 11.5px; font-weight: 750; }

.dota-position-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dota-position-drop {
  min-height: 76px; border-radius: var(--radius);
  border: 1.5px dashed rgba(99, 102, 241, .35); background: rgba(255, 255, 255, .4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px; text-align: center; transition: all .15s;
}
.dota-position-drop.dragover { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.dota-position-drop.locked { border-style: solid; background: rgba(255, 255, 255, .75); }
.dota-position-drop.locked.orange { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.dota-position-drop.locked.blue { border-color: var(--sky); box-shadow: 0 0 0 2px rgba(14, 165, 233, .14); }
.dota-position-drop.locked.green { border-color: var(--emerald); box-shadow: 0 0 0 2px var(--emerald-soft); }
.dota-position-drop.locked.white { border-color: var(--ink-3); }
.dota-drop-pos { font-size: 11px; font-weight: 800; color: var(--ink-3); }
.dota-drop-name { margin-top: 4px; font-size: 12px; font-weight: 750; line-height: 1.2; }
.dota-drop-fit { margin-top: 3px; font-size: 10.5px; color: var(--emerald); font-weight: 700; }
.dota-drop-fit.danger { color: var(--rose); }
.dota-drop-empty { margin-top: 4px; font-size: 10.5px; color: var(--ink-3); }

.dota-candidate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .dota-candidate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .dota-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dota-candidate-grid { grid-template-columns: 1fr; } }
.dota-hero-card {
  background: var(--glass-soft); border: 1px solid transparent; border-radius: var(--radius);
  padding: 14px; cursor: grab; user-select: none;
  box-shadow: var(--shadow);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.dota-hero-card:hover { transform: translateY(-3px); box-shadow: var(--glow-hover); background: var(--glass-strong); }
.dota-hero-card:active { cursor: grabbing; }
.dota-hero-card.orange { border-color: rgba(99, 102, 241, .35); border-top: 3px solid var(--primary); }
.dota-hero-card.blue { border-color: rgba(14, 165, 233, .32); border-top: 3px solid var(--sky); }
.dota-hero-card.green { border-color: rgba(16, 185, 129, .3); border-top: 3px solid var(--emerald); }
.dota-card-top { display: flex; justify-content: space-between; align-items: center; }
.dota-rarity { padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; }
.dota-hero-card.orange .dota-rarity { color: var(--primary-deep); background: var(--primary-soft); }
.dota-hero-card.blue .dota-rarity { color: var(--sky); background: rgba(14, 165, 233, .1); }
.dota-hero-card.green .dota-rarity { color: var(--emerald); background: var(--emerald-soft); }
.dota-hero-card.white .dota-rarity { color: var(--ink-2); background: rgba(148, 163, 184, .14); }
.dota-score { font-size: 14px; font-weight: 800; color: #7c3aed; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-hero-name { margin-top: 6px; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.dota-hero-pos { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.dota-counter-tip { margin-top: 6px; font-size: 11px; color: var(--sky); font-weight: 650; }
.dota-synergy-tip { margin-top: 3px; font-size: 11px; color: var(--emerald); font-weight: 650; }
.dota-counter-buff, .dota-synergy-buff { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 650; border-radius: 6px; padding: 1px 7px; }
.dota-counter-buff { color: var(--sky); background: rgba(14, 165, 233, .1); }
.dota-synergy-buff { color: var(--emerald); background: var(--emerald-soft); }
.dota-counter-buff.mini, .dota-synergy-buff.mini { margin-top: 0; margin-left: 6px; font-size: 10px; }

.dota-stat-bars { display: flex; gap: 5px; margin-top: 10px; }
.dota-stat-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.dota-stat-value { font-size: 9.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); font-weight: 650; }
.dota-stat-track { width: 100%; height: 40px; margin-top: 3px; border-radius: 6px; background: rgba(148, 163, 184, .16); overflow: hidden; display: flex; align-items: flex-end; }
.dota-stat-fill { width: 100%; border-radius: 6px 6px 0 0; }
.dota-hero-card.orange .dota-stat-fill { background: linear-gradient(180deg, #818cf8, #6366f1); }
.dota-hero-card.blue .dota-stat-fill { background: linear-gradient(180deg, #38bdf8, #0ea5e9); }
.dota-hero-card.green .dota-stat-fill { background: linear-gradient(180deg, #34d399, #10b981); }
.dota-hero-card.white .dota-stat-fill { background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.dota-stat-label { margin-top: 3px; font-size: 9px; color: var(--ink-3); }
.dota-stat-bars.wide { gap: 7px; }
.dota-stat-bars.wide .dota-stat-track { height: 54px; }

.dota-ai-preview { margin-top: 14px; }
.dota-ai-preview > .section-title, .dota-ai-preview > .dota-section-title { margin-bottom: 8px; }
.dota-mini-lineup { display: flex; flex-direction: column; gap: 4px; }
.dota-mini-line { font-size: 12.5px; }
.dota-mini-counter { margin-left: 6px; color: var(--sky); font-size: 11px; font-weight: 650; }
.dota-mini-synergy { margin-left: 6px; color: var(--emerald); font-size: 11px; font-weight: 650; }

.dota-drag-ghost { position: fixed; z-index: 300; pointer-events: none; padding: 10px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 750; background: var(--glass-strong); border: 1.5px solid var(--primary); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow-pop); }

.dota-locked-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .dota-locked-grid { grid-template-columns: 1fr; } }
.dota-locked-hero { background: var(--glass-soft); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.dota-locked-hero.orange { border-top: 3px solid var(--primary); }
.dota-locked-hero.blue { border-top: 3px solid var(--sky); }
.dota-locked-hero.green { border-top: 3px solid var(--emerald); }
.dota-locked-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dota-locked-head b { font-size: 14px; }
.dota-locked-head span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-2); }
.dota-position-buff { margin-bottom: 12px; padding: 9px 13px; border-radius: var(--radius-sm); background: rgba(139, 92, 246, .09); color: #7c3aed; font-size: 12.5px; font-weight: 650; border: 1px solid rgba(139, 92, 246, .2); }

.dota-phase-head { display: flex; justify-content: space-between; align-items: flex-start; }
.dota-phase-count { font-size: 12px; color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-combat-power { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13px; }
.dota-combat-power b { font-size: 17px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-combat-power span:first-child b { color: var(--primary); }
.dota-combat-power span:last-child b { color: var(--sky); }
.dota-counter-summary, .dota-synergy-summary, .dota-position-summary { margin-top: 7px; font-size: 11.5px; display: flex; flex-direction: column; gap: 3px; }
.dota-counter-summary { color: var(--sky); }
.dota-synergy-summary { color: var(--emerald); }
.dota-position-summary { color: var(--ink-2); }
.dota-win-labels { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; font-weight: 750; }
.dota-win-labels span:first-child { color: var(--primary); }
.dota-win-labels span:last-child { color: var(--sky); }
.dota-win-bar { display: flex; height: 10px; margin-top: 5px; border-radius: 999px; overflow: hidden; background: rgba(148, 163, 184, .18); }
.dota-win-player { background: linear-gradient(90deg, #6366f1, #a855f7); border-radius: 999px 0 0 999px; transition: width .5s; }
.dota-win-ai { background: linear-gradient(90deg, #38bdf8, #0ea5e9); border-radius: 0 999px 999px 0; transition: width .5s; }
.dota-phase-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.dota-phase-strip span { text-align: center; font-size: 10.5px; padding: 5px 0; border-radius: 8px; color: var(--ink-3); background: rgba(148, 163, 184, .1); font-weight: 600; }
.dota-phase-strip span.active { color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); font-weight: 750; box-shadow: 0 4px 12px rgba(99, 102, 241, .35); }
.dota-phase-strip span.done { color: var(--emerald); background: var(--emerald-soft); }

.dota-lineup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 760px) { .dota-lineup-grid { grid-template-columns: 1fr; } }
.dota-lineup-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 13px 14px; background: rgba(255, 255, 255, .5); }
.dota-lineup-card.ai { border-color: rgba(14, 165, 233, .25); }
.dota-lineup-title { font-size: 12.5px; font-weight: 750; margin-bottom: 8px; }
.dota-lineup-card .dota-lineup-title { color: var(--primary); }
.dota-lineup-card.ai .dota-lineup-title { color: var(--sky); }
.dota-lineup-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(28, 36, 58, .06); padding: 6px 0; font-size: 12.5px; }
.dota-lineup-row:first-of-type { border-top: none; }
.dota-lineup-row > span:first-child { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-lineup-hero { flex: 1 1 auto; min-width: 0; }
.dota-power-wrap { flex: none; display: flex; align-items: center; gap: 5px; }
.dota-power-number { font-size: 14px; font-weight: 800; color: #7c3aed; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

.dota-log-row { display: flex; gap: 10px; border-top: 1px solid var(--hairline); padding: 8px 2px; font-size: 12.5px; }
.dota-log-row:first-child { border-top: none; }
.dota-log-row > span { flex: none; width: 52px; color: var(--primary); font-weight: 700; }
.dota-log-row b { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-log-text { display: block; margin-top: 2px; color: var(--ink-2); font-size: 11.5px; }

.dota-result-card { text-align: center; padding: 26px 16px; }
.dota-result-title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.dota-result-score { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); }

.dota-final-card { text-align: center; padding: 26px 18px; }
.dota-final-kicker { font-size: 11px; letter-spacing: .24em; color: var(--violet); font-weight: 700; }
.dota-final-label { margin-top: 9px; font-size: 13px; color: var(--ink-2); }
.dota-final-placement { margin-top: 4px; font-size: 32px; font-weight: 900; color: var(--primary); text-shadow: 0 0 30px rgba(99, 102, 241, .35); }
.dota-final-stats { display: flex; justify-content: center; gap: 34px; margin-top: 14px; }
.dota-final-stats span { display: block; font-size: 11.5px; color: var(--ink-2); }
.dota-final-stats b { display: block; margin-top: 2px; font-size: 17px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-champion-box { margin-top: 16px; padding: 15px; border-radius: var(--radius); background: rgba(139, 92, 246, .08); border: 1px solid rgba(139, 92, 246, .3); }
.dota-champion-score { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--ink-2); }
.dota-champion-score b { font-size: 24px; color: var(--violet); font-variant-numeric: tabular-nums; font-family: var(--font-num); text-shadow: 0 0 18px rgba(168, 85, 247, .35); }
.dota-champion-lineup { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 9px; font-size: 12px; font-weight: 650; }
.dota-champion-upload { margin-top: 12px; width: 100%; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 13.5px; font-weight: 750; cursor: pointer; box-shadow: 0 8px 18px rgba(99, 102, 241, .35); }
.dota-route-list { text-align: left; margin-top: 14px; }
.dota-route-title { font-size: 12px; color: var(--ink-2); margin-bottom: 5px; font-weight: 650; }
.dota-route-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--hairline); padding: 7px 2px; font-size: 12.5px; }
.dota-route-row span { flex: 1 1 auto; }
.dota-route-row b { flex: none; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-route-row b.win { color: var(--emerald); }
.dota-route-row b.loss { color: var(--rose); }

/* ============ 弹层（玻璃 sheet） ============ */
.mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(23, 28, 51, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
}
.mask.open { display: flex; }
.sheet {
  width: 100%; max-width: 620px; max-height: 88dvh;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 22px 22px 0 0;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sheet);
  display: flex; flex-direction: column;
  animation: sheetUp .24s ease-out;
}
@media (min-width: 720px) { .sheet { border-radius: 22px; margin-bottom: 34px; } }
@keyframes sheetUp { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.sheet-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.sheet-sub { margin-top: 3px; font-size: 12px; color: var(--ink-2); }
.sheet-close { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .6); border: 1px solid var(--hairline); color: var(--ink-2); font-size: 14px; line-height: 28px; text-align: center; padding: 0; cursor: pointer; }
.sheet-close:hover { color: var(--rose); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 24px; scrollbar-width: thin; }

.dota-leaderboard-row { display: grid; grid-template-columns: 30px 42px minmax(0, 1fr) 74px; gap: 12px; align-items: center; border-top: 1px solid var(--hairline); padding: 10px 2px; }
.dota-leaderboard-row:first-child { border-top: none; }
.dota-rank-no { font-size: 15px; font-weight: 800; color: var(--violet); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-rank-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(168, 85, 247, .14)); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--primary); font-weight: 750; overflow: hidden; border: 1px solid rgba(99, 102, 241, .25); }
.dota-rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dota-rank-main { min-width: 0; }
.dota-rank-name { font-size: 13.5px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dota-rank-lineup { margin-top: 2px; font-size: 11px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dota-rank-time { margin-top: 2px; font-size: 10.5px; color: var(--ink-3); }
.dota-rank-power { text-align: right; }
.dota-rank-power b { display: block; font-size: 18px; color: var(--primary); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dota-rank-power span { font-size: 10px; color: var(--ink-3); }
.dota-leaderboard-empty { padding: 26px 8px; color: var(--ink-3); font-size: 13px; text-align: center; }

.avatar-picker { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 4px auto 14px; border-radius: 50%; overflow: hidden; cursor: pointer; background: rgba(255, 255, 255, .55); border: 2px dashed rgba(99, 102, 241, .4); color: var(--ink-2); font-size: 11.5px; transition: all .15s; }
.avatar-picker:hover { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.avatar-picker img { width: 100%; height: 100%; object-fit: cover; }
.avatar-picker input { display: none; }
.nickname-input { width: 100%; height: 42px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; text-align: center; }
.upload-lineup { display: flex; flex-wrap: wrap; gap: 5px 12px; justify-content: center; margin-top: 13px; font-size: 12px; color: var(--ink-2); }

.cs-sheet-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cs-sheet-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(99, 102, 241, .3); }
.cs-sheet-name { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.cs-sheet-sub { margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.cs-sheet-badges { display: flex; gap: 8px; padding: 0 20px 6px; }
.cs-title-badge { padding: 3px 10px; border-radius: 7px; font-size: 11px; font-weight: 750; }
.cs-title-badge.tier-R { background: var(--rose-soft); color: var(--rose); }
.cs-title-badge.tier-G { background: rgba(139, 92, 246, .12); color: #7c3aed; }
.cs-title-badge.tier-P { background: rgba(168, 85, 247, .14); color: #a855f7; }
.cs-title-badge.tier-N { background: rgba(148, 163, 184, .14); color: var(--ink-2); }
.cs-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.cs-detail-grid > div { background: rgba(255, 255, 255, .55); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 11px 4px; text-align: center; }
.cs-detail-grid span { display: block; font-size: 10.5px; color: var(--ink-3); }
.cs-detail-grid b { display: block; margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-detail-title { margin: 14px 0 7px; font-size: 13px; font-weight: 750; }
.cs-dim-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.cs-dim-label { flex: none; width: 100px; display: flex; justify-content: space-between; font-size: 12px; }
.cs-dim-label span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-dim-track { flex: 1 1 auto; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.cs-dim-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #a855f7); }
.cs-matchup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cs-matchup-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cs-matchup-row b { color: var(--violet); }
.cs-matchup-row.danger b { color: var(--rose); }
.cs-mini-empty { font-size: 11.5px; color: var(--ink-3); padding: 5px 0; }

/* 设置 */
.settings-sheet .field { margin-bottom: 14px; }
.settings-sheet .field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; font-weight: 650; }
.settings-sheet .field input { width: 100%; height: 40px; padding: 0 13px; background: var(--glass-soft); border: 1px solid var(--hairline); border-radius: 10px; font-size: 13px; }
.settings-sheet .field input:focus { border-color: var(--glass-border-strong); box-shadow: 0 0 0 4px var(--primary-soft); }
.settings-sheet .hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.65; margin-top: 12px; }
.settings-sheet .sel-row { display: flex; gap: 8px; flex-wrap: wrap; }

.debug-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 400; padding: 10px 20px; border-radius: 999px;
  background: rgba(28, 34, 63, .88); color: #fff; font-size: 12.5px;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 8px 30px rgba(28, 34, 63, .35);
  opacity: 0; transition: opacity .22s; pointer-events: none;
  white-space: nowrap; max-width: 86%; overflow: hidden; text-overflow: ellipsis;
}
.debug-toast.show { opacity: 1; }

.footer-note { text-align: center; margin-top: 40px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .05em; }
.footer-note b { color: var(--ink-2); font-weight: 650; }