:root {
  /* 取色自 League Akari 浅色主题（对局页） */
  --bg: #f7eff3;
  --card-bg: rgba(245, 245, 245, 0.9);
  --card-border: rgba(23, 23, 23, 0.2);
  --panel: #ffffff;
  --line: rgba(23, 23, 23, 0.12);
  --text: rgba(0, 0, 0, 0.88);
  --text-80: rgba(0, 0, 0, 0.8);
  --text-60: rgba(0, 0, 0, 0.6);
  --text-40: rgba(0, 0, 0, 0.4);
  --blue: #3b82f6;
  --red: #ef4444;
  --gold: #b8860b;
  --green: #15803d;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--text-60); }
.small { font-size: 12px; }
.dim { opacity: .45; }
img { border: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 16px; padding: 10px 20px;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  background: linear-gradient(135deg, #d4a72c, #8a6d1f);
  color: #1a1206; font-weight: 800; letter-spacing: .5px;
  padding: 4px 8px; border-radius: 6px; font-size: 13px;
}
.title { font-weight: 600; letter-spacing: .5px; }
.status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-60); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.conn.on i { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .6); }
.conn.off i { background: #ef4444; }
.conn.wait i { background: #f59e0b; }
.conn em { font-style: normal; }
.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .05); border: 1px solid var(--line); color: var(--text-60);
}
/* 无内容的空徽章/芯片不占位（例如未排队时队列名、无对局时的计时） */
.chip:empty, .badge:empty { display: none; }
.badge.ph-champ-select { border-color: #d9c07a; color: #8a6d1f; background: #fdf6e3; }
.badge.ph-client-online { border-color: #a7e0b8; color: #15803d; background: #ecfdf3; }
.badge.ph-lobby { border-color: #c7d2fe; color: #4338ca; background: #eef2ff; }
.badge.ph-matchmaking { border-color: #fcd34d; color: #b45309; background: #fffbeb; }
.badge.ph-ready { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.badge.ph-offline { border-color: #e5e7eb; color: #6b7280; background: #f3f4f6; }
.badge.ph-in-game { border-color: #9ec5fe; color: #2563eb; background: #eaf2ff; }
.badge.ph-end-of-game { border-color: #a7e0b8; color: #15803d; background: #ecfdf3; }
.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .04); border: 1px solid var(--line);
}
/* 在线人数：绿点 + 在线 N 人（数字加粗，人数变化时轻微跳动） */
.chip.online {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px 2px 7px;
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .38);
  color: #15803d;
}
.chip.online .od {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}
.chip.online .ol { opacity: .85; }
.chip.online .on {
  font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.chip.online .ou { opacity: .75; }
.chip.online.is-bump { animation: onlineBump .32s ease-out; }
@keyframes onlineBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
/* 断线时保留最后人数，绿点转灰提示可能不是最新 */
.chip.online.is-stale { background: rgba(0, 0, 0, .04); border-color: var(--line); color: var(--text-60); }
.chip.online.is-stale .od { background: #9ca3af; box-shadow: none; }
html[data-mode="dark"] .chip.online {
  background: rgba(34, 197, 94, .16);
  border-color: rgba(34, 197, 94, .34);
  color: #86efac;
}
html[data-mode="dark"] .chip.online.is-stale { background: rgba(255, 255, 255, .06); color: var(--text-60); }
/* 可点击：打开在线详情 */
.chip.online { cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; touch-action: manipulation; }
.chip.online:hover { background: rgba(34, 197, 94, .18); border-color: rgba(34, 197, 94, .6); box-shadow: 0 2px 8px rgba(34, 197, 94, .18); }
.chip.online:focus-visible { outline: 2px solid rgba(34, 197, 94, .55); outline-offset: 2px; }

/* ---------- 在线详情 ---------- */
.v-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.v-tab {
  height: 30px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--text-60);
  font: 600 12px/1 inherit; cursor: pointer; touch-action: manipulation;
}
.v-tab b { font-variant-numeric: tabular-nums; }
.v-tab:hover { color: var(--text); border-color: var(--text-40, #c9c9c9); }
.v-tab.on {
  background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .45); color: var(--text);
}
.v-sum {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 12px; color: var(--text-60);
}
.v-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.v-list { display: flex; flex-direction: column; gap: 10px; }
.v-row {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-bg, #fff); padding: 10px 12px;
}
.v-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-idx {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .05); color: var(--text-60);
  font: 700 11px/1 ui-monospace, Consolas, monospace;
}
.v-ip { font: 700 13px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .2px; }
.v-live {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #15803d;
}
.v-live i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.v-live.is-old { color: var(--text-60); }
.v-live.is-old i { background: #9ca3af; }
.v-tag {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .03); color: var(--text-60);
  font-size: 11px; white-space: nowrap;
}
.v-meta {
  margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 11.5px; color: var(--text-60);
}
.v-meta em { font-style: normal; color: var(--text-80, var(--text)); font-variant-numeric: tabular-nums; }
.v-ua {
  margin-top: 6px; font-size: 11px; color: var(--text-40, var(--text-60));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.v-empty { padding: 18px 4px; color: var(--text-60); font-size: 12.5px; }
.v-tip { margin-top: 12px; font-size: 11.5px; color: var(--text-40, var(--text-60)); }
html[data-mode="dark"] .v-idx { background: rgba(255, 255, 255, .08); }
html[data-mode="dark"] .v-live { color: #86efac; }
html[data-mode="dark"] .v-live.is-old { color: var(--text-60); }
html[data-mode="dark"] .v-tab.on { background: rgba(34, 197, 94, .2); }
html[data-mode="dark"] .v-tag { background: rgba(255, 255, 255, .06); }
html[data-mode="dark"] .v-row { background: rgba(255, 255, 255, .02); }
html[data-mode="dark"] .lb-row { background: rgba(255, 255, 255, .02); }
html[data-mode="dark"] .lb-row.is-ready { background: rgba(34, 197, 94, .15); }
html[data-mode="dark"] .lb-av { background: rgba(255,255,255,.04); }
html[data-mode="dark"] .lb-lvl { background: var(--card-bg, #1a1a1a); }
html[data-mode="dark"] .lb-st { background: rgba(255,255,255,.06); }
html[data-mode="dark"] .lb-st.ready { background: rgba(34, 197, 94, .2); }
html[data-mode="dark"] .lb-st.searching { background: rgba(59, 130, 246, .2); }
html[data-mode="dark"] .lb-row.is-mm { background: rgba(59, 130, 246, .08); }

/* ---------- 布局 ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px; padding: 16px; align-items: start;
  max-width: 1700px; margin: 0 auto;
  flex: 1 0 auto; width: 100%;
}
.layout > main { min-width: 0; }
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

.empty {
  text-align: center; padding: 40px 24px 28px;
  background: rgba(255, 255, 255, .7); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-icon { font-size: 40px; opacity: .4; }
.empty h2 { margin: 12px 0 6px; font-size: 20px; }
.empty p { color: var(--text-60); margin: 0; }
/* ---------- 房间中玩家列表 ---------- */
.lobby {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px dashed var(--line);
  text-align: left;
}
/* ---------- 等待娱乐区：悬浮入口 + 面板（BP / 对局中 / 结算 / 空态都可用） ---------- */
.fun-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 99; display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25);
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  font: 700 14px/1 inherit;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .38);
  transition: transform .15s, filter .15s, box-shadow .15s, background .15s;
}
.fun-fab:hover { transform: translateY(-1px); filter: brightness(1.06); }
.fun-fab:active { transform: translateY(0) scale(.98); }
.fun-fab.is-open { background: linear-gradient(135deg, #475569, #334155); box-shadow: 0 8px 20px rgba(15, 23, 42, .35); }
.fun-fab-ico { font-size: 17px; }
.fun-fab-txt { letter-spacing: .5px; }
.fun-bar {
  position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 99; width: min(540px, calc(100vw - 36px));
  max-height: min(76vh, 640px); overflow-y: auto; overscroll-behavior: contain;
  padding: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
}
/* ---------- 空态（比赛开始前）：内嵌折叠横条，沿用原来的展示方式 ---------- */
.fun-idle {
  width: min(560px, 100%); margin: 16px auto 0; text-align: left;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); overflow: hidden;
}
.fun-idle-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 12px 14px; border: 0; background: transparent;
  color: var(--text); font: 600 13px/1 inherit; cursor: pointer;
  transition: background .15s;
}
.fun-idle-toggle:hover { background: rgba(127, 127, 127, .08); }
.fun-idle-toggle .fi-ico { font-size: 17px; }
.fun-idle-toggle .fi-txt { flex: 1 1 auto; text-align: left; }
.fun-idle-toggle .fi-arrow { color: var(--blue); font-weight: 700; }
.fun-idle-panel { padding: 12px 14px 14px; border-top: 1px solid var(--line); }

.fun-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.fun-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.fun-tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--text-60); cursor: pointer;
  font: 600 13px/1 inherit;
}
.fun-tab.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.fun-close {
  border: none; background: transparent; color: var(--text-60); cursor: pointer;
  font: 500 12.5px/1 inherit; padding: 6px 8px;
}
.fun-close:hover { color: var(--text); }
.fun-panel { text-align: center; padding: 4px 2px 6px; }
.fun-prog { font: 500 12px/1.4 ui-monospace, Consolas, monospace; color: var(--text-60); margin-bottom: 10px; }
.fun-hero { display: flex; justify-content: center; margin: 4px 0 14px; }
.fun-hero-img {
  width: 96px; height: 96px; border-radius: 14px; object-fit: cover;
  filter: blur(6px) saturate(.55); transition: filter .25s;
  border: 2px solid var(--line);
}
.fun-hero-img.is-reveal { filter: none; border-color: var(--blue); }
.fun-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fun-opt {
  padding: 12px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font: 600 14px/1.2 inherit;
  transition: border-color .15s, background .15s;
}
.fun-opt:hover:not(:disabled) { border-color: var(--blue); background: rgba(59, 130, 246, .08); }
.fun-opt:disabled { cursor: default; }
.fun-opt.is-right { border-color: #22c55e; background: rgba(34, 197, 94, .14); color: #15803d; }
.fun-opt.is-wrong { border-color: #ef4444; background: rgba(239, 68, 68, .12); color: #b91c1c; }
.fun-tip { margin-top: 12px; font-size: 12.5px; color: var(--text-60); }
.fun-result { padding: 6px 0 2px; }
.fun-emoji-big { font-size: 34px; }
.fun-score { margin-top: 8px; font: 700 18px/1.2 inherit; color: var(--text); }
.fun-best { margin-top: 4px; font-size: 12.5px; color: var(--text-60); }
.fun-btn {
  margin-top: 14px; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  font: 600 14px/1 inherit;
}
.fun-btn:hover { filter: brightness(1.08); }
.fun-btn.ghost { background: transparent; color: var(--blue); }
.fun-draw-list { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.fun-draw-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel);
}
.fun-draw-name { flex: none; max-width: 40%; font: 600 13px/1.3 inherit; color: var(--text); word-break: break-all; }
.fun-draw-c { color: var(--text-80); font-size: 13px; }
.fun-draw-acts { display: flex; gap: 10px; justify-content: center; }
.fun-empty { padding: 14px 4px; color: var(--text-60); font-size: 13px; }
html[data-mode="dark"] .fun-opt { background: rgba(255, 255, 255, .05); }
html[data-mode="dark"] .fun-opt.is-right { color: #4ade80; }
html[data-mode="dark"] .fun-opt.is-wrong { color: #f87171; }
html[data-mode="dark"] .fun-draw-row { background: rgba(255, 255, 255, .05); }
/* ---------- 等待小游戏 · 独立模块（翻牌 / 连连看 / 拼图） ---------- */
.mini-mount { text-align: center; padding: 2px 0 4px; }
.mini-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px;
  margin-bottom: 10px; font: 500 12px/1.4 inherit; color: var(--text-60);
}
.mini-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.mini-tip { margin-top: 10px; font-size: 12px; color: var(--text-60); }
.mini-empty { padding: 18px 4px; color: var(--text-60); font-size: 13px; }
.mini-grid { display: grid; gap: 6px; justify-content: center; margin: 0 auto; }
.mem-grid { grid-template-columns: repeat(4, 56px); }
.mem-card {
  width: 56px; height: 70px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(145deg, #334155, #1e293b);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mem-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mem-card .mem-q { font: 700 20px/1 inherit; color: rgba(255, 255, 255, .65); }
.mem-card.is-down:hover { border-color: var(--blue); }
.mem-card.is-matched { border-color: #22c55e; opacity: .45; cursor: default; }
.lk-grid {
  display: grid; grid-template-columns: repeat(6, 44px); gap: 6px;
  justify-content: center; margin: 0 auto;
}
.lk-cell {
  width: 44px; height: 44px; padding: 0; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer;
}
.lk-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lk-cell.is-empty { border-color: transparent; background: transparent; cursor: default; }
.lk-cell.is-sel { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, .35); }
.lk-cell.is-bad { border-color: #ef4444; animation: lk-shake .3s; }
@keyframes lk-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
.pz-wrap { position: relative; display: flex; justify-content: center; }
.pz-board {
  width: 246px; height: 246px; display: grid;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 2px; padding: 2px; border-radius: 10px; background: var(--line);
}
.pz-tile {
  padding: 0; border: none; cursor: pointer; background-size: 300% 300%;
  background-repeat: no-repeat; border-radius: 4px;
}
.pz-tile.is-empty { background: rgba(0, 0, 0, .1); cursor: default; }
html[data-mode="dark"] .pz-tile.is-empty { background: rgba(255, 255, 255, .06); }
.pz-preview {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .72); border-radius: 10px; z-index: 2;
}
.pz-preview img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.mini-acts { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.mini-link {
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-60);
  font: 600 12.5px/1 inherit;
}
.mini-link:hover { border-color: var(--blue); color: var(--blue); }
.mini-result { margin-top: 12px; }
.mini-result-title { font: 700 16px/1.2 inherit; color: var(--text); }
.mini-result-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-60); }
.mini-link.is-active { border-color: var(--blue); color: var(--blue); background: rgba(59, 130, 246, .12); }
/* 英雄 2048 */
.g-grid {
  display: grid; grid-template-columns: repeat(4, 56px); gap: 6px;
  justify-content: center; margin: 0 auto;
}
.g-cell {
  position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #eef2f7; color: #334155;
}
.g-cell.is-empty { background: rgba(127, 127, 127, .14); }
.g-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.g-cell b { position: relative; font: 800 15px/1 inherit; font-variant-numeric: tabular-nums; }
.g-cell.lv2 { background: #dbeafe; }
.g-cell.lv3 { background: #bfdbfe; }
.g-cell.lv4 { background: #93c5fd; }
.g-cell.lv5 { background: #60a5fa; color: #0b1a2b; }
.g-cell.lv6 { background: #3b82f6; color: #fff; }
.g-cell.lv7 { background: #2563eb; color: #fff; }
.g-cell.lv8 { background: #7c3aed; color: #fff; }
.g-cell.lv9 { background: #9333ea; color: #fff; }
.g-cell.lv10 { background: #db2777; color: #fff; }
.g-cell.lv11 { background: #f59e0b; color: #3b1d00; }
/* 扫雷 */
.mine-grid {
  display: grid; grid-template-columns: repeat(9, 32px); gap: 3px;
  justify-content: center; margin: 0 auto;
}
.mine-cell {
  width: 32px; height: 32px; padding: 0; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(127, 127, 127, .16);
  color: var(--text); font: 700 12px/1 inherit;
  display: flex; align-items: center; justify-content: center;
}
.mine-cell:hover:not(.is-open) { border-color: var(--blue); }
.mine-cell.is-open { background: rgba(127, 127, 127, .06); border-color: transparent; cursor: default; }
.mine-cell.is-flag { color: #e11d48; }
.mine-cell.is-mine { background: #ef4444; border-color: transparent; color: #fff; }
.mine-cell.n1 { color: #2563eb; }
.mine-cell.n2 { color: #16a34a; }
.mine-cell.n3 { color: #dc2626; }
.mine-cell.n4 { color: #7c3aed; }
.mine-cell.n5 { color: #b45309; }
.mine-cell.n6 { color: #0891b2; }
.mine-cell.n7 { color: #475569; }
.mine-cell.n8 { color: #64748b; }
/* 贪吃蛇 */
.snake-grid {
  display: grid; grid-template-columns: repeat(15, 1fr); gap: 1px;
  width: min(330px, 100%); aspect-ratio: 1; margin: 0 auto; padding: 3px;
  border-radius: 8px; background: rgba(127, 127, 127, .12);
}
.snake-cell {
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px; overflow: hidden;
}
.snake-cell.is-body { background: #60a5fa; }
.snake-cell.is-head { background: #2563eb; }
.snake-cell.is-food img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
/* 方向键 */
.dpad {
  display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 38px);
  gap: 5px; justify-content: center; margin: 12px auto 0;
}
.dpad button {
  padding: 0; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  background: var(--panel); color: var(--text); font: 700 14px/1 inherit;
}
.dpad button:hover { border-color: var(--blue); color: var(--blue); }
.dpad .up { grid-area: 1 / 2; }
.dpad .left { grid-area: 2 / 1; }
.dpad .down { grid-area: 3 / 2; }
.dpad .right { grid-area: 2 / 3; }
.fun-tabs { flex-wrap: wrap; }
.fun-tab { padding: 7px 13px; }
.lb-head {
  display: flex; align-items: center; justify-content: space-between;
  font: 600 13px/1 inherit; color: var(--text); margin-bottom: 12px;
}
.lb-sum {
  font: 500 12px/1 ui-monospace, Consolas, monospace;
  color: var(--text-60);
}
.lb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-bg, #fff);
  transition: border-color .15s, box-shadow .15s;
}
.lb-row:hover { border-color: var(--text-40, #c9c9c9); }
.lb-row[role="button"] { cursor: pointer; }
.lb-row.is-ready { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .06); }
.lb-av-wrap { position: relative; flex-shrink: 0; }
.lb-av {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: rgba(0, 0, 0, .05); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.lb-av img { width: 100%; height: 100%; object-fit: cover; }
.lb-av i { width: 100%; height: 100%; display: block; background: rgba(0,0,0,.06); }
.lb-lvl {
  position: absolute; bottom: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 10px;
  font: 700 10px/16px ui-monospace, Consolas, monospace;
  background: var(--card-bg, #fff); color: var(--text);
  border: 1px solid var(--line);
  text-align: center; box-sizing: border-box;
}
.lb-info { flex: 1 1 0; min-width: 0; text-align: left; }
.lb-name {
  font: 600 13px/1.35 inherit;
  word-break: break-all;
  white-space: normal;
}
.lb-tag { color: var(--text-40, var(--text-60)); font-size: 11px; font-weight: 500; margin-left: 2px; }
.lb-sub { font: 500 11px/1.4 inherit; color: var(--text-60); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.lb-rank { font-weight: 600; }
.lb-rank.iron { color: #8a7d68; }
.lb-rank.bronze { color: #a1693a; }
.lb-rank.silver { color: #8b9aa8; }
.lb-rank.gold { color: #c89b3c; }
.lb-rank.platinum { color: #1e8c7a; }
.lb-rank.emerald { color: #0f9d58; }
.lb-rank.diamond { color: #5b8def; }
.lb-rank.master { color: #c762de; }
.lb-rank.grandmaster { color: #e06c5c; }
.lb-rank.challenger { color: #d4af37; }
.lb-wr.good { color: #15803d; }
.lb-wr.bad { color: #b91c1c; }
.lb-sc {
  display: inline-flex; align-items: center;
  font: 600 10.5px/1 inherit;
  color: #c89b3c;
}
.lb-st-wrap { flex-shrink: 0; }
.lb-st {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font: 600 10.5px/1 inherit; white-space: nowrap;
  background: rgba(0, 0, 0, .04); color: var(--text-60);
  border: 1px solid var(--line);
}
.lb-st.ready { background: rgba(34, 197, 94, .12); color: #15803d; border-color: rgba(34, 197, 94, .4); }
.lb-st.searching { background: rgba(59, 130, 246, .12); color: #1d4ed8; border-color: rgba(59, 130, 246, .4); }
.lb-row.is-mm { border-color: rgba(59, 130, 246, .4); background: rgba(59, 130, 246, .04); }
.lb-self {
  display: inline-flex; align-items: center; justify-content: center;
  height: 16px; padding: 0 6px; border-radius: 4px; margin-left: 6px;
  font: 600 10px/1 inherit;
  background: #c89b3c; color: #fff;
}

.view-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.view-head h3 { margin: 0; font-size: 15px; font-weight: 700; }

/* ==================== 队伍（Akari OngoingGameTeam） ==================== */
.akari-team { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.team-head { display: flex; align-items: flex-end; }
.team-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255, 255, 255, .2);
  margin-right: 8px; align-self: center;
}
.akari-team.is-order .team-dot { background: #40c1ff; }
.akari-team.is-chaos .team-dot { background: #ff3333; }
.team-name { margin-right: 12px; font-size: 16px; line-height: 1.25; font-weight: 700; }
.team-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tt-wr { font-size: 14px; font-weight: 700; }
.tt-wr.good { color: #2c8c6c; }
.tt-wr.bad { color: #cc0000; }
.tt-sep {
  margin: 0 8px; height: .9em; width: 1px;
  align-self: center; background: rgba(0, 0, 0, .15); flex: none;
}
.tt-kda { font-size: 14px; font-variant-numeric: tabular-nums; }
.tt-group {
  display: inline-flex; align-items: center; overflow: hidden; border-radius: 4px;
}
.tt-group > span {
  padding: 2px 4px; font-size: 12px; line-height: 12px; color: #fff; white-space: nowrap;
}
.tt-group .seg-rate { background: #7e2c85; }
.tt-group .seg-loss { background: #893b3b; }

/* 卡片网格：与 Akari 一致的信息密度；宽度自适应，保证一队 5 张能排在同一行 */
.akari-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
  align-items: flex-start;
}
.akari-cards > * { flex: 1 1 200px; min-width: 0; max-width: 240px; }
.pc-empty {
  padding: 20px; text-align: center; color: var(--text-60); font-size: 12px;
  background: var(--card-bg); border: 1px dashed var(--card-border); border-radius: 6px;
  flex: 1 0 100%; max-width: none;
}

/* ==================== 玩家卡（Akari PlayerInfoCard） ==================== */
.p-card {
  position: relative; overflow: hidden;
  width: 100%; height: 375px;
  display: flex; flex-direction: column;
  padding: 8px; border-radius: 4px; border: 1px solid var(--card-border);
  background: var(--card-bg);
  min-width: 0;
}
.p-card.is-self { box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .28); }
.p-card.dead { filter: grayscale(.5); opacity: .72; }
.pc-deco {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: 16px; height: 16px; transform: translate(50%, -50%) rotate(45deg);
}

/* 头部：英雄头像 + 名字 + 双段位 */
.pc-head { display: flex; margin-bottom: 4px; }
.pc-av { position: relative; margin-right: 8px; flex: none; }
.pc-av img, .pc-av i {
  width: 42px; height: 42px; border-radius: 50%; display: block; object-fit: cover;
  background: #d9d9d9; box-shadow: 0 0 0 1px rgba(255, 255, 255, .31);
}
.pc-lvl {
  position: absolute; right: 0; bottom: 0; transform: translateX(35%);
  background: rgba(0, 0, 0, .5); color: #fff;
  font-size: 10px; line-height: 13px; padding: 0 4px; border-radius: 4px;
}
/* 召唤师技能徽章（头像右下角叠两个小图标） */
.pc-spells {
  position: absolute; right: 0; top: 0; display: flex; gap: 1px; z-index: 1;
}
.pc-spells img {
  width: 12px; height: 12px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
  background: #e5e7eb; object-fit: cover;
}
/* 场均数据胶囊行 */
.ap-row {
  display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px;
  font-size: 11px;
}
.ap-pill {
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 1px 6px; border-radius: 8px;
  background: rgba(0, 0, 0, .04); border: 1px solid rgba(0, 0, 0, .08);
  color: var(--text-60, #6b7280); line-height: 1.5;
}
.ap-pill b {
  font: 700 11px/1.3 ui-monospace, Consolas, monospace;
  color: var(--text, #111827);
}
/* 本局英雄熟练度徽章（头像左下角，LCU 等级配色：4绿 5蓝 6紫 7金 8+红） */
.mastery-badge {
  position: absolute; left: 0; bottom: 0; transform: translateX(-30%);
  min-width: 14px; height: 14px; padding: 0 3px; box-sizing: border-box;
  font-size: 9px; line-height: 14px; font-weight: 700; text-align: center;
  color: #fff; border-radius: 3px; z-index: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .4);
}
.mastery-badge.m4 { background: #4caf50; }
.mastery-badge.m5 { background: #2196f3; }
.mastery-badge.m6 { background: #9c27b0; }
.mastery-badge.m7 { background: #c8a355; }
.mastery-badge.m7x { background: #e0483e; }
/* 晋级赛进度徽章（段位文本右侧） */
.mini-series {
  flex: none; font-style: normal; font-size: 9px; line-height: 13px;
  padding: 0 3px; margin-left: 4px; border-radius: 2px;
  background: #f59e0b; color: #fff; font-weight: 700; white-space: nowrap;
}
.pc-headinfo { flex: 1; width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pc-name-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pc-name {
  font-size: 13px; font-weight: 700; color: var(--text-80);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-tag { margin-left: 4px; font-size: 12px; color: #6b7280; flex: none; }
.pc-ranks { display: flex; gap: 4px; }
.pc-rank { display: flex; width: 0; flex: 1; align-items: center; justify-content: flex-start; }
.pc-rank.is-none { justify-content: center; }
.pc-rank img { width: 14px; height: 14px; margin-right: 4px; flex: none; }
.pc-rank span {
  font-size: 11px; color: var(--text-80);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-rank.is-none span { color: var(--text-60); }

/* 三列统计：胜率(场次) | 平均 KDA | 位置 */
.pc-stats { display: flex; align-items: center; margin-bottom: 4px; }
.pc-stats > .pc-wr, .pc-stats > .pc-kda {
  flex: 1 1 0; min-width: 0; text-align: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pc-wr.good, .pc-kda.good { color: #15803d; }
.pc-wr.mid, .pc-kda.mid { color: var(--text-80); }
.pc-wr.bad, .pc-kda.bad { color: #b91c1c; }
.pc-wr span { font-size: 9px; font-weight: 400; color: rgba(0, 0, 0, .9); margin-left: 1px; }
.pc-none {
  display: inline-flex; height: 16px; min-width: 32px; align-items: center; justify-content: center;
  border-radius: 4px; padding: 0 6px; font-size: 13px; line-height: 1;
  font-weight: 500; color: var(--text-40);
}
.pc-pos {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center;
  gap: 2px; font-size: 16px; color: var(--text-80);
}
.pc-pos.is-filled { margin-left: 16px; }
.pc-pos .pos-i { width: 1em; height: 1em; display: block; flex: none; }
.pc-pos .pos-sep { width: 1px; height: 12px; background: rgba(0, 0, 0, .25); margin: 0 2px; flex: none; }
.pc-autofill {
  border-radius: 4px; padding: 2px 4px; font-size: 11px; line-height: 11px;
  white-space: nowrap; color: #fff; background: #944646;
}

/* 打野偏好（文字简版） */
.jp {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; padding: 4px 8px;
  border: 1px solid rgba(99, 102, 241, .6); background: rgba(99, 102, 241, .08);
  border-radius: 4px;
}
.jp-body { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: center; gap: 4px; }
.jp-l1 { display: flex; min-width: 0; align-items: center; gap: 6px; font-size: 11px; color: var(--text-80); }
.jp-l1 img { width: 16px; height: 16px; border-radius: 50%; flex: none; background: #d9d9d9; }
.jp-l1 b { flex: none; font-weight: 600; color: rgba(49, 46, 129, .75); }
.jp-l1 i { flex: none; font-style: normal; color: rgba(0, 0, 0, .35); }
.jp-l1 em { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-l2 { display: flex; min-width: 0; font-size: 11px; color: rgba(0, 0, 0, .75); }
.jp-l2 em { font-style: normal; }
.jp-l2 em.top { color: #dc2626; }
.jp-l2 em.mid { color: #d97706; }
.jp-l2 em.bot { color: #2563eb; }
.jp-l2 i { font-style: normal; color: rgba(0, 0, 0, .25); margin: 0 4px; }
.jp-l2 b { font-weight: 600; margin-left: 2px; }
.jp-none { font-size: 10px; color: rgba(0, 0, 0, .35); }

/* 标签行 */
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tag-chip {
  font-size: 11px; line-height: 11px; padding: 2px 4px; border-radius: 2px;
  white-space: nowrap;
}

/* 常用英雄 */
.pc-champs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.rc { position: relative; width: 20px; height: 20px; flex: none; }
.rc img, .rc i {
  width: 100%; height: 100%; border-radius: 4px; display: block;
  object-fit: cover; background: #d9d9d9;
}
.rc .star {
  position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px;
  color: #fff838; line-height: 0;
}
.rc .star svg { width: 12px; height: 12px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5)); }

/* 最近对局（可点击 → 悬浮窗） */
.pc-list {
  flex: 1 1 0; min-height: 0; height: 0;
  display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto; overflow-x: hidden;
}
.pc-list::-webkit-scrollbar { width: 6px; }
.pc-list::-webkit-scrollbar-track { background: transparent; }
.pc-list::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .18); border-radius: 3px; }
.ml-row {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 6px; border-radius: 4px;
  cursor: pointer; transition: filter .12s;
}
.ml-row:hover { filter: brightness(1.06); }
.ml-row.win { background: rgba(96, 165, 250, .35); }
.ml-row.lose { background: rgba(243, 73, 72, .3); }
.ml-row.unknown { background: rgba(200, 200, 200, .45); }
.ml-row.win .ml-q, .ml-row.win .ml-time, .ml-row.win .ml-kda { color: var(--text-80); }
.ml-row.lose .ml-q, .ml-row.lose .ml-time, .ml-row.lose .ml-kda { color: var(--text-80); }
.ml-row.unknown .ml-q, .ml-row.unknown .ml-time, .ml-row.unknown .ml-kda { color: #000; }
.ml-idx {
  position: absolute; right: 0; bottom: 0; font-size: 10px; opacity: 0;
  transition: opacity .12s;
}
.ml-row.win .ml-idx { color: #2563eb; }
.ml-row.lose .ml-idx { color: #b91c1c; }
.ml-row.unknown .ml-idx { color: #000; }
.ml-row:hover .ml-idx { opacity: 1; }
.ml-champ {
  width: 20px; height: 20px; border-radius: 3px; margin-right: 3px; flex: none;
  background: #4b5b7d; display: block; object-fit: cover;
}
.ml-champ.is-empty { display: inline-block; }
.ml-meta { width: 92px; flex: none; margin-right: 4px; min-width: 0; }
.ml-q { display: block; font-size: 11px; line-height: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-time { display: block; font-size: 9px; line-height: 11px; }
.ml-time em { font-style: normal; margin-left: 4px; }
.ml-time em.win { color: #2563eb; }
.ml-time em.lose { color: #b91c1c; }
.ml-time em.unknown { color: #000; }
.ml-kda { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-empty {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-size: 12px; color: var(--text-60); border-radius: 4px; background: rgba(0, 0, 0, .03);
}

/* 胜负条格子（窄屏玩家行内） */
.rl-sq { width: 12px; height: 12px; border-radius: 3px; display: block; cursor: pointer; flex: none; }
.rl-sq.win { background: #7cb0f7; }
.rl-sq.lose { background: #ef7a7a; }
.rl-sq.unknown { background: #cfcfcf; }
.rl-sq:hover { filter: brightness(.9); }
.rl-none { font-size: 10px; color: var(--text-60); }

/* 脸熟徽标（Akari EncounteredGames 历史同局次数 / 收藏备注） */
.enc-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 3px;
  font-size: 11px; line-height: 16px; font-weight: 600;
  color: #9a5b00; background: #fff3e0; border: 1px solid #ffd9a0;
  white-space: nowrap;
}
.enc-badge.has-tag { color: #6a1b9a; background: #f3e5f5; border-color: #dcb8ef; }

/* ---------- 通用小卡片 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 700; }

/* BP 禁用 */
.bans-card { display: flex; gap: 20px; flex-wrap: wrap; }
.bans { display: flex; gap: 6px; padding: 10px 0; flex-wrap: wrap; align-items: center; }
.bans-label { font-size: 11px; color: var(--text-60); margin-right: 2px; }
.bans .ban {
  width: 26px; height: 26px; border-radius: 4px; overflow: hidden; position: relative;
  background: #e6e6e6; border: 1px solid var(--line); opacity: .8;
}
.bans img { width: 100%; height: 100%; object-fit: cover; }
.bans .ban::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent 45%, #ef444499 45%, #ef444499 55%, transparent 55%);
}
.ban-idx {
  position: absolute; right: 0; bottom: 0; z-index: 1;
  font-size: 9px; line-height: 10px; padding: 0 2px; border-radius: 2px;
  background: rgba(0, 0, 0, .62); color: #fff; font-weight: 600;
}

/* BP 选人（按选人顺序 + 胜率/熟练度） */
.bp-picks-card { display: flex; flex-direction: column; gap: 10px; }
.bp-lane-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
  font-size: 11px; font-weight: 700; color: var(--text-80);
}
.bp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bp-dot.o { background: #40c1ff; }
.bp-dot.c { background: #ff3333; }
.bp-lane-head .small { margin-left: auto; font-weight: 400; color: var(--text-60); }
.bp-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bp-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 4px; min-width: 0; border-radius: 6px;
  background: rgba(0, 0, 0, .025); border: 1px solid var(--line);
}
.bp-chip.is-empty { opacity: .55; }
.bp-idx {
  position: absolute; top: -5px; left: -5px; z-index: 1;
  font-size: 9px; line-height: 12px; min-width: 12px; text-align: center;
  border-radius: 999px; background: #333; color: #fff; font-weight: 700;
}
.bp-av {
  width: 100%; max-width: 44px; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .08);
}
.bp-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-av i { font-style: normal; font-size: 16px; color: var(--text-60); }
.bp-av em { font-style: normal; font-size: 10px; color: var(--text-40); }
.bp-nm {
  font-size: 10px; max-width: 100%; color: var(--text-80);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-sub { display: flex; align-items: center; gap: 3px; font-size: 9px; }
.bp-sub em { font-style: normal; font-variant-numeric: tabular-nums; }
.bp-sub em.good { color: #15803d; }
.bp-sub em.bad { color: #b91c1c; }
.bp-sub em.mst { color: #b8860b; font-weight: 700; }

/* 双方对比（队伍聚合） */
.cmp {
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.cmp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px; font-size: 11px; color: var(--text-60);
}
.cmp-title { font-size: 12px; font-weight: 700; color: var(--text-80); }
.cmp-side.o { color: #2563eb; font-weight: 600; }
.cmp-side.c { color: #b91c1c; font-weight: 600; }
.cmp-row { display: grid; grid-template-columns: 1fr 88px 1fr; align-items: center; gap: 8px; padding: 3px 0; }
.cmp-v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-v.o { color: #1d4ed8; text-align: right; }
.cmp-v.c { color: #b91c1c; }
.cmp-k { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--text-60); text-align: center; }
.cmp-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(0, 0, 0, .06); }
.cmp-bar b.o { background: #3b82f6; flex: none; }
.cmp-bar b.c { background: #ef4444; flex: 1; }
/* 对比面板三栏：本局实时（左蓝 / 右红）+ 中间对比行，填满两侧空白 */
.cmp-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr);
  gap: 14px; align-items: start;
}
.cmp:not(.has-live) .cmp-body { grid-template-columns: minmax(0, 1fr); }
.cmp:not(.has-live) .cmp-rows { width: 100%; max-width: 560px; margin: 0 auto; }
.cmp-live {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: rgba(127, 127, 127, .05);
}
.cmp-live.o { border-color: rgba(37, 99, 235, .32); background: rgba(59, 130, 246, .07); }
.cmp-live.c { border-color: rgba(185, 28, 28, .28); background: rgba(239, 68, 68, .07); }
.cmp-live.is-empty { display: none; }
.cmp-live-title { margin-bottom: 7px; font: 700 11px/1 inherit; color: var(--text-60); }
.cmp-live.o .cmp-live-title { color: #2563eb; }
.cmp-live.c .cmp-live-title { color: #b91c1c; }
.cmp-live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 5px 12px; }
.cl-item { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cl-k { font-size: 11px; color: var(--text-60); }
.cl-v { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
/* 窄屏：三栏改为单列，对比行在上、蓝/红本局数据在下 */
@media (max-width: 820px) {
  .cmp-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cmp-rows { order: 1; }
  .cmp-live.o { order: 2; }
  .cmp-live.c { order: 3; }
}

/* ---------- 实时播报（对局中事件流） ---------- */
.live-feed { padding: 12px 14px; }
.lf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lf-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-80); }
.lf-live i {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444; flex: none;
  animation: lfPulse 1.6s ease-out infinite;
}
@keyframes lfPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); }
  70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.lf-sub { margin-left: 0; }
.lf-time { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--text-80); }
/* 实时比分条：蓝方 | 指标 | 红方 中间对撞 */
.lf-score {
  display: flex; align-items: stretch; gap: 10px; margin-bottom: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: linear-gradient(90deg, #eaf2ffcc, #fff 50%, #fdececcc);
}
.ls-side {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  font-size: 12px; font-weight: 800; letter-spacing: 1px;
}
.ls-side.chaos { align-items: flex-end; }
.ls-side.order { color: #1d4ed8; }
.ls-side.chaos { color: #b91c1c; }
/* 两侧阵容：英雄名 · 召唤师名 · 当前战绩（K/D/A） */
.ls-roster { display: flex; flex-direction: column; gap: 1px; letter-spacing: 0; }
.ls-p { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; max-width: 200px; }
.ls-side.chaos .ls-p { flex-direction: row-reverse; }
.ls-pn {
  font-size: 10.5px; font-weight: 700; color: var(--text-60);
  overflow: hidden; text-overflow: ellipsis; max-width: 88px;
}
.ls-side.order .ls-pn { color: #3b6ed8; }
.ls-side.chaos .ls-pn { color: #c0392b; }
.ls-sn {
  font-size: 10px; font-weight: 400; color: var(--text-40);
  overflow: hidden; text-overflow: ellipsis; max-width: 96px;
}
.ls-kda { font-size: 10.5px; font-weight: 700; color: var(--text-80); }
.ls-side.order .ls-kda { color: #1d4ed8; }
.ls-side.chaos .ls-kda { color: #b91c1c; }
.ls-grid { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ls-row {
  display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 6px;
}
.ls-v { min-width: 28px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ls-v.order { text-align: right; color: #1d4ed8; }
.ls-v.chaos { text-align: left; color: #b91c1c; }
.ls-l { text-align: center; font-size: 10.5px; color: var(--text-40); white-space: nowrap; }

.ev-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 240px; overflow-y: auto; overflow-x: hidden;
}
.ev-row {
  display: flex; align-items: baseline; gap: 8px; flex: none;
  padding: 5px 8px; border-radius: 4px; font-size: 12.5px; line-height: 1.35;
  border-left: 2px solid transparent;
}
.ev-row:nth-child(odd) { background: rgba(0, 0, 0, .025); }
.ev-t { flex: none; min-width: 34px; font-size: 11px; color: var(--text-40); }
.ev-tag {
  flex: none; align-self: center; padding: 2px 5px; border-radius: 3px;
  font-size: 10px; line-height: 1; color: #fff;
}
.ev-tag.order { background: #40c1ff; }
.ev-tag.chaos { background: #ff5a5a; }
.ev-text { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text-80); }
.ev-text b { font-weight: 700; }
.ev-text b.order { color: #1d4ed8; }
.ev-text b.chaos { color: #b91c1c; }
.ev-row.ev-ChampionKill { border-left-color: #ef4444; }
.ev-row.ev-DragonKill, .ev-row.ev-BaronKill, .ev-row.ev-HeraldKill { border-left-color: #d4a72c; }
.ev-row.ev-TurretKilled { border-left-color: #9ca3af; }
.ev-row.ev-GameEnd { border-left-color: #22c55e; }
.ev-row.is-new { animation: evFlash 1.6s ease-out; }
@keyframes evFlash {
  from { background: rgba(59, 130, 246, .22); }
  to { background: transparent; }
}
.ev-empty { padding: 14px; text-align: center; }

/* ---------- 对局中实时条（玩家卡内：等级 / 实时 KDA / CS / 装备） ---------- */
.pc-live {
  margin: 8px 0 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(59, 130, 246, .05);
}
.pl-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-60); margin-bottom: 5px; }
.pl-lv { flex: none; font-weight: 700; color: var(--text-80); }
.pl-kda { flex: none; font-size: 13px; font-weight: 800; color: var(--text-80); }
.pl-cs, .pl-ward { flex: none; }
.pl-dead { flex: none; font-style: normal; font-weight: 700; color: #b91c1c; }

/* 结算横幅 */
.result-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .75);
}
.result-banner.win { background: linear-gradient(90deg, #eaf2ff, #fff); border-color: #9ec5fe; }
.result-banner.lose { background: linear-gradient(90deg, #fdecec, #fff); border-color: #f3b3b3; }
.result-banner .verdict { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.result-banner.win .verdict { color: #1d4ed8; }
.result-banner.lose .verdict { color: #b91c1c; }
.result-banner .sub { color: var(--text-60); font-size: 12px; }

/* ---------- 侧栏 ---------- */
.sidebar {
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; position: sticky; top: 66px;
}
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-head h3 { margin: 0; font-size: 14px; }
.ghost {
  background: #fff; border: 1px solid var(--line); color: var(--text-60);
  border-radius: 6px; padding: 2px 8px; cursor: pointer;
}
.ghost:hover { color: var(--text); }
.archive-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; overflow-x: hidden; }
/* 好友在线面板 */
.fr-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.fr-search {
  flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 9px; font-size: 12.5px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.fr-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, .15); }
.fr-offline-btn {
  flex: none; height: 30px; padding: 0 10px; font-size: 12px; cursor: pointer;
  border-radius: 6px; border: 1px dashed var(--line); background: transparent; color: var(--text-60);
}
.fr-offline-btn:hover { color: var(--text); border-color: var(--blue); }
.fr-offline-btn b { font-weight: 600; color: var(--text); }
.friends-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; overflow-x: hidden; }
.fr-g {
  display: flex; align-items: center; gap: 6px; padding: 6px 2px 2px;
  font-size: 11.5px; font-weight: 600; color: var(--text-60);
}
.fr-g em { font-style: normal; font-weight: 400; color: var(--text-40); }
.fr-g::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }
.fr-head { padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.fr-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border-radius: 6px; background: var(--panel); border: 1px solid var(--line);
  transition: background .15s;
}
.fr-row:hover { background: rgba(59, 130, 246, .06); }
.fr-row[role="button"] { cursor: pointer; }
.fr-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #9ca3af; box-shadow: 0 0 0 2px rgba(156, 163, 175, .2);
}
.fr-row.online .fr-dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25); }
.fr-row.ingame .fr-dot { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, .25); animation: pulse-dot 1.6s infinite; }
.fr-row.queue .fr-dot { background: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, .25); }
.fr-row.away .fr-dot { background: #eab308; box-shadow: 0 0 0 2px rgba(234, 179, 8, .2); }
.fr-row.offline { opacity: .55; }
.fr-row.offline .fr-dot { background: #9ca3af; }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(245, 158, 11, .25); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .08); }
}
.fr-av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  overflow: hidden; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.fr-av img { width: 100%; height: 100%; object-fit: cover; }
.fr-ini {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff;
  font-size: 13px; font-weight: 600; font-style: normal;
}
.fr-info { flex: 1 1 auto; min-width: 0; }
.fr-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fr-name .fr-tag { color: var(--text-40); font-weight: 400; margin-left: 2px; font-size: 12px; font-style: normal; }
.fr-sub { display: flex; gap: 6px; align-items: center; margin-top: 2px; font-size: 11.5px; color: var(--text-60); flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.fr-st { padding: 0 6px; border-radius: 3px; background: rgba(156, 163, 175, .18); white-space: nowrap; flex: none; }
.fr-row.online .fr-st { background: rgba(34, 197, 94, .16); color: #15803d; }
.fr-row.ingame .fr-st { background: rgba(245, 158, 11, .18); color: #b45309; font-weight: 600; }
.fr-row.offline .fr-st { background: rgba(156, 163, 175, .14); color: var(--text-40); }
.fr-row.queue .fr-st { background: rgba(56, 189, 248, .16); color: #0369a1; }
.fr-row.away .fr-st { background: rgba(234, 179, 8, .16); color: #a16207; }
.fr-row.pick .fr-st { background: rgba(139, 92, 246, .16); color: #6d28d9; font-weight: 600; }
.fr-row.pick .fr-dot { background: #8b5cf6; box-shadow: 0 0 0 2px rgba(139, 92, 246, .22); }
.fr-q { padding: 0 5px; border-radius: 3px; background: rgba(59, 130, 246, .12); color: #1d4ed8; font-size: 11px; white-space: nowrap; flex: none; }
.fr-c { color: var(--text-60); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* 宽屏侧栏好友列表也占满剩余空间 */
@media (min-width: 861px) {
  .sidebar .friends-list { flex: 1 1 auto; min-height: 0; max-height: none; }
}
html[data-mode="dark"] .fr-row { background: rgba(255, 255, 255, .04); }
html[data-mode="dark"] .fr-row:hover { background: rgba(255, 255, 255, .07); }
html[data-mode="dark"] .fr-row.online .fr-st { color: #4ade80; }
html[data-mode="dark"] .fr-row.ingame .fr-st { color: #fbbf24; }
html[data-mode="dark"] .fr-row.queue .fr-st { color: #38bdf8; }
html[data-mode="dark"] .fr-row.away .fr-st { color: #facc15; }
html[data-mode="dark"] .fr-row.pick .fr-st { color: #a78bfa; }
html[data-mode="dark"] .fr-q { color: #60a5fa; }
html[data-mode="dark"] .fr-ini { background: linear-gradient(135deg, #2563eb, #7c3aed); }
/* hidden 属性会被 display:flex 等作者样式覆盖，全局兜底 */
[hidden] { display: none !important; }
/* 侧栏 tab：战绩（本人 50 条）/ 回放（归档会话） */
.side-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.stab {
  flex: 1; padding: 5px 0; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text-60); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
}
.stab:hover { color: var(--text); }
.stab.is-active { background: var(--panel); border-color: var(--blue); color: var(--text); }
.side-self { max-height: 70vh; overflow-y: auto; overflow-x: hidden; }
/* 宽屏：侧栏固定在顶栏下方，高度不超过视口，列表在内部滚动
   （队伍卡片很长时，「最近对局」也不会被滚出屏幕） */
@media (min-width: 861px) {
  .sidebar {
    display: flex; flex-direction: column; overflow: hidden;
    max-height: calc(100vh - 82px);
  }
  .sidebar .side-self,
  .sidebar .archive-list { flex: 1 1 auto; min-height: 0; max-height: none; }
}
/* 侧栏窄容器放开战绩列表卡片限高，行内隐藏装备列保持紧凑 */
.side-self .pc-list { flex: none; height: auto; }
.side-self .ml-kda { flex: none; }
.arc-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer;
  background: rgba(0, 0, 0, .02); transition: border-color .15s;
}
.arc-item:hover { border-color: #9ec5fe; }
.arc-item.active { border-color: var(--blue); }
.arc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.arc-head .w { font-weight: 700; }
.arc-head .w.win { color: #1d4ed8; }
.arc-head .w.lose { color: #b91c1c; }
.arc-head .w.unknown { color: var(--text-60); }
.arc-teams { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; }
.arc-team { display: flex; gap: 3px; }
.arc-team img, .arc-team i { width: 20px; height: 20px; border-radius: 3px; background: #d9d9d9; display: inline-block; }
.arc-extra { margin-top: 5px; }

/* ==================== 悬浮窗（对局详情） ==================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.modal-panel {
  position: relative; display: flex; flex-direction: column;
  width: 840px; max-width: calc(100vw - 24px); max-height: 88vh;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .02);
}
.modal-tabs { display: flex; gap: 4px; }
.mtab {
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-size: 13px; padding: 4px 12px; border-radius: 6px; color: var(--text-60);
}
.mtab:hover { color: var(--text); }
.mtab.is-active { background: #fff; border-color: var(--line); color: var(--text); font-weight: 600; }
.modal-title { flex: 1; min-width: 0; font-size: 12px; color: var(--text-60); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-close {
  border: 1px solid var(--line); background: #fff; color: var(--text-60);
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; overflow-y: auto; overflow-x: hidden; background: #fff; }
.modal-loading { padding: 40px; text-align: center; color: var(--text-60); font-size: 13px; }
/* 离线概要提示：完整详情缺失、用战绩行拼兜底时的说明 */
.modal-note {
  margin: 0 0 14px; padding: 9px 12px; border-radius: 6px; font-size: 12px; line-height: 1.6;
  color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.modal-note > span { flex: 1 1 240px; }
/* 兜底详情里的「重新加载」：明显可点，避免用户误以为只能干等 */
.modal-note .note-btn {
  flex: none; margin-left: auto; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #fff; border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 6px rgba(217, 119, 6, .35);
}
.modal-note .note-btn:hover { filter: brightness(1.06); }
.modal-note .note-btn:disabled { opacity: .7; cursor: default; filter: none; }
/* 重新加载的进度反馈：进度条 + 阶段文案（真实耗时不可控，按轮询次数估算） */
.modal-note .note-prog { flex: 1 1 100%; display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.modal-note .note-bar { height: 4px; border-radius: 999px; overflow: hidden; background: rgba(217, 119, 6, .18); }
.modal-note .note-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #d97706); transition: width .35s ease; }
.modal-note .note-prog-txt { font-size: 11px; color: #a16207; }
html[data-mode="dark"] .modal-note { color: #fbbf24; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
html[data-mode="dark"] .modal-note .note-btn { background: linear-gradient(135deg, #fbbf24, #d97706); color: #1f1300; }
html[data-mode="dark"] .modal-note .note-bar { background: rgba(245, 158, 11, .22); }
html[data-mode="dark"] .modal-note .note-prog-txt { color: #fcd34d; }

/* ==================== 个人主页悬浮窗（复用 modal 面板，宽版双栏，借鉴 Akari 玩家页） ==================== */
#profile .modal-panel { width: 900px; max-width: calc(100vw - 32px); }
/* 从对局详情里点玩家名打开时，主页要盖在详情弹窗之上 */
#profile { z-index: 120; }
.tt-prof { cursor: pointer; }
.tt-prof:hover { color: var(--blue); text-decoration: underline; }
/* 个人主页空态：手动触发采集（点击后通知采集端去 LCU 拉战绩） */
.pr-fetch { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pr-fetch-btn {
  padding: 8px 20px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #fff; border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 6px rgba(217, 119, 6, .35);
}
.pr-fetch-btn:hover { filter: brightness(1.06); }
.pr-fetch-btn:disabled { opacity: .7; cursor: default; filter: none; }
.pr-fetch-prog { width: min(260px, 80%); display: flex; flex-direction: column; gap: 5px; }
.pr-bar { height: 4px; border-radius: 999px; overflow: hidden; background: rgba(217, 119, 6, .18); }
.pr-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #d97706); transition: width .35s ease; }
.pr-fetch-txt { font-size: 11px; color: #a16207; text-align: center; }
html[data-mode="dark"] .pr-fetch-btn { background: linear-gradient(135deg, #fbbf24, #d97706); color: #1f1300; }
html[data-mode="dark"] .pr-bar { background: rgba(245, 158, 11, .22); }
html[data-mode="dark"] .pr-fetch-txt { color: #fcd34d; }
#visitors .modal-panel { width: 560px; }
.pc-head { cursor: pointer; }
/* 头部：头像 + 名字/标签 | 双段位卡 */
.pr-hero {
  display: flex; align-items: flex-start; gap: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.pr-hero-id { display: flex; align-items: center; gap: 14px; flex: 1 1 0; min-width: 0; }
.pr-av { position: relative; flex: none; }
.pr-av img, .pr-av i {
  width: 64px; height: 64px; border-radius: 50%; display: block; object-fit: cover;
  background: #d9d9d9; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line);
}
.pr-lvl {
  position: absolute; right: 0; bottom: 0; transform: translateX(30%);
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 5px;
}
.pr-av .mastery-badge { transform: translateX(-30%); min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-name {
  display: flex; align-items: baseline; gap: 6px; min-width: 0;
  font-size: 18px; font-weight: 800; color: var(--text);
}
.pr-name em { font-style: normal; font-size: 12px; font-weight: 400; color: #6b7280; }
.pr-subrank { font-size: 11px; color: #9ca3af; }
.pr-main .pc-tags { margin-bottom: 0; }
/* 名字行尾部：位置图标 / 补位 */
.pr-name .pos-i { align-self: center; flex: none; }
.pr-autofill {
  align-self: center; flex: none; font-style: normal;
  font-size: 10px; line-height: 14px; padding: 0 4px; border-radius: 2px;
  background: #f59e0b; color: #fff; font-weight: 700;
}

/* 段位卡：徽章 + 队列 + 段位/LP + 本季战绩 */
.pr-rankcards { flex: 0 0 auto; width: 400px; display: flex; gap: 10px; }
.pr-rcard {
  flex: 1 1 0; min-width: 0; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.pr-rcard.is-none { opacity: .68; }
.pr-rcard-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pr-rcard-badge { flex: none; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.pr-rcard-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pr-rcard-badge i {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 14px; font-weight: 800; color: var(--text-40);
  background: rgba(0, 0, 0, .06); box-shadow: inset 0 0 0 1px var(--line);
}
.pr-rcard-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 0; }
.pr-rcard-q { font-size: 10.5px; color: var(--text-60); letter-spacing: .3px; }
.pr-rcard-tier {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  font-size: 15px; font-weight: 800; color: var(--text-80);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-rcard-prov {
  flex: none; font-style: normal; font-size: 10px; font-weight: 600;
  color: #a16207; background: rgba(245, 158, 11, .16); padding: 0 4px; border-radius: 3px;
}
.pr-rcard-lp {
  flex: none; align-self: flex-start; margin-left: auto;
  font-size: 10.5px; font-weight: 700; color: #1d4ed8;
  background: rgba(59, 130, 246, .12); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.pr-rcard-sub {
  display: flex; align-items: center; gap: 6px;
  margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--text-60);
}
.pr-rcard-sub b { margin-left: auto; font-size: 12px; color: var(--text-80); font-variant-numeric: tabular-nums; }
.pr-rcard-sub .mini-series { margin-left: 0; }

/* 双栏：左 rail（近期表现 / 常用英雄 / 英雄池 / 连胜） + 右侧宽版战绩表 */
.pr-layout {
  display: grid; grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px; margin-top: 14px; align-items: start;
}
.pr-rail > * + * { margin-top: 12px; }
.pr-rail .jp { margin-top: 0; }
.pr-maincol > * + * { margin-top: 12px; }
.pr-rail > :empty, .pr-maincol > :empty { display: none; }
.pr-box { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); }
.pr-box-head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; color: var(--text-60); letter-spacing: .5px;
}
.pr-box-hint { font-size: 11px; font-weight: 400; color: #9ca3af; letter-spacing: 0; }
.pr-matches-box { padding-bottom: 10px; }
.pr-box .pc-champs, .pr-box .pc-tags { margin-bottom: 0; }

/* 近期表现：大号胜率 + 比例条 */
.pr-wl { margin-bottom: 8px; }
.pr-wl-top { display: flex; align-items: baseline; gap: 8px; }
.pr-wl-rate { font-size: 26px; font-weight: 800; line-height: 1.05; color: var(--text-80); font-variant-numeric: tabular-nums; }
.pr-wl-rate em { font-style: normal; font-size: 13px; font-weight: 700; margin-left: 1px; opacity: .7; }
.pr-wl.good .pr-wl-rate { color: #15803d; }
.pr-wl.bad .pr-wl-rate { color: #b91c1c; }
.pr-wl-rec { margin-left: auto; font-size: 11.5px; color: var(--text-60); font-variant-numeric: tabular-nums; }
.pr-wl-rec i { font-style: normal; color: var(--text-40); margin: 0 2px; }
.pr-wlbar {
  height: 6px; margin-top: 6px; border-radius: 3px; overflow: hidden;
  background: #ef4444; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.pr-wlbar .w { display: block; height: 100%; background: #22c55e; }

/* 总览指标行 */
.pr-ov-rows { display: flex; flex-direction: column; }
.pr-ov-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 4px 0; border-bottom: 1px dashed rgba(0, 0, 0, .07);
  font-size: 11.5px; color: var(--text-60);
}
.pr-ov-row:last-child { border-bottom: none; }
.pr-ov-row b { flex: none; font-size: 12.5px; font-weight: 700; color: var(--text-80); font-variant-numeric: tabular-nums; }
/* 生涯趋势图（近 20 局） */
.pr-trend { margin-top: 0; }
.pr-trend-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-60); margin-bottom: 4px;
}
.pr-trend-head em { font-style: normal; font-weight: 700; color: var(--text-80); font-variant-numeric: tabular-nums; }
.pr-trend svg { width: 100%; height: 76px; display: block; }
/* 个人主页战绩表行：胜负 / 英雄 / 队列时间 / KDA / 补刀 / 装备（借鉴 Akari 宽版战绩表） */
.pr-mlist { gap: 2px; }
.pr-mrow {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: 30px 22px minmax(0, 1fr) 84px 58px 64px;
  height: auto; min-height: 38px; padding: 5px 8px; border-radius: 6px;
}
.pr-mrow .ml-champ { width: 22px; height: 22px; border-radius: 4px; margin: 0; }
.pr-mres { font-size: 11px; font-weight: 800; text-align: center; line-height: 1; }
.pr-mres.win { color: #2563eb; }
.pr-mres.lose { color: #b91c1c; }
.pr-mres.unknown { color: var(--text-60); }
.pr-mmain { display: flex; flex-direction: column; min-width: 0; }
.pr-mmain b { font-size: 12px; font-weight: 600; color: var(--text-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-mmain em { font-style: normal; font-size: 10.5px; color: var(--text-60); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-mkda { display: flex; flex-direction: column; min-width: 0; white-space: normal; }
.pr-mkda b { font-size: 12px; font-weight: 700; color: var(--text-80); }
.pr-mkda em { font-style: normal; font-size: 10px; color: var(--text-60); }
.pr-mcs { font-size: 12px; color: var(--text-80); font-variant-numeric: tabular-nums; text-align: right; }
.pr-mcs em { font-style: normal; font-size: 10px; color: var(--text-60); }
.pr-mitems { display: flex; gap: 2px; justify-content: flex-end; }
.pr-mitems img, .pr-mitems i { width: 17px; height: 17px; border-radius: 3px; display: block; object-fit: cover; background: #e5e7eb; box-shadow: 0 0 0 1px var(--line); }
/* 最近对局行装备图标（仅个人主页启用） */
.ml-items { display: flex; gap: 2px; flex: none; }
.ml-items img, .ml-items i {
  width: 16px; height: 16px; border-radius: 3px; display: block; object-fit: cover;
  background: #e5e7eb; box-shadow: 0 0 0 1px var(--line);
}
.ml-dur { font-style: normal; color: #9ca3af; }
/* 展开全部战绩按钮（个人主页） */
.pr-more-slot { margin-top: 6px; }
.pr-more {
  width: 100%; padding: 8px 0; border: 1px dashed var(--line); border-radius: 6px;
  background: transparent; color: var(--text-60); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.pr-more:hover { background: var(--panel); color: var(--text-80); }
/* 主页内复用卡片组件的间距微调 */
#profileBody .pc-tags { margin-bottom: 0; }
/* 主页内战绩列表放开卡片限高，展开 50 条后由 modal-body 整体滚动
   必须 overflow:visible，否则空的滚动容器 + overscroll-behavior:contain 会吃掉滚轮事件 */
#profileBody .pc-list { flex: none; height: auto; overflow: visible; overscroll-behavior: auto; }
#profileBody .ml-row:first-child { border-top: none; }

/* 个人主页窄屏：单栏堆叠 */
@media (max-width: 860px) {
  .pr-hero { flex-direction: column; gap: 12px; }
  .pr-rankcards { width: 100%; }
  .pr-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pr-av img, .pr-av i { width: 52px; height: 52px; }
  .pr-name { font-size: 16px; flex-wrap: wrap; }
  .pr-rankcards { flex-direction: column; }
  .pr-mrow { grid-template-columns: 26px 22px minmax(0, 1fr) 72px auto; }
  .pr-mcs { display: none; }
}

/* 总览占比条：对英雄伤害 / 经济（蓝红分段） */
.ov-share {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.os-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.os-row label { flex: none; width: 72px; font-size: 12px; color: var(--text-60); }
.os-bar { display: flex; flex: 1; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; min-width: 0; }
.os-bar i { min-width: 4px; display: block; }
.ov-info {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 4px 8px; margin-bottom: 8px; border-radius: 4px;
  background: rgba(0, 0, 0, .05); font-size: 12px; color: var(--text-80);
}
.ov-info span b { font-weight: 600; }

/* 总览：队伍表（Akari TeamTable 浅色版） */
.tt { border: 1px solid rgba(0, 0, 0, .1); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.tt.win { border-color: rgba(37, 99, 235, .1); }
.tt.loss { border-color: rgba(185, 28, 28, .1); }
.tt-head {
  display: flex; align-items: center; gap: 16px;
  height: 32px; padding: 0 8px; font-size: 12px;
  background: rgba(0, 0, 0, .1);
}
.tt.win .tt-head { background: rgba(37, 99, 235, .1); }
.tt.loss .tt-head { background: rgba(185, 28, 28, .1); }
.tt-head .tt-result { font-size: 12px; font-weight: 700; color: var(--text-80); }
.tt.win .tt-head .tt-result { color: #1d4ed8; }
.tt.loss .tt-head .tt-result { color: #b91c1c; }
.tt-head .tt-team { font-size: 12px; }
.tt-head .tt-kda, .tt-head .tt-gold { font-size: 12px; color: var(--text-80); font-variant-numeric: tabular-nums; }
.tt-objs { display: flex; gap: 8px; font-size: 11px; color: var(--text-60); }
.tt-objs span { white-space: nowrap; }
.tt-bans { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tt-bans > label { font-size: 12px; color: var(--text-60); margin-right: 4px; }
.tt-bans img, .tt-bans i { width: 16px; height: 16px; border-radius: 2px; background: #e6e6e6; display: inline-block; object-fit: cover; }
.tt-bans em { font-style: normal; font-size: 12px; color: var(--text-60); }
.tt-row {
  display: flex; align-items: center; height: 48px; padding: 4px 8px;
  border-top: 1px solid rgba(0, 0, 0, .05);
}
.tt-row.is-self { background: rgba(0, 0, 0, .05); }
.tt-left { display: flex; align-items: center; gap: 4px; flex: 1 1 0; min-width: 0; }
.tt-av { position: relative; width: 32px; height: 32px; flex: none; }
.tt-av img, .tt-av i { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; background: #d9d9d9; }
.tt-lvl {
  position: absolute; right: 0; bottom: -4px; border-radius: 999px;
  background: rgba(0, 0, 0, .7); color: rgba(255, 255, 255, .8);
  font-size: 10px; line-height: 1; padding: 2px;
}
.tt-spells { display: flex; flex-direction: column; gap: 2px; }
.tt-spells img, .tt-spells i { width: 16px; height: 16px; border-radius: 3px; display: block; background: #e6e6e6; object-fit: cover; }
.tt-who { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.tt-who .n { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-who .p { font-size: 11px; color: var(--text-60); }
.tt-row.is-self .tt-who .n { font-weight: 700; }
.col-kda { min-width: 104px; text-align: center; }
.col-kda .v { font-size: 12px; font-variant-numeric: tabular-nums; }
.col-kda .s { font-size: 11px; color: var(--text-60); }
.col-dmg { min-width: 130px; text-align: center; }
.col-dmg .v { font-size: 12px; font-variant-numeric: tabular-nums; }
.col-dmg .s { font-size: 11px; color: var(--text-60); }
.col-cs { width: 72px; text-align: center; }
.col-cs .v { font-size: 12px; }
.col-cs .s { font-size: 11px; color: var(--text-60); }
.col-gold { min-width: 72px; text-align: center; }
.col-gold .v { font-size: 12px; font-variant-numeric: tabular-nums; }
.col-gold .s { font-size: 11px; color: var(--text-60); }
.col-items { min-width: 160px; display: flex; gap: 2px; justify-content: center; }
.col-items img, .col-items i { width: 20px; height: 20px; border-radius: 3px; display: block; background: #e6e6e6; object-fit: cover; }

/* 详情：统计表 */
.det-wrap { max-height: 568px; overflow: auto; border: 1px solid rgba(0, 0, 0, .05); border-radius: 4px; }
table.det { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.det th, table.det td { padding: 8px; text-align: center; }
table.det thead th { position: sticky; top: 0; z-index: 3; background: #e5e5e5; }
table.det .det-name {
  position: sticky; left: 0; z-index: 2;
  width: 120px; max-width: 120px; min-width: 120px;
  background: #e5e5e5; text-align: center; font-weight: 700; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.det thead th.det-name { z-index: 4; }
table.det .det-champ {
  display: block; width: 24px; height: 24px; margin: 0 auto; border-radius: 4px;
  border: 2px solid transparent; object-fit: cover; background: #d9d9d9;
}
table.det .det-cell {
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.det tr.det-gap td { height: 16px; padding: 0; }
table.det tbody tr:hover td { background: rgba(0, 0, 0, .028); }
table.det tbody tr:hover td.det-name { background: #dcdcdc; }

/* ==================== 底部抽屉（窄屏展开玩家完整卡片） ==================== */
.sheet { position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .22s ease-out; }
.sheet.is-open .sheet-mask { opacity: 1; }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 84vh;
  display: flex; flex-direction: column;
  background: var(--panel); border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 34px rgba(0, 0, 0, .24);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22, .61, .36, 1);
}
.sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet-head {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--line);
}
.sheet-head::before {
  content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .16);
}
.sheet-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-close {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--text-60);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; line-height: 1;
  touch-action: manipulation;
}
.sheet-close:hover { color: var(--text); }
.sheet-body { padding: 12px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
/* 抽屉内的完整卡片：铺满宽度、按内容自适应高度 */
.sheet-body .p-card { width: 100%; height: auto; overflow: visible; }
.sheet-body .pc-list { flex: none; height: auto; max-height: 46vh; }
.sheet-body .ml-row { height: 28px; }
.sheet-body .ml-champ { width: 22px; height: 22px; }
.sheet-body .ml-q { font-size: 12px; }
.sheet-body .ml-time { font-size: 10px; }
.sheet-body .ml-kda { font-size: 12px; }

/* ==================== 移动端适配 ==================== */
.arc-item, .ghost, .ml-row, .mtab { -webkit-tap-highlight-color: transparent; }
.ghost, .mtab, .modal-close { touch-action: manipulation; }
.pc-list, .archive-list, .det-wrap, .ev-list, .modal-body {
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
/* 弹窗内的嵌套滚动区（详情统计表 / 事件播报）：滚到边界后把滚轮交给外层 modal-body，
   否则 overscroll-behavior:contain 会把滚轮吃掉，表现为「鼠标只有放在空白处才能滚动」 */
.det-wrap, .ev-list { overscroll-behavior: auto; }
.sheet-body { overscroll-behavior: contain; }

/* 平板 / 窄窗口（≤ 860px）：侧栏改为普通流 */
@media (max-width: 860px) {
  .layout { padding: 12px; gap: 14px; }
  .sidebar { position: static; top: auto; }
  .archive-list { max-height: 60vh; }
  .result-banner { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .result-banner .verdict { font-size: 18px; }
  .bans-card { flex-direction: column; gap: 8px; }
  .modal-body { padding: 16px; }
  .tt-head { gap: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .tt-objs { flex-wrap: wrap; row-gap: 2px; }
  .col-cs { display: none; }
}

/* 手机（≤ 560px）：卡片铺满宽度、放宽信息密度 */
@media (max-width: 560px) {
  body { font-size: 13px; }
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
  .brand { flex: none; }
  .title { font-size: 14px; }
  /* 状态信息保持单行，超出部分横向滚动，不换行挤压页面 */
  .status {
    flex: 1 1 auto; min-width: 0;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .status::-webkit-scrollbar { display: none; }
  .status > * { flex: none; }
  .badge, .chip, .conn { font-size: 11px; padding: 2px 8px; }
  #updatedAt { display: none; }

  .layout { padding: 10px; gap: 12px; }
  /* 触控目标放大，避免窄屏误触 */
  .side-tabs { gap: 8px; }
  .stab { padding: 9px 0; }
  .ghost { min-width: 36px; min-height: 36px; }
  /* 侧栏队列筛选：小圆角按钮加大触控高度 */
  .side-filter { gap: 6px; }
  .sf { padding: 7px 10px; font-size: 12px; }
  /* 侧栏内战绩行加大点按高度（抽屉内保持 28px，保证 10 条完整可见） */
  .side-self .ml-row { height: 30px; }
  .side-self .ml-champ { width: 22px; height: 22px; }
  /* 主题菜单在窄屏加大触控高度，内部可滚动 */
  .theme-menu { max-height: 62vh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .theme-menu button { padding: 10px 9px; font-size: 13px; }
  .tm-group { padding-top: 9px; }
  /* 详情表不把列挤扁：保持最小列宽，在容器内横向滚动（首列吸附） */
  table.det { min-width: 680px; }
  /* 紧凑总览列表：每队 5 行，一屏看清全部 10 人；点某行从底部展开完整卡片 */
  .mob-list { display: flex; flex-direction: column; gap: 4px; }
  /* 底部抽屉贴合 iPhone 底部安全区 */
  .sheet-panel { padding-bottom: env(safe-area-inset-bottom); }
  .site-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  /* 悬浮小游戏：入口贴右下安全区，面板改为底部抽屉（标题栏吸顶，内部滚动） */
  .fun-fab {
    right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 6px; padding: 11px 15px; font-size: 13px;
  }
  .fun-bar {
    left: 0; right: 0; bottom: 0; width: auto;
    max-height: 78vh; border-radius: 16px 16px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    padding: 0 12px calc(14px + env(safe-area-inset-bottom));
    padding-top: 0;
  }
  .fun-head {
    position: sticky; top: 0; z-index: 2;
    background: var(--panel); border-radius: 16px 16px 0 0;
    padding: 12px 0 8px; margin-bottom: 4px;
  }
  .fun-tabs { gap: 6px; }
  .fun-tab { padding: 7px 12px; font-size: 12px; }
  .fun-close { padding: 8px 10px; font-size: 13px; }
  .fun-idle { margin-top: 14px; }
  .fun-idle-toggle { padding: 12px; }
  .fun-idle-panel { padding: 10px 10px 12px; }
  .mob-row {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 5px 8px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--card-border); background: var(--card-bg);
    -webkit-tap-highlight-color: transparent;
  }
  .mob-row:active { filter: brightness(.96); }
  .mob-row.is-self { box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .28); }
  .mob-row.dead { filter: grayscale(.5); opacity: .72; }
  .mob-row.is-locked { cursor: default; }
  .mob-row.is-locked .mr-name { font-weight: 400; font-size: 12px; color: var(--text-60); }
  .mr-av { position: relative; width: 34px; height: 34px; flex: none; }
  .mr-av img, .mr-av i {
    width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover;
    background: #d9d9d9; box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
  }
  .mr-lvl {
    position: absolute; right: 0; bottom: -2px; transform: translateX(20%);
    background: rgba(0, 0, 0, .55); color: #fff; font-style: normal;
    font-size: 9px; line-height: 12px; padding: 0 3px; border-radius: 3px;
  }
  /* 窄屏：熟练度徽章 / 晋级赛徽章缩小适配 */
  .mastery-badge { transform: translateX(-15%); min-width: 12px; height: 12px; font-size: 8px; line-height: 12px; padding: 0 2px; }
  .mini-series { font-size: 8px; line-height: 12px; padding: 0 2px; margin-left: 3px; }
  .mr-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .mr-l1 { display: flex; align-items: center; gap: 4px; min-width: 0; }
  .mr-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .mr-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
  .mr-name {
    font-size: 12.5px; font-weight: 700; color: var(--text-80);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mr-priv {
    flex: none; font-style: normal; font-size: 9px; line-height: 12px;
    padding: 1px 4px; border-radius: 2px; color: #fff; white-space: nowrap;
  }
  .mr-tag { font-style: normal; font-weight: 400; font-size: 11px; color: #6b7280; }
  .mr-rank { display: inline-flex; align-items: center; gap: 3px; min-width: 0; flex: none; }
  .mr-rank img { width: 13px; height: 13px; flex: none; }
  .mr-rank b {
    font-size: 10.5px; font-weight: 400; color: var(--text-60);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 74px;
  }
  .mr-rank.is-none b { color: var(--text-40); }
  .mr-pos { display: inline-flex; align-items: center; gap: 1px; flex: none; color: var(--text-60); }
  .mr-pos .pos-i { display: block; flex: none; }
  .mr-pos .pos-i svg { width: 12px; height: 12px; display: block; }
  .mr-pos .pos-sep { width: 1px; height: 10px; background: rgba(0, 0, 0, .25); margin: 0 1px; flex: none; }
  .mr-pos .pc-autofill { padding: 1px 3px; font-size: 9px; line-height: 9px; }
  .mr-kda { font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-80); }
  .mr-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .mr-wr { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .mr-wr em { font-style: normal; font-weight: 400; font-size: 9px; margin-left: 1px; color: rgba(0, 0, 0, .55); }
  .mr-wr.good, .mr-kda.good { color: #15803d; }
  .mr-wr.mid, .mr-kda.mid { color: var(--text-80); }
  .mr-wr.bad, .mr-kda.bad { color: #b91c1c; }
  .mr-wr.is-none, .mr-kda.is-none { color: var(--text-40); }
  .mr-strip { display: flex; align-items: center; gap: 2px; }
  .mr-strip .rl-sq { width: 10px; height: 10px; border-radius: 2px; }
  .team-head { flex-wrap: wrap; row-gap: 4px; }
  .team-name { font-size: 15px; }
  .tt-wr, .tt-kda { font-size: 13px; }
  .card { padding: 12px; margin-bottom: 12px; }
  .live-feed { padding: 10px 12px; }
  .lf-sub { display: none; }
  .lf-score { padding: 6px 8px; gap: 6px; }
  .ls-side { font-size: 11px; letter-spacing: 0; }
  .ls-roster { display: none; }
  .ls-row { grid-template-columns: 1fr 36px 1fr; }
  .ls-v { font-size: 12px; }
  .ls-l { font-size: 10px; }
  .cmp-live { padding: 6px 9px; }
  /* 实时条（卡片内 + 抽屉）收紧 */
  .pc-live { margin-top: 6px; padding: 5px 6px; }
  .pl-line { gap: 6px; font-size: 11px; margin-bottom: 0; }
  .pl-kda { font-size: 12px; }
  .mr-kda.live { color: var(--text-80); font-weight: 800; }
  .ev-list { max-height: 200px; }
  .ev-row { gap: 6px; padding: 5px 6px; font-size: 12px; }
  .ev-t { min-width: 30px; }
  .empty { padding: 28px 14px; }
  .empty h2 { font-size: 17px; }
  .lb-list { grid-template-columns: 1fr; gap: 6px; }
  .lb-row { padding: 8px; gap: 8px; }
  .lb-av { width: 32px; height: 32px; }
  .lb-name { font-size: 12.5px; }
  .arc-team img, .arc-team i { width: 18px; height: 18px; }
  .fun-opts { grid-template-columns: 1fr; }
  .fun-draw-row { flex-direction: column; gap: 2px; }
  .fun-draw-name { max-width: 100%; }
  .mem-grid { grid-template-columns: repeat(4, 46px); gap: 5px; }
  .mem-card { width: 46px; height: 58px; }
  .lk-grid { grid-template-columns: repeat(6, 38px); gap: 5px; }
  .lk-cell { width: 38px; height: 38px; }
  .pz-board { width: 210px; height: 210px; }
  .g-grid { grid-template-columns: repeat(4, 48px); gap: 5px; }
  .g-cell { width: 48px; height: 48px; }
  .g-cell b { font-size: 13px; }
  .mine-grid { grid-template-columns: repeat(9, 30px); gap: 3px; }
  .mine-cell { width: 30px; height: 30px; font-size: 11px; }
  .dpad { grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(3, 36px); }

  .modal-panel { max-height: 92vh; width: 100%; max-width: calc(100vw - 16px); border-radius: 10px; }
  .modal-head { padding: 8px 10px; gap: 8px; }
  .modal-close { width: 36px; height: 36px; font-size: 16px; }
  .mtab { padding: 6px 12px; }
  .modal-body { padding: 12px; }
  .v-tab { height: 36px; }
  .tt-row { flex-wrap: wrap; height: auto; padding: 6px 8px; row-gap: 4px; }
  .tt-left { flex: 1 1 100%; }
  .col-kda, .col-dmg, .col-gold, .col-items { min-width: 0; flex: 1 1 auto; }
  .det-wrap { max-height: 62vh; }
  table.det th, table.det td { padding: 6px 4px; }
  table.det .det-name { width: 88px; min-width: 88px; max-width: 88px; font-size: 11px; }
}

/* ---------- 页脚：版权 / 作者其他作品 ---------- */
.site-footer {
  max-width: 1700px; margin: 0 auto;
  padding: 16px 16px 24px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 8px; text-align: center;
  color: var(--text-60); font-size: 12px; line-height: 1.6;
}
.site-footer .copy { color: var(--text-80); font-weight: 600; letter-spacing: .02em; }
.site-footer .works { color: var(--text-60); }
.site-footer .sep { color: var(--text-40); }
.site-footer .desc { color: var(--text-40); }
.site-footer a { color: var(--blue); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- 赛后复盘（团队数据对比 + MVP） ---------- */
.review .rv-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.review .rv-title { font-size: 14px; font-weight: 700; }
.review .rv-sub { color: var(--text-60); font-size: 11px; }
.rv-mvps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rv-mvp {
  flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: rgba(0, 0, 0, .02);
}
.rv-mvp.order { border-color: rgba(64, 193, 255, .45); background: rgba(64, 193, 255, .09); }
.rv-mvp.chaos { border-color: rgba(255, 51, 51, .38); background: rgba(255, 51, 51, .07); }
.rv-mvp-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--text-60); }
.rv-mvp-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--text-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-mvp-kda { flex: none; font-size: 12px; color: var(--text-80); }
.rv-rows { display: flex; flex-direction: column; gap: 6px; }
.rv-row { display: flex; align-items: center; gap: 8px; }
.rv-v { flex: none; width: 46px; text-align: center; font-size: 12px; font-weight: 700; }
.rv-v.order { color: #2563eb; }
.rv-v.chaos { color: #b91c1c; }
.rv-track {
  position: relative; flex: 1; height: 18px; display: flex; overflow: hidden;
  border-radius: 3px; background: rgba(0, 0, 0, .05);
}
.rv-seg { height: 100%; transition: width .2s; }
.rv-seg.order { background: linear-gradient(90deg, rgba(64, 193, 255, .75), rgba(64, 193, 255, .45)); }
.rv-seg.chaos { background: linear-gradient(90deg, rgba(255, 51, 51, .45), rgba(255, 51, 51, .75)); }
.rv-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: var(--text-80); pointer-events: none;
  text-shadow: 0 0 3px rgba(255, 255, 255, .55);
}

/* ---------- 个人主页：连胜小结 / 英雄池 ---------- */
.pr-streak { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pr-streak .sk {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .03); color: var(--text-60);
}
.pr-streak .sk.good { color: #15803d; border-color: rgba(21, 128, 61, .35); background: rgba(21, 128, 61, .07); }
.pr-streak .sk.bad { color: #b91c1c; border-color: rgba(185, 28, 28, .35); background: rgba(185, 28, 28, .06); }
.pr-pool { display: flex; flex-direction: column; gap: 4px; }
.hp-row { display: flex; align-items: center; gap: 8px; height: 24px; }
.hp-av { width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: none; background: #d9d9d9; }
.hp-av img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hp-name { flex: none; width: 82px; font-size: 12px; color: var(--text-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .06); overflow: hidden; }
.hp-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7c9cff, #3b82f6); }
.hp-num { flex: none; width: 44px; text-align: right; font-size: 11px; color: var(--text-60); }
.hp-wr { flex: none; width: 38px; text-align: right; font-size: 12px; font-weight: 700; }
.hp-wr.good { color: #15803d; }
.hp-wr.bad { color: #b91c1c; }

/* ---------- 侧栏战绩队列筛选 ---------- */
.side-filter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.sf {
  flex: 1 1 auto; padding: 3px 8px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--text-60);
}
.sf:hover { color: var(--text); }
.sf.is-active { border-color: var(--blue); color: var(--blue); background: rgba(59, 130, 246, .08); font-weight: 600; }

/* ---------- 深色模式（顶栏 ◐ 切换，选择存 localStorage） ---------- */
html[data-mode="dark"] {
  --bg: #14161a;
  --card-bg: rgba(38, 42, 48, .92);
  --card-border: rgba(255, 255, 255, .16);
  --panel: #1c1f24;
  --line: rgba(255, 255, 255, .14);
  --text: rgba(255, 255, 255, .9);
  --text-80: rgba(255, 255, 255, .82);
  --text-60: rgba(255, 255, 255, .62);
  --text-40: rgba(255, 255, 255, .42);
}
html[data-mode="dark"] .topbar { background: rgba(24, 26, 31, .88); }
html[data-mode="dark"] .chip,
html[data-mode="dark"] .badge { background: rgba(255, 255, 255, .06); }
html[data-mode="dark"] .empty { background: rgba(255, 255, 255, .04); }
html[data-mode="dark"] .sidebar { background: rgba(28, 31, 36, .92); }
html[data-mode="dark"] .ghost,
html[data-mode="dark"] .stab { background: #23262c; }
html[data-mode="dark"] .stab.is-active { background: var(--panel); }
html[data-mode="dark"] .modal-body { background: var(--panel); }
html[data-mode="dark"] .modal-head { background: rgba(255, 255, 255, .04); }
html[data-mode="dark"] .result-banner { background: rgba(255, 255, 255, .04); }
html[data-mode="dark"] .result-banner.win { background: linear-gradient(90deg, rgba(59, 130, 246, .18), rgba(255, 255, 255, .03)); border-color: #2f5fa8; }
html[data-mode="dark"] .result-banner.lose { background: linear-gradient(90deg, rgba(239, 68, 68, .16), rgba(255, 255, 255, .03)); border-color: #7f3b3b; }
html[data-mode="dark"] table.det thead th,
html[data-mode="dark"] table.det .det-name { background: #2a2e35; }
html[data-mode="dark"] .det-wrap { border-color: rgba(255, 255, 255, .08); }
html[data-mode="dark"] .rv-track { background: rgba(255, 255, 255, .08); }
html[data-mode="dark"] .rv-label { text-shadow: 0 0 3px rgba(0, 0, 0, .8); }
html[data-mode="dark"] .hp-bar { background: rgba(255, 255, 255, .1); }
html[data-mode="dark"] .pr-av img,
html[data-mode="dark"] .pr-av i { box-shadow: 0 0 0 2px #1c1f24, 0 0 0 3px var(--line); }
html[data-mode="dark"] .pr-ov-row { border-bottom-color: rgba(255, 255, 255, .1); }
html[data-mode="dark"] .pr-rcard-badge i { background: rgba(255, 255, 255, .08); }
html[data-mode="dark"] .pr-rcard-sub { border-top-color: rgba(255, 255, 255, .12); }
html[data-mode="dark"] .pr-rcard { box-shadow: none; }
html[data-mode="dark"] .ml-row.unknown { background: rgba(160, 160, 160, .22); }
html[data-mode="dark"] .pc-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); }
html[data-mode="dark"] .badge.ph-champ-select { background: rgba(217, 192, 122, .14); }
html[data-mode="dark"] .badge.ph-client-online,
html[data-mode="dark"] .badge.ph-end-of-game { background: rgba(21, 128, 61, .16); }
html[data-mode="dark"] .badge.ph-lobby { background: rgba(67, 56, 202, .2); }
html[data-mode="dark"] .badge.ph-matchmaking { background: rgba(180, 83, 9, .2); }
html[data-mode="dark"] .badge.ph-ready { background: rgba(29, 78, 216, .2); }
html[data-mode="dark"] .badge.ph-in-game { background: rgba(37, 99, 235, .18); }
html[data-mode="dark"] .badge.ph-offline { background: rgba(255, 255, 255, .06); }

/* ---------- 主题菜单 ---------- */
.theme-wrap { position: relative; display: inline-flex; flex: none; }
/* 顶栏右侧操作区：接口测试入口 + 主题切换 */
.top-actions { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.top-actions .ghost {
  height: 36px; padding: 0 13px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.top-actions .ghost:hover { transform: translateY(-1px); }
.top-actions .ghost:active { transform: translateY(0); }
.api-link {
  text-decoration: none;
  font: 800 12.5px/1 ui-monospace, Consolas, monospace; letter-spacing: .9px;
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 8px rgba(29, 78, 216, .32);
}
.api-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #4b8dfa, #1e40af);
  box-shadow: 0 4px 12px rgba(29, 78, 216, .42);
}
/* 顶栏「说明」入口：与 API 测试台区分配色 */
.doc-link {
  text-decoration: none;
  font: 800 12.5px/1 inherit; letter-spacing: .5px;
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  box-shadow: 0 2px 8px rgba(13, 148, 136, .3);
}
.doc-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  box-shadow: 0 4px 12px rgba(13, 148, 136, .38);
}
#themeBtn {
  min-width: 42px; padding: 0;
  font-size: 18px; line-height: 1;
  color: var(--text-80);
  background: linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(168, 85, 247, .16));
  border-color: rgba(59, 130, 246, .42);
}
#themeBtn:hover {
  color: var(--blue);
  border-color: rgba(59, 130, 246, .7);
  box-shadow: 0 3px 10px rgba(59, 130, 246, .22);
}
html[data-mode="dark"] #themeBtn { color: var(--text); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 148px; max-height: min(70vh, 420px); overflow: auto; padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}
.tm-group {
  padding: 7px 9px 3px; font-size: 10px; font-weight: 700;
  letter-spacing: .6px; color: var(--text-40);
}
.theme-menu button {
  display: flex; align-items: center; gap: 7px;
  text-align: left; padding: 7px 9px; font-size: 12px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text-80); cursor: pointer;
}
.theme-menu button:hover { background: rgba(59, 130, 246, .1); }
.theme-menu button.is-active { color: var(--blue); font-weight: 700; background: rgba(59, 130, 246, .12); }
.sw {
  width: 12px; height: 12px; border-radius: 3px; flex: none;
  border: 1px solid rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

/* ---------- 浅色系主题 ---------- */
html[data-theme="akari"] {
  --bg: #eef1f5;
  --card-bg: rgba(255, 255, 255, .94);
  --card-border: rgba(16, 24, 40, .17);
  --panel: #ffffff;
  --line: rgba(16, 24, 40, .1);
  --text: rgba(16, 24, 40, .9);
  --text-80: rgba(16, 24, 40, .8);
  --text-60: rgba(16, 24, 40, .58);
  --text-40: rgba(16, 24, 40, .38);
  --blue: #0a74c4;
}
html[data-theme="akari"] .topbar { background: rgba(255, 255, 255, .9); }
html[data-theme="akari"] .sidebar { background: rgba(255, 255, 255, .9); }

html[data-theme="sakura"] {
  --bg: #fdf1f6;
  --card-bg: rgba(255, 255, 255, .95);
  --card-border: rgba(190, 60, 110, .18);
  --panel: #fffafc;
  --line: rgba(190, 60, 110, .16);
  --text: rgba(60, 20, 35, .9);
  --text-80: rgba(60, 20, 35, .82);
  --text-60: rgba(60, 20, 35, .58);
  --text-40: rgba(60, 20, 35, .38);
  --blue: #d6336c;
}
html[data-theme="sakura"] .topbar { background: rgba(255, 249, 252, .92); }
html[data-theme="sakura"] .sidebar { background: rgba(255, 250, 253, .92); }

html[data-theme="forest"] {
  --bg: #eff5ee;
  --card-bg: rgba(255, 255, 255, .95);
  --card-border: rgba(30, 80, 50, .18);
  --panel: #fbfdfa;
  --line: rgba(30, 80, 50, .14);
  --text: rgba(20, 45, 28, .9);
  --text-80: rgba(20, 45, 28, .82);
  --text-60: rgba(20, 45, 28, .56);
  --text-40: rgba(20, 45, 28, .36);
  --blue: #2f7d4f;
}
html[data-theme="forest"] .topbar { background: rgba(251, 253, 250, .92); }
html[data-theme="forest"] .sidebar { background: rgba(251, 253, 250, .92); }

html[data-theme="sepia"] {
  --bg: #f5eee0;
  --card-bg: rgba(255, 253, 247, .95);
  --card-border: rgba(120, 85, 40, .2);
  --panel: #fffdf7;
  --line: rgba(120, 85, 40, .16);
  --text: rgba(62, 44, 22, .9);
  --text-80: rgba(62, 44, 22, .82);
  --text-60: rgba(62, 44, 22, .56);
  --text-40: rgba(62, 44, 22, .36);
  --blue: #b0793a;
}
html[data-theme="sepia"] .topbar { background: rgba(255, 252, 244, .92); }
html[data-theme="sepia"] .sidebar { background: rgba(255, 252, 244, .92); }

html[data-theme="snow"] {
  --bg: #eef1f6;
  --card-bg: rgba(255, 255, 255, .96);
  --card-border: rgba(40, 50, 70, .14);
  --panel: #ffffff;
  --line: rgba(40, 50, 70, .1);
  --text: rgba(20, 26, 36, .9);
  --text-80: rgba(20, 26, 36, .8);
  --text-60: rgba(20, 26, 36, .55);
  --text-40: rgba(20, 26, 36, .35);
}
html[data-theme="snow"] .topbar { background: rgba(255, 255, 255, .92); }
html[data-theme="snow"] .sidebar { background: rgba(255, 255, 255, .92); }

/* ---------- 深色系主题（均复用 html[data-mode="dark"] 的组件配色） ---------- */
html[data-mode="dark"][data-theme="eye"] {
  --bg: #141a16;
  --card-bg: rgba(32, 39, 34, .94);
  --card-border: rgba(255, 255, 255, .12);
  --panel: #1a211c;
  --line: rgba(255, 255, 255, .1);
  --text: rgba(226, 232, 224, .82);
  --text-80: rgba(226, 232, 224, .72);
  --text-60: rgba(226, 232, 224, .52);
  --text-40: rgba(226, 232, 224, .34);
}
html[data-mode="dark"][data-theme="eye"] .topbar { background: rgba(20, 26, 22, .9); }
html[data-mode="dark"][data-theme="eye"] .sidebar { background: rgba(26, 33, 28, .92); }

html[data-mode="dark"][data-theme="ocean"] {
  --bg: #0b1420;
  --card-bg: rgba(20, 35, 52, .94);
  --card-border: rgba(120, 190, 255, .16);
  --panel: #142334;
  --line: rgba(120, 190, 255, .13);
  --text: rgba(224, 240, 255, .92);
  --text-80: rgba(224, 240, 255, .82);
  --text-60: rgba(224, 240, 255, .6);
  --text-40: rgba(224, 240, 255, .4);
  --blue: #38bdf8;
}
html[data-mode="dark"][data-theme="ocean"] .topbar { background: rgba(11, 20, 32, .92); }
html[data-mode="dark"][data-theme="ocean"] .sidebar { background: rgba(18, 31, 46, .94); }
html[data-mode="dark"][data-theme="ocean"] .ghost,
html[data-mode="dark"][data-theme="ocean"] .stab { background: #1a2c40; }

html[data-mode="dark"][data-theme="neon"] {
  --bg: #0e0918;
  --card-bg: rgba(28, 20, 48, .94);
  --card-border: rgba(217, 70, 239, .22);
  --panel: #1a1230;
  --line: rgba(217, 70, 239, .18);
  --text: rgba(240, 230, 255, .92);
  --text-80: rgba(240, 230, 255, .82);
  --text-60: rgba(240, 230, 255, .58);
  --text-40: rgba(240, 230, 255, .38);
  --blue: #d946ef;
}
html[data-mode="dark"][data-theme="neon"] .topbar { background: rgba(14, 9, 24, .92); }
html[data-mode="dark"][data-theme="neon"] .sidebar { background: rgba(24, 16, 42, .94); }
html[data-mode="dark"][data-theme="neon"] .ghost,
html[data-mode="dark"][data-theme="neon"] .stab { background: #241a3a; }

html[data-mode="dark"][data-theme="wine"] {
  --bg: #190f12;
  --card-bg: rgba(38, 22, 27, .94);
  --card-border: rgba(244, 63, 94, .2);
  --panel: #251519;
  --line: rgba(244, 63, 94, .16);
  --text: rgba(255, 232, 236, .92);
  --text-80: rgba(255, 232, 236, .82);
  --text-60: rgba(255, 232, 236, .58);
  --text-40: rgba(255, 232, 236, .38);
  --blue: #f43f5e;
}
html[data-mode="dark"][data-theme="wine"] .topbar { background: rgba(25, 15, 18, .92); }
html[data-mode="dark"][data-theme="wine"] .sidebar { background: rgba(34, 20, 24, .94); }
html[data-mode="dark"][data-theme="wine"] .ghost,
html[data-mode="dark"][data-theme="wine"] .stab { background: #2c1a1f; }

html[data-mode="dark"][data-theme="oled"] {
  --bg: #000000;
  --card-bg: rgba(16, 16, 16, .96);
  --card-border: rgba(255, 255, 255, .14);
  --panel: #0a0a0a;
  --line: rgba(255, 255, 255, .12);
  --text: rgba(255, 255, 255, .94);
  --text-80: rgba(255, 255, 255, .84);
  --text-60: rgba(255, 255, 255, .6);
  --text-40: rgba(255, 255, 255, .4);
  --blue: #60a5fa;
}
html[data-mode="dark"][data-theme="oled"] .topbar { background: rgba(0, 0, 0, .94); }
html[data-mode="dark"][data-theme="oled"] .sidebar { background: rgba(10, 10, 10, .96); }
html[data-mode="dark"][data-theme="oled"] .ghost,
html[data-mode="dark"][data-theme="oled"] .stab { background: #141414; }
