/* PC28 挂机实盘 · 运营/实盘执行台样式
 * ------------------------------------------------------------------
 * 为什么单独一套皮肤：
 *   /share/rules/ 是「公开规则账本」（浅色纸张 + 墨绿 + 黄铜），
 *   这里展示的是真实账号、余额与进行中场次，属于内部运营视角；
 *   两者共用 PC28 控制台的字体栈与等宽数字口径，但主色、容器、信息密度必须分开，
 *   避免让人误以为这是又一张公开战绩榜。
 *
 * 设计语言：暖炭黑 / 荧光黄绿「信号灯」/ 细线分隔 / 数字等宽右对齐。
 *   - 绿色只表示在线与盈利，红色只表示亏损，琥珀只表示延迟，颜色永远配文字。
 *   - 浅色 rules.css 只复用 .live-pill / .icon-btn 与字体变量，其余由本文件接管。
 * 断点：1180 三列账号卡 → 900 两列 → 700 表格转卡片行 → 380 压缩字号。
 * ------------------------------------------------------------------ */

:root {
  --hg-bg: #0d100f;
  --hg-bg-2: #111513;
  --hg-panel: #151a17;
  --hg-panel-2: #1a201c;
  --hg-line: #29312b;
  --hg-line-soft: #1f2621;
  --hg-line-strong: #3b463d;
  --hg-ink: #eef1e9;
  --hg-text: #c6cec4;
  --hg-muted: #8e9b90;
  --hg-faint: #7b8880;
  --hg-lime: #c9f25f;
  --hg-lime-soft: rgba(201, 242, 95, 0.10);
  --hg-mint: #74e6ac;
  --hg-coral: #ff9382;
  --hg-amber: #f3c16b;
  --hg-r: 4px;
  --hg-mono: var(--mono, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace);
  --hg-sans: var(--sans, "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--hg-bg); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body.hg {
  min-height: 100vh;
  color: var(--hg-text);
  background:
    radial-gradient(900px 420px at 84% -8%, rgba(201, 242, 95, 0.055), transparent 62%),
    radial-gradient(720px 420px at 6% 2%, rgba(116, 230, 172, 0.035), transparent 60%),
    var(--hg-bg);
  font-family: var(--hg-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hg a { color: inherit; }
.hg ::selection { background: rgba(201, 242, 95, 0.28); color: var(--hg-ink); }
.hg a:focus-visible,
.hg button:focus-visible,
.hg summary:focus-visible {
  outline: 2px solid var(--hg-lime);
  outline-offset: 2px;
  border-radius: 2px;
}

.hg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── 顶部报头 ────────────────────────────── */
.hg-head {
  position: relative;
  background: linear-gradient(180deg, #121714 0%, #0f1411 100%);
  border-bottom: 1px solid var(--hg-line-strong);
  box-shadow: inset 0 2px 0 rgba(201, 242, 95, 0.55);
  overflow: hidden;
}
.hg-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(620px 240px at 86% -30%, rgba(201, 242, 95, 0.11), transparent 70%);
}
.hg-head-in {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 18px 0;
}

.hg-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
}
.hg-mark {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--hg-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--hg-ink);
}
.hg-mark .slash { color: var(--hg-lime); padding: 0 3px; }
.hg .live-pill { font-size: 10px; letter-spacing: 0.04em; }
.live-pill.is-warn { color: var(--hg-amber); }
.live-pill.is-warn i {
  background: var(--hg-amber);
  box-shadow: 0 0 0 3px rgba(243, 193, 107, 0.14);
}
.hg .icon-btn { flex: none; }

.hg-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
  padding: 4px 8px 4px 0;
  font-family: var(--hg-mono);
  font-size: 10.5px;
  color: var(--hg-muted);
  text-decoration: none;
}
.hg-back:hover { color: var(--hg-lime); }

.hg-title-row {
  position: relative;
  z-index: 1;
  margin-top: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.hg-eyebrow {
  display: block;
  font-family: var(--hg-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--hg-lime);
}
.hg h1 {
  margin: 6px 0 0;
  font-family: var(--hg-sans);
  font-size: clamp(28px, 6.2vw, 38px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--hg-ink);
  overflow-wrap: anywhere;
}
.hg-detail h1 { font-size: clamp(23px, 5.2vw, 31px); }
.hg-dek {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--hg-muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.hg-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.hg-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--hg-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  color: var(--hg-text);
  white-space: nowrap;
}
.hg-chip.is-quiet { color: var(--hg-muted); border-color: var(--hg-line); }
.hg-chip.is-balance { color: var(--hg-ink); }
.hg-chip.is-mode { color: var(--hg-lime); border-color: rgba(201, 242, 95, 0.38); background: var(--hg-lime-soft); }
.hg-chip.is-mode-observe,
.hg-chip.is-mode-unknown { color: var(--hg-muted); border-color: var(--hg-line-strong); background: transparent; }
.hg-chip.is-mode-prefill { color: var(--hg-amber); border-color: rgba(243, 193, 107, 0.36); background: rgba(243, 193, 107, 0.07); }
.hg-chip.is-state.is-online { color: var(--hg-mint); border-color: rgba(116, 230, 172, 0.34); background: rgba(116, 230, 172, 0.07); }
.hg-chip.is-state.is-warn { color: var(--hg-amber); border-color: rgba(243, 193, 107, 0.38); background: rgba(243, 193, 107, 0.07); }
.hg-chip.is-state.is-offline { color: var(--hg-faint); }
.hg-chip.pos { color: var(--hg-mint); }
.hg-chip.neg { color: var(--hg-coral); }
.hg-chip.zero { color: var(--hg-muted); }

/* KPI：1px 网格线，任意列数都不会出现断头边框 */
.hg-kpis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 15px;
  background: var(--hg-line);
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-r);
  overflow: hidden;
}
.hg-kpi {
  min-width: 0;
  padding: 10px 12px 11px;
  background: var(--hg-panel);
}
.hg-kpi-k {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--hg-muted);
}
.hg-kpi-v {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--hg-mono);
  font-size: clamp(19px, 5vw, 26px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--hg-ink);
}
.hg-kpi-v.pos { color: var(--hg-mint); }
.hg-kpi-v.neg { color: var(--hg-coral); }
.hg-kpi-v.zero { color: var(--hg-muted); }
.hg-kpi-v.live { color: var(--hg-lime); }
.hg-kpi.is-pending .hg-kpi-v { color: var(--hg-faint); }
.hg-kpi-s {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--hg-faint);
}

.hg-statusline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 9px 0 12px;
  font-family: var(--hg-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--hg-faint);
}
.hg-statusline b { color: var(--hg-text); font-weight: 500; }
.hg-status-right { margin-left: auto; }

/* ── 主区 ─────────────────────────────── */
.hg-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 18px 26px;
}

.hg-listhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 2px 0 11px;
}
.hg-listhead h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--hg-ink);
}
.hg-listhead h2::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  background: var(--hg-lime);
}
.hg-listhead p { margin: 4px 0 0; font-size: 10px; color: var(--hg-faint); }
.hg-count {
  padding: 1px 5px;
  border: 1px solid var(--hg-line);
  border-radius: 2px;
  font-family: var(--hg-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--hg-muted);
}

.hg-filter {
  display: flex;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--hg-line);
  border-radius: 3px;
  background: var(--hg-panel);
}
.hg-filter button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-left: 1px solid var(--hg-line);
  background: transparent;
  color: var(--hg-muted);
  font-size: 10.5px;
  cursor: pointer;
}
.hg-filter button:first-child { border-left: 0; }
.hg-filter button b {
  font-family: var(--hg-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--hg-faint);
}
.hg-filter button:hover:not([aria-pressed="true"]) { color: var(--hg-ink); }
.hg-filter button[aria-pressed="true"] { background: var(--hg-lime); color: #11160d; font-weight: 600; }
.hg-filter button[aria-pressed="true"] b { color: #11160d; opacity: 0.7; }

/* ── 账号卡 ───────────────────────────── */
.hg-accts { display: grid; gap: 10px; }

.acct {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 13px 13px 11px 16px;
  overflow: hidden;
  background: var(--hg-panel);
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-r);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.acct::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--hg-line-strong);
}
.acct.is-online::before { background: var(--hg-lime); }
.acct.is-warn::before { background: var(--hg-amber); }
.acct.is-offline::before { background: #4b564d; }
.acct.is-static { cursor: default; }
@media (hover: hover) {
  .acct:not(.is-static):hover {
    border-color: var(--hg-line-strong);
    background: var(--hg-panel-2);
    transform: translateY(-1px);
  }
}
.acct:focus-visible { outline-offset: 2px; }

.acct-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.acct-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5d6a5f;
}
.is-online .acct-dot {
  background: var(--hg-lime);
  box-shadow: 0 0 0 3px rgba(201, 242, 95, 0.12);
  animation: hgPulse 2.4s ease-in-out infinite;
}
.is-warn .acct-dot {
  background: var(--hg-amber);
  box-shadow: 0 0 0 3px rgba(243, 193, 107, 0.12);
}
@keyframes hgPulse { 50% { opacity: 0.35; } }

.acct-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--hg-ink);
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--hg-muted);
  white-space: nowrap;
}
.chip-mode.is-live { color: var(--hg-lime); border-color: rgba(201, 242, 95, 0.45); background: var(--hg-lime-soft); }
.chip-mode.is-prefill { color: var(--hg-amber); border-color: rgba(243, 193, 107, 0.4); background: rgba(243, 193, 107, 0.07); }
.chip-mode.is-observe { color: var(--hg-muted); }
.chip-state.is-online { color: var(--hg-mint); border-color: rgba(116, 230, 172, 0.35); background: rgba(116, 230, 172, 0.08); }
.chip-state.is-warn { color: var(--hg-amber); border-color: rgba(243, 193, 107, 0.4); background: rgba(243, 193, 107, 0.08); }
.chip-state.is-offline { color: var(--hg-faint); }

.acct-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  margin: 7px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--hg-muted);
}
.acct-gk {
  flex: none;
  padding: 0 3px;
  border: 1px solid var(--hg-line);
  border-radius: 2px;
  font-family: var(--hg-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--hg-faint);
}
.acct-gitem {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.acct-gv {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 11px 0 0;
  padding: 9px 0 10px;
  border-top: 1px solid var(--hg-line-soft);
  border-bottom: 1px solid var(--hg-line-soft);
}
.acct-cell { min-width: 0; }
.acct-cell span { display: block; font-size: 9.5px; letter-spacing: 0.02em; color: var(--hg-muted); }
.acct-cell b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--hg-mono);
  font-size: clamp(13px, 3.6vw, 17px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--hg-ink);
}
.acct-cell b.pos { color: var(--hg-mint); }
.acct-cell b.neg { color: var(--hg-coral); }
.acct-cell b.zero { color: var(--hg-muted); }
.acct-cell b.is-bal { color: var(--hg-ink); }

/* 余额位数过多时单独占一行，宁可多一行也不截断金额 */
.acct-money.has-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acct-money.has-wide .acct-cell:nth-child(3) {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 1px;
  padding-top: 7px;
  border-top: 1px dashed var(--hg-line-soft);
}
.acct-money.has-wide .acct-cell:nth-child(3) b { margin-top: 0; text-align: right; }

.acct-run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  min-height: 18px;
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--hg-muted);
}
.run-tag {
  flex: none;
  padding: 1px 4px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 2px;
  font-family: var(--hg-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--hg-muted);
}
.run-tag.is-live { color: #11160d; background: var(--hg-lime); border-color: var(--hg-lime); font-weight: 600; }
.run-tag.is-idle { color: var(--hg-faint); }
.acct-rule {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--hg-mono);
  font-size: 11px;
  letter-spacing: -0.02em;
  color: var(--hg-ink);
}
.acct-next { font-family: var(--hg-mono); font-size: 10px; color: var(--hg-muted); }
.acct-idle { color: var(--hg-faint); }

.acct-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 9px;
  margin-top: auto;
  padding-top: 9px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--hg-faint);
}
.acct-meta > span { white-space: nowrap; }
.acct-sync { margin-left: auto; font-family: var(--hg-mono); }
.acct-go {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--hg-mono);
  font-size: 9.5px;
  color: var(--hg-lime);
  white-space: nowrap;
}
.acct-go i { font-style: normal; }
.acct-go.is-muted { color: var(--hg-faint); }

/* ── 面板 / 表格 ──────────────────────── */
.hg-panel {
  margin-top: 14px;
  overflow: hidden;
  background: var(--hg-panel);
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-r);
}
.hg-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--hg-line);
}
.hg-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--hg-ink);
}
.hg-panel-head h2::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  background: var(--hg-lime);
}
.hg-panel-head p {
  max-width: 620px;
  margin: 4px 0 0;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--hg-faint);
}

.hg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hg-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.hg-table caption { text-align: left; }
.hg-table th {
  padding: 7px 11px;
  border-bottom: 1px solid var(--hg-line);
  background: var(--hg-bg-2);
  font-family: var(--hg-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
  color: var(--hg-muted);
}
.hg-table td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--hg-line-soft);
  font-family: var(--hg-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--hg-text);
}
.hg-table tbody tr:last-child td { border-bottom: 0; }
.hg-table tbody tr:hover td { background: rgba(255, 255, 255, 0.014); }
.hg-table .hg-num { text-align: right; }
.hg-table td.pos { color: var(--hg-mint); }
.hg-table td.neg { color: var(--hg-coral); }
.hg-table td.zero { color: var(--hg-muted); }
.hg-td-date { color: var(--hg-ink) !important; font-weight: 500; }
.hg-table tr.is-today .hg-td-date { color: var(--hg-lime) !important; }
.hg-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 3px;
  border: 1px solid rgba(201, 242, 95, 0.4);
  border-radius: 2px;
  font-size: 8px;
  line-height: 1.4;
  color: var(--hg-lime);
  vertical-align: 1px;
}

/* ── 场次手风琴 ───────────────────────── */
.hg-sess-cols {
  display: none;
  padding: 7px 13px;
  border-bottom: 1px solid var(--hg-line);
  background: var(--hg-bg-2);
  font-family: var(--hg-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--hg-muted);
}
.hg-sess-cols .hg-num { text-align: right; }

.hg-sess { border-bottom: 1px solid var(--hg-line-soft); }
.hg-sess:last-child { border-bottom: 0; }
.hg-sess summary {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "id time result pnl"
    "meta meta rounds chev";
  align-items: center;
  gap: 3px 9px;
  min-height: 54px;
  padding: 9px 12px;
  list-style: none;
  cursor: pointer;
}
.hg-sess summary::-webkit-details-marker { display: none; }
.hg-sess summary:focus-visible { outline-offset: -2px; }
.hg-sess-id { grid-area: id; font-family: var(--hg-mono); font-size: 9px; color: var(--hg-faint); }
.hg-sess-time { grid-area: time; font-family: var(--hg-mono); font-size: 9.5px; color: var(--hg-muted); }
.hg-sess-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 5px;
  min-width: 0;
  font-size: 10px;
  color: var(--hg-text);
}
.hg-sess-meta .m-item { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.hg-sess-meta .m-sep { color: var(--hg-faint); }
.hg-sess-meta .m-frag { white-space: nowrap; }
.hg-sess-rounds {
  grid-area: rounds;
  justify-self: end;
  font-family: var(--hg-mono);
  font-size: 9.5px;
  color: var(--hg-muted);
}
.hg-sess-result { grid-area: result; justify-self: end; }
.hg-sess-pnl {
  grid-area: pnl;
  justify-self: end;
  font-family: var(--hg-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hg-sess-pnl.pos { color: var(--hg-mint); }
.hg-sess-pnl.neg { color: var(--hg-coral); }
.hg-sess-pnl.zero { color: var(--hg-muted); }
.hg-sess-chev {
  grid-area: chev;
  justify-self: end;
  font-family: var(--hg-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--hg-faint);
  transition: transform 0.15s ease;
}
.hg-sess[open] .hg-sess-chev { transform: rotate(90deg); color: var(--hg-lime); }
.hg-sess[open] summary { background: rgba(255, 255, 255, 0.018); }

.hg-sess-body {
  padding: 0 12px 10px;
  background: var(--hg-bg-2);
  border-top: 1px solid var(--hg-line-soft);
}
.hg-follow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hg-line);
  font-family: var(--hg-mono);
  font-size: 10px;
  color: var(--hg-muted);
}
.hg-follow b { font-weight: 600; }
.hg-follow b.pos { color: var(--hg-mint); }
.hg-follow b.neg { color: var(--hg-coral); }
.hg-follow b.zero { color: var(--hg-muted); }

.hg-sess-facts {
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hg-line);
  font-family: var(--hg-mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--hg-faint);
}

.hg-rounds { padding-top: 4px; }
.hg-round-cols { display: none; }
.hg-round {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "name name pnl"
    "issue layer result";
  align-items: center;
  gap: 2px 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hg-line-soft);
  font-size: 9.5px;
  color: var(--hg-muted);
}
.hg-round:last-child { border-bottom: 0; }
.hg-round-name { grid-area: name; font-family: var(--hg-mono); font-size: 9.5px; color: var(--hg-text); }
.hg-round-issue {
  grid-area: issue;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--hg-mono);
  color: var(--hg-muted);
}
.hg-round-layer { grid-area: layer; font-family: var(--hg-mono); color: var(--hg-faint); }
.hg-round-result { grid-area: result; justify-self: end; }
.hg-round-pnl {
  grid-area: pnl;
  justify-self: end;
  font-family: var(--hg-mono);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.hg-round-pnl.pos { color: var(--hg-mint); }
.hg-round-pnl.neg { color: var(--hg-coral); }
.hg-round-pnl.zero { color: var(--hg-muted); }

.res {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  padding: 0 5px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 2px;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--hg-muted);
}
.res-hit { color: var(--hg-mint); border-color: rgba(116, 230, 172, 0.32); background: rgba(116, 230, 172, 0.07); }
.res-miss { color: var(--hg-coral); border-color: rgba(255, 147, 130, 0.3); background: rgba(255, 147, 130, 0.06); }
.res-live { color: var(--hg-lime); border-color: rgba(201, 242, 95, 0.4); background: var(--hg-lime-soft); }
.res-skip { color: var(--hg-faint); border-style: dashed; }

/* ── 状态块 / 错误条 / 按钮 ───────────────── */
.hg-empty {
  margin-top: 18px;
  padding: 32px 18px;
  border: 1px dashed var(--hg-line-strong);
  border-radius: var(--hg-r);
  background: rgba(21, 26, 23, 0.55);
  text-align: center;
}
.hg-state-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 11px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 50%;
  font-family: var(--hg-mono);
  font-size: 14px;
  color: var(--hg-muted);
}
.hg-state-mark.is-error { color: var(--hg-coral); border-color: rgba(255, 147, 130, 0.4); }
.hg-empty h3 { margin: 0 0 6px; font-size: 14px; font-weight: 650; color: var(--hg-ink); }
.hg-empty p {
  max-width: 430px;
  margin: 0 auto 14px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--hg-muted);
  overflow-wrap: anywhere;
}
.hg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--hg-line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--hg-ink);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}
.hg-btn:hover { border-color: var(--hg-lime); color: var(--hg-lime); }
.hg-btn + .hg-btn { margin-left: 8px; }

.hg-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 147, 130, 0.28);
  border-left: 3px solid var(--hg-coral);
  border-radius: 3px;
  background: rgba(255, 147, 130, 0.07);
  color: var(--hg-coral);
  font-size: 10.5px;
  line-height: 1.5;
}
.hg-error.is-warn {
  border-color: rgba(243, 193, 107, 0.28);
  border-left-color: var(--hg-amber);
  background: rgba(243, 193, 107, 0.06);
  color: var(--hg-amber);
}
.hg-error-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--hg-mono);
  font-size: 9px;
}
.hg-error-body { flex: 1 1 auto; min-width: 0; }
.hg-error-body b { display: block; margin-bottom: 1px; font-size: 11px; }
.hg-error-body span { display: block; color: var(--hg-muted); overflow-wrap: anywhere; }
.hg-link-btn {
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hg-none {
  margin: 0;
  padding: 16px 14px;
  font-size: 10.5px;
  color: var(--hg-faint);
}

.hg-note {
  margin: 14px 0 0;
  padding: 9px 11px;
  border: 1px dashed var(--hg-line);
  border-radius: 3px;
  font-family: var(--hg-mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--hg-muted);
  overflow-wrap: anywhere;
}

/* ── 骨架屏 ───────────────────────────── */
.hg-skel {
  height: 178px;
  border: 1px solid var(--hg-line);
  border-radius: var(--hg-r);
  background: linear-gradient(100deg, var(--hg-panel) 25%, var(--hg-panel-2) 42%, var(--hg-panel) 58%);
  background-size: 240% 100%;
  animation: hgShimmer 1.5s linear infinite;
}
.hg-skel-row { height: 96px; border: 0; border-radius: 0; }
@keyframes hgShimmer { to { background-position: -240% 0; } }

/* ── 页脚 ─────────────────────────────── */
.hg-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2px 18px 34px;
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--hg-faint);
}
.hg-foot p { margin: 0 0 3px; }
.hg-foot code {
  padding: 1px 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--hg-mono);
  font-size: 9px;
  color: var(--hg-muted);
  overflow-wrap: anywhere;
}
.hg-foot-dim { font-family: var(--hg-mono); font-size: 9px; }

/* ── 断点 ─────────────────────────────── */
@media (min-width: 560px) {
  .hg-kpis.hg-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 700px) {
  .hg-head-in { padding-left: 26px; padding-right: 26px; }
  .hg-main { padding-left: 26px; padding-right: 26px; }
  .hg-foot { padding-left: 26px; padding-right: 26px; }
  .hg-kpi { padding: 12px 15px 13px; }
  .hg-panel-head { padding: 14px 16px 11px; }
  .hg-empty { padding: 42px 24px; }
}

@media (min-width: 720px) {
  .hg-kpis:not(.hg-kpis-6) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 820px) {
  .hg-sess-cols {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) 56px 62px 84px 12px;
    gap: 10px;
    align-items: center;
  }
  .hg-sess summary {
    grid-template-columns: 64px 92px minmax(0, 1fr) 56px 62px 84px 12px;
    grid-template-areas: "id time meta rounds result pnl chev";
    gap: 10px;
    min-height: 0;
    padding: 7px 13px;
  }
  .hg-sess-time { font-size: 10px; }
  .hg-sess-meta { font-size: 10.5px; }
  .hg-sess-rounds { justify-self: end; text-align: right; }
  .hg-sess-result { justify-self: start; }
  .hg-sess-pnl { font-size: 12.5px; }
  .hg-sess-body { padding: 0 13px 11px; }
  .hg-round-cols {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 56px 62px 84px;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--hg-line);
    font-family: var(--hg-mono);
    font-size: 8px;
    letter-spacing: 0.06em;
    color: var(--hg-faint);
  }
  .hg-round-cols .hg-num { text-align: right; }
  .hg-round {
    grid-template-columns: 64px minmax(0, 1fr) 56px 62px 84px;
    grid-template-areas: "name issue layer result pnl";
    gap: 10px;
    padding: 6px 0;
    font-size: 10px;
  }
  .hg-round-result { justify-self: start; }
}

@media (min-width: 900px) {
  .hg-accts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hg-skel { height: 190px; }
}

@media (min-width: 1040px) {
  .hg-kpis.hg-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hg-title-row { margin-top: 18px; }
}

@media (min-width: 1180px) {
  .hg-accts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .hg-sess-meta { line-height: 1.45; }
  .hg-daily,
  .hg-daily tbody,
  .hg-daily tr,
  .hg-daily td { display: block; }
  .hg-daily thead { display: none; }
  .hg-daily tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--hg-line);
  }
  .hg-daily tr:last-child { border-bottom: 0; }
  .hg-daily td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    border: 0;
    white-space: normal;
    font-size: 10.5px;
  }
  .hg-daily td::before {
    content: attr(data-label);
    flex: none;
    font-family: var(--hg-sans);
    font-size: 9px;
    letter-spacing: 0.02em;
    color: var(--hg-faint);
  }
  .hg-daily td.hg-td-date {
    grid-column: 1 / -1;
    display: block;
    margin-bottom: 3px;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--hg-line-soft);
    font-size: 12px;
  }
  .hg-daily td.hg-td-date::before { content: none; }
  .hg-daily td.hg-num { text-align: right; }
}

@media (max-width: 420px) {
  .hg-sess-meta .m-buy { display: none; }
}

@media (max-width: 380px) {
  .hg-head-in { padding-left: 14px; padding-right: 14px; }
  .hg-main { padding-left: 14px; padding-right: 14px; }
  .hg-foot { padding-left: 14px; padding-right: 14px; }
  .hg-mark { font-size: 8.5px; letter-spacing: 0.1em; }
  .hg-filter button { padding: 0 7px; }
  .acct { padding-left: 14px; padding-right: 11px; }
  .acct-name { font-size: 14px; }
  .chip { font-size: 9px; padding: 0 4px; }
  .hg-chip { font-size: 9.5px; }
  .hg-sess summary { padding-left: 10px; padding-right: 10px; }
  .hg-sess-body { padding-left: 10px; padding-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
