/* 赛势雷达 — 注单风 */
:root {
  --bg: #0e0f12;
  --sidebar: #111113;
  --panel: #18181b;
  --panel2: #1c1c21;
  --ink: #ececef;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,0.06);
  --head: #16161a;
  --gold: #c9a227;
  --gold-soft: #e6c36a;
  --odd: #f23645;
  --win: #26a69a;
  --accent: #c8c8ce;
  --warn: #c9a227;
  --danger: #f23645;
  --info: #c8c8ce;
  --shout: #f23645;
  --muted-2: #8b8b93;
  --line-strong: #3a3a44;
  --panel3: #2a2a32;
  --panel-deep: #121216;
  --sb-thumb: #3a3a44;
  --veil: rgba(17, 17, 19, .98);
  --ink-on: #ffffff;
  --veil-soft: rgba(255,255,255,.07);
  --veil-line: rgba(255,255,255,.12);
  --btn-veil: rgba(255,255,255,.12);
  --hover: #1c1c24;
  --hover-2: #25252c;
  --win-bg: #14241f;
  --win-bright: #7dffb0;
  --win-line: #1e4a3e;
  --odd-bg: #2a1518;
  --odd-line: #7a3340;
  --odd-bright: #ff8b8b;
  --ink-2: #e8e8ec;
  --radius-sm: 4px;
  --radius: 8px;
  --sidebar-w: 160px;
  --title-h: 44px;
  font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

* { box-sizing: border-box; }
.mobile-only { display: none !important; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input[type="number"], input[type="text"], input[type="password"], select, input[type="date"] {
  background: var(--panel-deep); border: 1px solid var(--line);
  border-radius: 3px; padding: 5px 8px; width: 72px;
  color: var(--ink);
}

#app.mac-shell {
  max-width: none;
  height: 100vh;
  display: flex;
  background: var(--bg);
}

.sidebar.tabbar {
  position: static;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 8px 16px;
  background: var(--sidebar);
  color: var(--ink-on);
  border-right: 1px solid var(--line);
}
.traffic { display: none; }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side-brand .logo-icon { display: block !important; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; }
.brand-text { min-width: 0; display: flex; flex-direction: column; }
.side-brand h1 { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink-on); letter-spacing: .06em; line-height: 1.2; }
.side-brand .sub { display: none !important; }

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-fold { display: flex; flex-direction: column; gap: 1px; }
.nav-fold .nav-parent {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.nav-fold .nav-parent::after {
  content: "";
  width: 0; height: 0;
  margin-left: 8px;
  border-style: solid;
  border-width: 4px 0 4px 5px;
  border-color: transparent transparent transparent #6b6b73;
  transition: transform .12s ease;
  flex-shrink: 0;
}
.nav-fold.open .nav-parent::after { transform: rotate(90deg); }
.tabbar button.active.nav-parent::after { border-color: transparent transparent transparent #111113; }

.nav-kids { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px 8px; }
.nav-fold.open .nav-kids { display: flex; }
.nav-sub {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  padding: 6px 10px 6px 14px;
  border-radius: 3px;
  width: 100%;
}
.nav-sub:hover { background: var(--veil-soft); color: var(--ink-on); }
.nav-sub.on { color: var(--ink-on); background: var(--veil-soft); }
.tabbar button, .nav-item {
  color: #b4b4bc;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  padding: 9px 10px;
  border-radius: 3px;
}
.tabbar button:hover, .nav-item:hover { background: var(--veil-soft); color: var(--ink-on); }
.tabbar button.active, .nav-item.active {
  background: var(--panel3);
  color: var(--ink-on);
  box-shadow: inset 3px 0 0 var(--ink);
}

.side-stats {
  display: grid; gap: 4px;
  padding-top: 8px; border-top: 1px solid var(--veil-line);
  font-size: 12px; color: var(--muted-2);
}
.side-stats .k { display: block; color: #6e6e78; font-size: 12px; margin-bottom: 1px; }
.side-stats b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-on); }

.workspace { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.titlebar {
  height: var(--title-h);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 18px;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.win-title { font-size: 12px; font-weight: 700; margin-right: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.titlebar-left, .titlebar-right { display: flex; align-items: center; gap: 10px; }
.titlebar .muted { color: var(--muted-2); }

.hb-bar {
  display: inline-flex; align-items: center; gap: 6px;
  margin-right: 4px;
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--muted-2); letter-spacing: .02em;
}
.hb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-strong); flex-shrink: 0;
}
.hb-bar.ok .hb-dot { background: var(--win); box-shadow: 0 0 8px rgba(38,166,154,.75); }
.hb-bar.warn .hb-dot { background: var(--gold-soft); box-shadow: 0 0 8px rgba(230,195,106,.75); }
.hb-bar.err .hb-dot {
  background: var(--odd); box-shadow: 0 0 10px rgba(242,54,69,.9);
  animation: hbPulse 1.1s ease-in-out infinite;
}
.hb-bar.ok #hbMs { color: #9ee4dc; }
.hb-bar.warn { color: var(--gold-soft); }
.hb-bar.err { color: var(--odd-bright); }
.hb-msg { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-bar.ok .hb-msg { display: none; }
@keyframes hbPulse { 50% { opacity: .35; } }


.content {
  flex: 1; overflow: auto;
  padding: 12px 14px 20px;
  background: var(--bg);
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.banner {
  /* 右下角 toast 位：不再贴在 titlebar 下方，绝不遮挡上排功能键 */
  position: absolute;
  bottom: 14px;
  left: auto;
  right: 14px;
  max-width: min(560px, calc(100% - 28px));
  z-index: 45;
  margin: 0;
  padding: 8px 12px;
  border-radius: 3px;
  background: rgba(201,162,39,.12);
  color: var(--gold-soft);
  border: 1px solid #5a4a22;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  pointer-events: none;
}
.banner.err { background: var(--odd-bg); color: var(--odd-bright); border-color: var(--odd-line); }
.banner.ok { background: var(--win-bg); color: var(--win-bright); border-color: var(--win-line); }
.banner.warn { background: rgba(201,162,39,.12); color: var(--gold-soft); border-color: var(--gold); }
.demo-banner {
  margin: 10px 18px 0; padding: 7px 12px; border-radius: 3px;
  background: rgba(201,162,39,.12); color: var(--gold-soft); border: 1px dashed var(--gold);
  font-size: 12px; text-align: center; font-weight: 600;
}
.pair-bar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  z-index: 80;
  margin: 0;
  padding: 14px 14px 18px;
  border: none;
  border-left: 1px solid var(--line, var(--panel3));
  border-radius: 0;
  background: rgba(18, 18, 22, 0.98);
  box-shadow: -12px 0 40px rgba(0,0,0,.45);
  overflow: auto;
  transform: translateX(0);
}
.pair-head {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  padding: 2px 0 6px;
  position: sticky;
  top: 0;
  background: var(--head);
  z-index: 1;
}
.pair-row .lg {
  color: #b4b4bc;
  font-size: 12px;
  min-width: 4.5em;
}
.pair-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.pair-row:last-of-type { border-bottom: none; }
.pair-row .pair-txt {
  flex: 1 1 auto;
  min-width: 0;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  outline: none;
}
.pair-row .pair-txt:focus {
  background: rgba(245, 166, 35, 0.12);
  border-radius: 4px;
}
.pair-hist-row .pair-txt {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}
.pair-row .src, .pair-row .crown { font-weight: 650; }
.pair-row .arrow { color: var(--muted); }
.pair-row .sc {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}
.pair-row button.yes {
  background: var(--win);
  color: var(--ink-on);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 3px;
}
.pair-row button.no {
  background: var(--odd-bg);
  color: var(--odd-bright);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 3px;
}
.pair-more { color: var(--muted); font-size: 12px; padding: 4px 0 2px; }
.hidden { display: none !important; }

.view { display: none; }
.view.active { display: block; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  align-items: start;
}
.panel.grow { min-height: 260px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.section-h {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 6px 12px;
  background: var(--head); color: var(--ink-on);
}
.section-h h2 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-on); }
.section-h .muted, .section-h .small { color: var(--muted-2); }
.panel > .row, .panel > form, .panel > p, .panel > .suggest,
.panel > .strat-form, .panel.controls > .row {
  padding-left: 12px; padding-right: 12px;
}
#equityWrap, #bucketStats, #settledList, #shoutFeed, #posList, #stratLog {
  margin: 0 12px;
}

.controls {
  margin-bottom: 14px; padding-bottom: 10px; padding-top: 8px;
  background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px;
}
.controls .row, .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.field { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chk { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chk.demo { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.btn {
  background: #222228;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm, 4px);
  padding: 0 14px;
  min-height: 32px;
  font-weight: 650;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { filter: brightness(0.97); }
.btn.primary { background: var(--win); border-color: transparent; color: var(--ink-on); }
.btn.primary:hover { background: #2bbbad; }
.btn.ghost { background: transparent; color: inherit; }
.titlebar .btn.ghost { color: var(--ink); border-color: var(--line-strong); }
.section-h .btn { background: var(--btn-veil); border-color: transparent; color: var(--ink-on); }
.section-h .btn.tiny { padding: 0 10px; min-height: 28px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.warn { border-color:var(--gold); color:var(--gold-soft); background:transparent; }
.btn.danger { border-color:var(--odd-line); color:var(--odd-bright); background:rgba(242,54,69,.12); }

.feed, .list { display: flex; flex-direction: column; gap: 6px; }
.feed.empty, .list.empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 13px;
}
.card .title { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.card .teams { font-weight: 700; }
.card .meta { color: var(--muted); font-size: 12px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-size: 11px; padding: 1px 7px; border-radius: 2px;
  background: var(--hover-2); color: var(--muted);
}
.tag.good { background: var(--win-bg); color: var(--win-bright); }
.tag.bad { background: var(--odd-bg); color: var(--odd-bright); }
.tag.warn { background: rgba(201,162,39,.12); color: var(--gold-soft); }
.tag.info { background: var(--hover-2); color: var(--muted); }

.shout {
  white-space: pre-wrap; line-height: 1.45; font-size: 13px;
}
.shout .head { color: var(--win); font-weight: 800; }
.shout .time { color: var(--muted); font-size: 11px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.kpi-grid.kpi-core {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: transparent; border: none; padding: 0 !important;
}
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 8px); padding: 12px 14px;
  border-top-color: rgba(255,255,255,0.10);
}
.kpi .k { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: -0.2px; order: 2; }
.kpi .v { font-size: 30px; font-weight: 600; margin-top: 0; margin-bottom: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; order: 1; }
.kpi { display: flex; flex-direction: column; }
.kpi .v.up { color: var(--win); }
.kpi .v.down { color: var(--odd); }

.equity-wrap {
  position: relative;
  min-height: 180px;
  background: var(--panel-deep);
  border-radius: 3px;
  overflow: visible;
  border: 1px solid var(--line);
  cursor: crosshair;
}
.chart-hair { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.chart-hair i { position: absolute; display: block; background: rgba(236,236,239,.32); }
.chart-hair i.v { top: 0; bottom: 0; width: 1px; }
.chart-hair i.h { left: 0; right: 0; height: 1px; }
.chart-hair i.dot {
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--win); border: 1px solid var(--ink);
  box-shadow: 0 0 0 2px rgba(38,166,154,.28);
}
.chart-tip {
  position: absolute; z-index: 3; pointer-events: none;
  background: #16161c; border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 12px; line-height: 1.45; padding: 6px 8px; border-radius: 3px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45); white-space: nowrap;
}
.chart-tip .d { color: var(--muted-2); font-size: 11px; }

.daily-wrap { height: 140px; }
#equitySvg, #dailySvg { width: 100%; height: 100%; display: block; }
#equitySvg polyline { fill: none; stroke: var(--win); stroke-width: 2; }
#equitySvg path.area { fill: rgba(38, 166, 154, 0.18); stroke: none; }
#equitySvg .base { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 4; }
#equitySvg .grid { stroke: var(--line-strong); stroke-width: 1; opacity: 0.35; }
#equitySvg .ylab { fill: var(--muted-2); font-size: 10px; }
#dailySvg rect { stroke: none; }
#dailySvg rect.up { fill: var(--win); }
#dailySvg rect.down { fill: var(--odd); }
#dailySvg rect:hover { opacity: 0.75; }
#dailySvg .base { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 4; }
#dailySvg .ylab { fill: var(--muted-2); font-size: 10px; }

.buckets { display: grid; gap: 6px; padding-bottom: 6px; }
.bucket-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: start;
  background: var(--panel); border-radius: 3px; padding: 8px 10px; font-size: 12px;
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.bucket-row .up { color: var(--win); font-weight: 700; }
.bucket-row .down { color: var(--odd); font-weight: 700; }

.strat-form {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 14px;
}
.strat-form label {
  display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted);
}
.strat-form label.full, .strat-form .full { grid-column: 1 / -1; }
.strat-form input[type="number"] { width: 100%; padding: 4px 6px; }
.strat-form .chkline { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.strat-form select { width: 100%; }
.strat-form .hint { font-size: 10px; color: #6b6b73; }
.suggest {
  margin-top: 10px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 3px; padding: 10px; font-size: 13px; white-space: pre-wrap; line-height: 1.5;
}
.suggest.empty { color: var(--muted); }
.pos-actions { display: flex; gap: 8px; margin-top: 8px; }

.pnl-up, .up { color: var(--win); }
.pnl-down, .down { color: var(--odd); }

.card.scored { outline: 2px solid var(--gold); }
.card.dim { opacity: 0.55; }

/* 注单卡 */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.ticket { background: var(--panel); color: var(--ink); font-size: 13px; padding: 8px 10px; }
.ticket.dim { opacity: .55; }
.ticket.sig .ticket-b { background: var(--win-bg); }
.ticket.goal .ticket-h { background: #5a3d12; }
.ticket-h {
  background: var(--head);
  color: var(--ink-on);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticket-h .lg { font-size: 13px; opacity: .9; }
.ticket-h .vs { font-size: 13px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ticket-h .cash, .ticket-h .min {
  margin-left: auto;
  flex-shrink: 0;
}
.ticket-h .cash {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel3); color: var(--ink);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.ticket-h .min { font-size: 12px; font-weight: 700; opacity: .9; }
.ticket-b { padding: 6px 10px 6px; background: var(--panel); }
.ticket-kind { font-weight: 700; margin-bottom: 6px; font-size: 12px; }
.ticket-pick {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.ticket-pick .sel { font-weight: 700; }
.ticket-pick .ln { color: var(--gold); font-weight: 650; }
.ticket-pick .od { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket-pick .od.result-up { color: var(--win); }
.ticket-pick .od.result-down { color: var(--odd); }
.ticket-money {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 6px; font-variant-numeric: tabular-nums;
}
.ticket-money .win { color: var(--accent); font-weight: 700; }
.ticket-money .win.settled-up { color: var(--win); }
.ticket-money .win.settled-down { color: var(--odd); }
.ticket-money b { font-weight: 700; }
.ticket-meta {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: 12px;
}
.ticket-live {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ticket-live .up { color: var(--win); font-weight: 700; }
.ticket-live .down { color: var(--odd); font-weight: 700; }
.ticket-live .x {
  border: none; background: none; color: #999;
  font-size: 12px; cursor: pointer; padding: 0;
}
.ticket-live .x:hover { color: var(--odd); }
.ticket-foot {
  background: var(--head);
  color: var(--ink-on);
  padding: 8px 14px;
  display: flex; justify-content: space-between;
  font-weight: 650; font-variant-numeric: tabular-nums;
}
.ticket-foot .pnl-up { color: var(--win-bright); }
.ticket-foot .pnl-down { color: var(--odd-bright); }
.ticket .body-txt { white-space: pre-wrap; font-size: 13px; line-height: 1.45; margin: 0; }
.ticket-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

#view-pos .panel { background: transparent; border: none; padding: 0; }
#view-pos .section-h { padding: 8px 12px; margin-bottom: 10px; border-radius: 4px; }
#view-pos #posList { margin: 0; }

@media (max-width: 980px) {
  .settle-dist { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .strat-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .settle-dist { grid-template-columns: repeat(2, 1fr); }
  .strat-form { grid-template-columns: 1fr; }
  html, body { overflow: auto; }
  #app.mac-shell { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar.tabbar {
    width: 100%; min-width: 0; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px;
  }
  .side-brand { width: 176px; padding: 0; }
  .brand-mark-frame { width: 42px; height: 42px; flex-basis: 42px; }
  .brand-mark-img { width: 190px; left: -24px; top: -11px; }
  .side-stats { display: none; }
  .side-nav { flex-direction: row; flex: 1; }
  .titlebar { height: auto; padding: 10px 14px; flex-wrap: wrap; }
  .cal-cell { min-height: 52px; padding: 3px; }
  .cal-cell .p { font-size: 10px; }
  .acct-chip {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: auto;
    text-align: right;
  }
  .acct-chip .btn { margin-top: 4px; }
  .admin-table { font-size: 12px; display: block; overflow-x: auto; }
}

.bucket-group { margin-bottom: 12px; }
.bucket-h {
  background: var(--head);
  color: var(--ink-on);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 5px 10px;
  margin-bottom: 4px;
  border-radius: 3px;
}

.range-bar {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--line);
}
.range-bar input[type="date"] { width: auto; min-width: 132px; }
.cal-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 12px 8px; font-weight: 700;
}
.cal-grid { padding: 0 12px 12px; }
.cal-week, .cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-wd {
  text-align: center; font-size: 13px; color: var(--ink-on); font-weight: 800;
  padding: 4px 0;
}
.cal-cell {
  min-height: 56px;
  background: #1c1c22;
  border: 1px solid #33333c;
  border-radius: 3px;
  padding: 4px 5px;
  text-align: left;
  display: flex; flex-direction: column; gap: 2px;
  color: #f2f2f6;
}
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell .d { font-weight: 900; font-size: 14px; color: #fff;  }
.cal-cell .n { font-size: 13px; color: #fff; font-weight: 800;  }
.cal-cell .p { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums;  letter-spacing: 0.01em; }
.cal-cell.today { outline: 2px solid #c8c8d0; outline-offset: 0; }
/* 圈外不再整格压透明度（会糊字）；空日略淡，有数据仍清晰 */
.cal-cell.out:not(.up):not(.down):not(.flat) {
  background: #141418;
  border-color: var(--hover-2);
}
.cal-cell.out:not(.up):not(.down):not(.flat) .d { color: #c8c8d0; font-weight: 800; }
.cal-cell.out.up,
.cal-cell.out.down,
.cal-cell.out.flat { opacity: 1; }
.cal-cell.in { border-color: #5a5a66; box-shadow: inset 0 0 0 1px rgba(232,232,236,.18); }
.cal-cell.up { background: #000; border-color: var(--line-strong); }
.cal-cell.up .p { color: var(--win); }
.cal-cell.up .n { color: var(--ink); }
.cal-cell.down { background: #000; border-color: var(--line-strong); }
.cal-cell.down .p { color: var(--odd); }
.cal-cell.down .n { color: var(--ink); }
.cal-cell.flat { background: var(--panel3); border-color: #44444e; }
.cal-cell.flat .p { color: var(--ink-2); }
.cal-cell:not(.empty):hover { filter: none; border-color: #555; }
/* cal-list-20260917 · 日历「列表」视图 = 按日汇总表（日期/投注金额/有效金额/赢输 + 总计） */
.cal-view-bar { margin-left: auto; }
.cal-view-bar button {
  font-size: 12px; padding: 2px 10px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer;
}
.cal-view-bar button.on {
  background: var(--win); border-color: transparent; color: var(--ink-on); font-weight: 700;
}
.cal-list { padding: 0 12px 12px; }
.cal-note { margin: 0; padding: 7px 10px; color: var(--muted-2); font-size: 11px; }
.cal-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cal-table th {
  background: #000; color: #fff; font-weight: 800; font-size: 12px;
  text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
  letter-spacing: .02em;
}
.cal-table th:first-child { text-align: left; }
.cal-table td { padding: 7px 10px; font-size: 13px; color: var(--ink-2); }
.cal-table tbody tr:nth-child(odd) { background: rgba(255,255,255,.03); }
.cal-table tbody tr { cursor: pointer; }
.cal-table tbody tr:hover { background: var(--hover-2); }
.cal-table .c-day { text-align: left; line-height: 1.35; }
.cal-table .c-day b { display: block; font-size: 13px; color: #fff; font-weight: 800; }
.cal-table .c-day span { display: block; font-size: 11px; color: var(--muted-2); }
.cal-table .c-num { text-align: right; font-weight: 700; }
.cal-table .c-num small { display: block; color: var(--muted-2); font-size: 10px; font-weight: 500; }
.cal-table .c-pnl.up { color: var(--win); }
.cal-table .c-pnl.down { color: var(--odd); }
.cal-table .c-pnl.flat { color: var(--ink-2); }
.cal-table tfoot td {
  border-top: 2px solid var(--line-strong); background: #000;
  font-weight: 900; color: #fff; padding: 9px 10px;
}
.cal-table tfoot .c-day b { font-size: 13px; }
#app.role-user .nav-item[data-tab="strat"] { display: none !important; }
#app.role-user #view-admin { display: none !important; }
#app.role-user .ops-only { display: none !important; }
/* seatradar1：雷达对订阅席位只读开放；试用/无席位仍隐藏（#app.no-radar） */
#app.no-radar .perm-radar,
#app.no-radar .nav-item[data-tab="watch"],
#app.no-radar #view-watch { display: none !important; }
#app.role-user #labConsolePanel { display: none !important; }
/* permrevoke2：无撤销权限才藏 data-close（勿用 role-user 一刀切） */
#app.no-revoke [data-close] { display: none !important; }
#app.role-ops .user-only { display: none !important; }

#app.no-bridge .perm-bridge,
#app.no-bridge .btn-locate { display: none !important; }
#app.no-revoke .perm-revoke { display: none !important; }
#app.no-stats .perm-stats,
#app.no-stats #view-stats { display: none !important; }
/* wallopen（2026-10-06）：「放开持仓」——只推信号号也看持仓/大屏/侧栏持仓数，只保留扫描列表隐藏 */
#app.shout-only .perm-scan { display: none !important; }
/* wallopen：客户不显示「席位」入口与付款页（续费联系运营）；运营不受影响 */
#app.role-user .nav-item[data-tab="sub"],
#app.role-user .mobile-more-item[data-more-tab="sub"],
#app.role-user #view-sub { display: none !important; }
body.cust .sc-sub { display: none !important; }
#app.no-stats a[href^="wall.html?view=pnl"] { display: none !important; }
#app.shout-only .split { display: block; }
.perm-checks { display: flex; flex-direction: column; gap: 2px; font-size: 12px; white-space: nowrap; }
.perm-checks label { display: flex; align-items: center; gap: 4px; cursor: pointer; }

.acct-chip {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--veil-line);
  font-size: 12px;
  color: var(--muted-2);
}
.acct-chip .acct-name {
  color: var(--ink-on);
  font-weight: 700;
  font-size: 13px;
}
.acct-chip .acct-remain { margin-top: 4px; color: var(--muted-2); }
.acct-chip .btn {
  margin-top: 4px;
  color: var(--ink-on);
  border-color: rgba(255,255,255,.25);
}

.gate, .pay-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pay-gate {
  z-index: 70;
  background: rgba(14, 15, 18, 0.78);
}
body.guest #app { display: none !important; }
.gate-card {
  background: #0d0f14;
  border: 1px solid #1f232c;
  border-radius: 10px;
  padding: 24px 24px 22px;
  width: min(440px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,.65);
  color: var(--ink);
}
.gate-brand {
  background: #000;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #1b1e26;
  box-shadow: inset 0 0 20px rgba(0,0,0,.5);
}
.gate-logo {
  display: block;
  width: 100%;
  max-height: 120px;
  height: auto;
  object-fit: contain;
  margin: 0;
  pointer-events: none;
}
.gate { overflow: auto; }
.gate-safety {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 11px;
  text-align: center;
  letter-spacing: .03em;
  text-align: center;
}
.gate-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}
.gate-card > .sub {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 12px;
}
.gate-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.gate-card input[type="text"],
.gate-card input[type="password"] {
  width: 100%;
  padding: 8px 10px;
}
.gate-card .row { margin: 4px 0 8px; }
.gate-hint {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.gate-err {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--danger);
}

#opsPanel input[type="text"] { width: 140px; }

.admin-grant { padding: 10px 12px; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--panel); color: var(--ink); }
.admin-table th, .admin-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--head); color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; position: sticky; top: 0; z-index: 1; }
.admin-table tr:nth-child(even) td { background: var(--panel2); }
.admin-table .ops { color: var(--gold); font-weight: 700; }
.admin-table .ok { color: var(--win); }
.admin-table .dead { color: var(--odd); }
.admin-table .off { color: var(--muted); }
.admin-table .acts { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-note { width: 100%; max-width: 120px; font-size: 11px; padding: 2px 6px; }
.audit-list { margin-top: 14px; font-size: 12px; color: var(--muted); }
.audit-list .audit-row { padding: 4px 0; border-bottom: 1px solid var(--line); }

/* AI 研究审计日报（admin tab 只读视图） */
.audit-daily-date { margin-left: 8px; padding: 2px 8px; font-size: 12px; }
.audit-daily-body { margin-top: 12px; }
.ad-overall { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; }
.ad-badge {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
.ad-badge.pass { background: rgba(46, 164, 79, 0.15); color: #2ea44f; }
.ad-badge.warn { background: rgba(210, 153, 34, 0.15); color: #d29922; }
.ad-badge.block { background: rgba(218, 54, 51, 0.15); color: #da3633; }
.ad-badge.none { background: var(--line); color: var(--muted); }
.ad-date { font-size: 14px; font-weight: 600; color: var(--ink); }
.ad-sections { border-top: 1px solid var(--line); }
.ad-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px;
}
.ad-row .ad-name { min-width: 150px; font-weight: 600; color: var(--ink); }
.ad-row .ad-sum { color: var(--muted); flex: 1; }
.ad-raw { margin-top: 10px; }
.ad-raw summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.ad-md {
  max-height: 420px; overflow: auto; margin-top: 8px;
  padding: 10px; font-size: 11px; line-height: 1.5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  white-space: pre-wrap; word-break: break-word;
}
.sub-lead { padding: 4px 12px 12px; color: var(--muted); font-size: 13px; }
.sub-packs { display: flex; gap: 12px; padding: 0 12px 16px; flex-wrap: wrap; }
.sub-pack {
  flex: 1; min-width: 140px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 18px 14px; text-align: left;
}
.sub-pack:hover { border-color: var(--head); }
.sub-pack b { display: block; font-size: 16px; color: var(--ink); }
.sub-pack span { display: block; margin-top: 8px; color: var(--ink); font-weight: 600; font-size: 28px; letter-spacing: -0.5px; }
#subMsg { padding: 0 12px 16px; }

.sub-pack.on { border-color: var(--muted-2); box-shadow: 0 0 0 1px var(--muted-2); }
.pay-box {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 8px 12px 16px; flex-wrap: wrap;
}
.pay-box img {
  width: 180px; height: 180px; object-fit: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
}
.pay-box img.missing { display: none; }
.pay-box p { margin: 0 0 8px; font-size: 14px; }
.pay-pending { padding: 8px 12px; }
.pay-pending .row-p {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 12px;
}

.settle-dist {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px 12px 12px;
}
.settle-cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
}
.settle-cell .k { color: var(--muted); font-size: 11px; }
.settle-cell .v {
  font-size: 16px; font-weight: 700; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.settle-cell .pnl {
  font-size: 11px; margin-top: 4px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.settle-cell .v.up, .settle-cell .pnl.up { color: var(--win); }
.settle-cell .v.down, .settle-cell .pnl.down { color: var(--odd); }
.bucket-row .settle-mini {
  display: block; margin-top: 4px; color: var(--muted);
  font-size: 11px; line-height: 1.55; font-weight: 400;
}

#settleDist { padding: 4px 0 8px; }
.settle-block { margin-bottom: 10px; }
.settle-block:last-child { margin-bottom: 0; }
.settle-block .bucket-h { margin: 0 12px 4px; }
.settle-block .settle-dist { padding-top: 0; }

.bucket-row.thin { opacity: .62; }
.bucket-row .tag { margin-left: 6px; vertical-align: middle; }

.btn-locate { margin-left: 6px; }
#locateHint { min-height: 1em; }
select#locateSite { min-width: 260px; max-width: min(420px, 92vw); width: 320px; }

/* 新建仓醒目提示 */
.open-alert {
  position: fixed;
  top: 52px; right: 16px; left: auto;
  width: min(340px, calc(100vw - 32px));
  z-index: 200;
  background: var(--head);
  color: var(--ink);
  border: 1px solid #c41e3a;
  border-radius: 6px;
  padding: 10px 12px 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  cursor: pointer;
}
.open-alert.hidden, .open-alert[hidden] { display: none !important; }
.open-alert .k {
  font-size: 12px; font-weight: 800; letter-spacing: .28em; opacity: .92;
}
.open-alert .t {
  font-size: 15px; font-weight: 700; line-height: 1.35; margin-top: 4px;
}
.open-alert .sub {
  font-size: 14px; font-weight: 650; margin-top: 4px; opacity: .95;
}
@keyframes openPulse {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}
.ticket.fresh {
  outline: 3px solid #c41e3a;
  outline-offset: -3px;
  animation: ticketFlash 1s ease-in-out 5;
}
.ticket.fresh .ticket-h { background: #c41e3a; }
@keyframes ticketFlash {
  0%,100% { background: var(--panel); }
  50% { background: #3a1820; }
}
#app.got-open .nav-item[data-tab="watch"] {
  animation: navPulse 1s ease-in-out infinite;
  color: var(--ink-on) !important;
  background: #c41e3a !important;
}
@keyframes navPulse {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* terminal densify */
.controls .row { gap: 8px; }

.range-bar .btn.tiny {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  border-radius: 4px;
}
.range-bar .btn.tiny:hover { color: var(--ink); background: var(--hover-2); }
.range-bar .btn.tiny.primary, .range-bar .btn.tiny.on, .range-bar .btn.tiny.active {
  background: var(--panel3);
  color: var(--ink-on);
  box-shadow: inset 0 -2px 0 var(--muted-2);
}

/* cockpit v5 */
html { scrollbar-width: thin; scrollbar-color: var(--line-strong) #0e0f12; }
#view-stats.view.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#statsFilter { margin-bottom: 0; }
#kpiGrid.kpi-grid, #sec-kpi .kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
#equitySvg path.area.down { fill: rgba(242, 54, 69, 0.18); }
@media (max-width: 1100px) {
  #view-stats.view.active { display: flex; flex-direction: column; }
}

/* shout tape (blotter density below) */
#lastTickEl {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-deep);
}

.pair-bar:not(.hidden) {
  display: block;
}
.pair-bar.hidden { display: none !important; }
.pair-bar::before {
  content: "";
  position: fixed;
  inset: 0;
  right: min(380px, 92vw);
  background: rgba(0,0,0,.28);
  z-index: -1;
}
#pairDock.nav-item.has-msg {
  color: var(--gold);
  font-weight: 700;
}
#pairDock.nav-item .msg-n {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  opacity: .85;
}

/* blotter density tv22 — shout tickets match holdings */
#shoutFeed.ticket-list {
  gap: 0;
  background: transparent;
  border-radius: 4px;
}
#shoutFeed.ticket-list .ticket {
  display: grid;
  grid-template-columns: minmax(120px,1.5fr) minmax(0,1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 8px 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
#shoutFeed.ticket-list .ticket:hover { background: var(--hover); }
#shoutFeed.ticket-list .ticket-h {
  background: transparent;
  color: var(--ink);
  padding: 0;
  gap: 8px;
}
#shoutFeed.ticket-list .ticket-h .lg {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  opacity: 1;
}
#shoutFeed.ticket-list .ticket-h .vs {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  letter-spacing: 0;
  color: var(--ink);
  text-transform: none;
}
#shoutFeed.ticket-list .ticket-b {
  grid-column: 1 / -1;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  background: transparent;
}
#shoutFeed.ticket-list .ticket-kind {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
  width: 100%;
}
#shoutFeed.ticket-list .ticket-pick {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}
#shoutFeed.ticket-list .ticket-money {
  margin: 0;
  gap: 8px;
  font-size: 12px;
}
#shoutFeed.ticket-list .ticket-meta {
  font-size: 10px;
  margin: 0;
}
#shoutFeed.ticket-list .ticket-live {
  margin: 0;
  padding: 0;
  border: none;
  margin-left: auto;
  font-size: 11px;
}
#shoutFeed.ticket-list .ticket .body-txt {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
  color: var(--ink);
}
#shoutFeed.ticket-list .ticket.fresh {
  outline: none;
  box-shadow: inset 3px 0 0 var(--shout);
  animation: ticketFlash 1s ease-in-out 5;
}
#shoutFeed.ticket-list .ticket.fresh .ticket-h { background: transparent; }
#shoutFeed.ticket-list .btn.tiny {
  padding: 0 10px;
  min-height: 28px;
  font-size: 12px;
  margin-left: 0;
}
#shoutFeed.ticket-list .btn-locate {
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
  margin-left: 0;
}

#posList.ticket-list { gap: 0; background: transparent; }
#posList.ticket-list .ticket {
  display: grid;
  grid-template-columns: minmax(120px,1.5fr) minmax(0,1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 8px 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
}
#posList.ticket-list .ticket:hover { background: var(--hover); }
#posList.ticket-list .ticket-h {
  background: transparent;
  color: var(--ink);
  padding: 0;
  gap: 8px;
}
#posList.ticket-list .ticket-h .lg {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  opacity: 1;
}
#posList.ticket-list .ticket-h .vs {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
}
#posList.ticket-list .ticket-b {
  grid-column: 1 / -1;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
#posList.ticket-list .ticket-kind {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
  width: 100%;
}
#posList.ticket-list .ticket-pick {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}
#posList.ticket-list .ticket-money {
  margin: 0;
  gap: 8px;
  font-size: 12px;
}
#posList.ticket-list .ticket-meta {
  font-size: 10px;
  margin: 0;
}
#posList.ticket-list .ticket-live {
  margin: 0;
  padding: 0;
  border: none;
  margin-left: auto;
  font-size: 11px;
}
#posList.ticket-list .ticket-live .up,
#posList.ticket-list .ticket-live .down,
#posList.ticket-list .pnl-up,
#posList.ticket-list .pnl-down {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#posList.ticket-list .ticket-live .x,
#posList.ticket-list .btn.tiny {
  padding: 0 10px;
  min-height: 28px;
  font-size: 12px;
}
#posList.ticket-list .btn-locate {
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
}
#posList.ticket-list .ticket-foot {
  padding: 6px 8px;
  font-size: 12px;
}

.admin-table tbody tr:hover td { background: var(--hover); }
.admin-table .acts .btn,
.admin-table .acts .btn.tiny {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 6px;
}
.admin-table .acts .btn:hover { color: var(--ink); border-color: var(--line-strong); }

.pay-gate .gate-card h2 { color: var(--ink); }
.tid { font-size:12px; color:var(--muted); font-weight:500; opacity:.7; }
.ticket-ops { margin-left:auto; display:flex; align-items:center; gap:6px; flex-shrink:0; }
#posList .btn-locate, #shoutFeed .btn-locate { margin-left:auto; font-size:14px; font-weight:700; }
.btn.btn-warn { background:#2a2314; border:1px solid var(--gold); color:var(--gold-soft); }

#candLogMeta { margin: 4px 12px 8px; }
.cand-mini table.mini-cand { width:100%; font-size:11px; color:var(--muted); border-collapse:collapse; }
.cand-mini table.mini-cand th,.cand-mini table.mini-cand td { padding:2px 6px; border-bottom:1px solid var(--line); text-align:left; }

.diag-fold { margin-top: 12px; color: var(--muted); font-size: 12px; }
.diag-fold summary { cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; }
.diag-fold summary::-webkit-details-marker { display: none; }
.diag-fold summary::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: 8px;
  border-style: solid; border-width: 4px 0 4px 5px; border-color: transparent transparent transparent #6b6b73; }
.diag-fold[open] summary::before { transform: rotate(90deg); }
.empty-pos { padding: 28px 12px 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.empty-pos .lead { color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-pos .recent { margin-top: 16px; }
.empty-pos .recent .h { font-size: 12px; margin-bottom: 6px; }
.empty-pos .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }

.view.active { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.shout-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 8px; }
.shout-filters .f-row { display: flex; gap: 4px; flex-wrap: wrap; }
.shout-filters button {
  font-size: 12px; padding: 4px 8px; border-radius: 4px; color: var(--muted);
  background: transparent; border: 1px solid transparent;
}
.shout-filters button.on { background: var(--panel3); color: var(--ink-on); }
.shout-filters button:hover { color: var(--ink); background: var(--hover-2); }

#shoutFeed.ticket-list .ticket.tape {
  display: grid;
  grid-template-columns: minmax(88px, .9fr) minmax(0, 1.6fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 10px;
}
#shoutFeed.ticket-list .ticket.tape .t-left { min-width: 0; }
#shoutFeed.ticket-list .ticket.tape .t-mid { min-width: 0; }
#shoutFeed.ticket-list .ticket.tape .t-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
#shoutFeed.ticket-list .ticket.tape .t-right .win { color: var(--win); }
#shoutFeed.ticket-list .ticket.tape .vs,
#shoutFeed.ticket-list .ticket.tape .sc,
#shoutFeed.ticket-list .ticket.tape .clk,
#shoutFeed.ticket-list .ticket.tape .min { font-variant-numeric: tabular-nums; }
#shoutFeed.ticket-list .ticket.tape .t-more {
  grid-column: 1 / -1;
  font-size: 11px; color: var(--muted);
}
#shoutFeed.ticket-list .ticket.tape .t-more summary { cursor: pointer; color: var(--muted); }
#shoutFeed.ticket-list .ticket.tape .ticket-h,
#shoutFeed.ticket-list .ticket.tape .ticket-b { display: contents; }

.suggest { display: flex; flex-direction: column; gap: 8px; }
.sg-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-size: 13px;
}
.sg-card .sg-h { font-weight: 650; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.sg-card .sg-why { color: var(--muted); font-size: 12px; }
.sg-card .sg-st { margin-top: 6px; font-size: 11px; color: var(--muted); }
.sg-card .sg-st.ok { color: var(--win); }
.sg-card .sg-st.warn { color: var(--warn); }

.empty-pos .scan { margin: 8px 0 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.empty-pos .scan b { color: var(--ink); font-weight: 650; }

#btnSaveStrat.dirty { box-shadow: inset 0 0 0 1px var(--warn); }

/* pair review centered overlay */
#app.pair-open .content { /* drawer overlays; no layout shift */ }
.pair-head .pair-x { float: right; font-size: 12px; color: var(--accent); }

/* ── 操盘手键盘流 (Keyboard-First Flow) ── */
.ticket {
  transition: outline .1s ease, background .1s ease, box-shadow .1s ease;
}
.ticket.focused {
  outline: 2px solid var(--win) !important;
  outline-offset: -2px;
  background: var(--hover) !important;
  box-shadow: inset 3px 0 0 var(--win), 0 0 14px rgba(38, 166, 154, 0.25) !important;
}
.ticket.focused .btn-locate {
  background: var(--win) !important;
  color: var(--ink-on) !important;
  border-color: transparent !important;
  box-shadow: 0 0 8px rgba(38, 166, 154, 0.5) !important;
}

#btnShortcutsHelp {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  color: var(--muted-2);
  border: 1px solid var(--panel3);
}
#btnShortcutsHelp:hover {
  color: var(--ink-on);
  border-color: #3f3f4a;
  background: var(--hover);
}

.shortcut-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 11, 14, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.shortcut-modal.hidden { display: none !important; }
.shortcut-dialog {
  background: #141418;
  border: 1px solid var(--panel3);
  border-radius: 8px;
  width: min(520px, 95vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: var(--ink);
  animation: modalPop .15s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.shortcut-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #18181e;
  border-bottom: 1px solid var(--panel3);
}
.shortcut-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-on);
  letter-spacing: 0.02em;
}
.shortcut-close {
  background: var(--hover-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.shortcut-close:hover {
  color: var(--ink-on);
  background: #2f2f38;
}
.shortcut-body {
  padding: 16px 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
}
.shortcut-group h4 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #222228;
  padding-bottom: 4px;
}
.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
}
.sc-row span {
  color: #c8c8ce;
}
.sc-keys {
  display: flex;
  gap: 4px;
  align-items: center;
}
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  background: #22222a;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 2px 0 #111116;
}

/* ── 自定义极细暗黑终端滚动条 ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #25252e;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f4e;
}

/* ── 金融级图表 Tooltip 与 Crosshair 增强 ── */
.chart-hair i { background: rgba(38, 166, 154, 0.45); }
.chart-hair i.dot {
  box-shadow: 0 0 10px rgba(38, 166, 154, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.chart-tip {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  background: rgba(20, 20, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #3a3a46;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.chart-tip .tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-tip .tt-seq {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
}
.chart-tip .tt-time {
  font-size: 11px;
  color: var(--muted-2);
}
.chart-tip .tt-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 3px 0 4px;
}
.chart-tip .tt-lbl {
  font-size: 11px;
  color: var(--muted);
}
.chart-tip .tt-val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chart-tip .tt-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.chart-tip .tt-ticket {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.chart-tip .tt-vs {
  font-weight: 700;
  color: var(--ink-on);
  font-size: 12px;
}
.chart-tip .tt-match-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted-2);
}
.chart-tip .tag {
  font-size: 10px;
  padding: 1px 6px;
}

/* ── 宽屏三栏平铺工作台 (Tri-Pane Cockpit) ── */
#btnCockpitToggle {
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 4px;
}
#btnCockpitToggle.active {
  background: #1e3a34;
  color: var(--win-bright);
  border-color: var(--win);
  box-shadow: 0 0 8px rgba(38, 166, 154, 0.35);
}
#app.cockpit-tiled .workspace {
  overflow: hidden;
}
#app.cockpit-tiled .content {
  display: grid !important;
  grid-template-columns: 1.18fr 1.02fr 0.95fr !important;
  gap: 12px !important;
  height: calc(100vh - var(--title-h)) !important;
  padding: 10px 14px 14px !important;
  overflow: hidden !important;
}
#app.cockpit-tiled .view {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
}
#app.cockpit-tiled .view .panel {
  margin-bottom: 8px !important;
}
#app.cockpit-tiled .view .panel.grow {
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
#app.cockpit-tiled #shoutFeed,
#app.cockpit-tiled #posList {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 12px !important;
}
#app.cockpit-tiled #view-stats {
  overflow-y: auto !important;
  padding-right: 4px !important;
}
#app.cockpit-tiled #view-stats .panel {
  padding-bottom: 8px;
}
#app.cockpit-tiled .view:not(#view-watch):not(#view-pos):not(#view-stats) {
  display: none !important;
}

/* settings page */
.settings-panel .settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 4px 12px 16px;
  max-width: 980px;
}
@media (min-width: 900px) {
  .settings-panel .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.settings-card {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.settings-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-on);
}
.settings-card .row { margin-top: 8px; }
.titlebar-left .locate-hint-live:empty { display: none; }
.titlebar-left .locate-hint-live {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* bet audit trail */
.audit-trail {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px dashed var(--panel3);
  padding-top: 2px;
}
.audit-trail summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  color: #9a9aa3;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}
.audit-trail summary::-webkit-details-marker { display: none; }
/* CSS content 会吞掉首尾空白，必须用 \00a0(nbsp) 才不会与相邻文字粘连 */
.audit-trail summary::before { content: "▸\00a0"; opacity: 0.7; }
.audit-trail[open] summary::before { content: "▾\00a0"; }
.audit-trail summary:hover { color: #d0d0d8; background: #222228; }
.audit-trail .audit-body {
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--panel-deep);
  border: 1px solid var(--panel3);
  border-radius: 4px;
  line-height: 1.45;
  max-height: 140px;
  overflow: auto;
}
.audit-trail .audit-body b { color: #d8d8de; font-weight: 600; }


.recon-ok { color: #7dcea0; }
.recon-bad { color: #e07a7a; }
.recon-warn { color: var(--gold); }
.backup-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.backup-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; background: #0e0e12; border: 1px solid var(--line); border-radius: 6px;
  color: #c8c8d0;
}
.backup-row .nm { font-variant-numeric: tabular-nums; }


/* 结论可信 · 未见数据 */
.research-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.research-kpis > div {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}
.research-kpis b { font-size: 12px; }


/* dark date picker icon — high contrast on var(--panel-deep) */
input[type="date"] {
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-left: 4px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='2.5' width='13' height='12' rx='1.5' fill='none' stroke='%23e8e8ec' stroke-width='1.4'/%3E%3Cpath d='M1.5 6h13' stroke='%23e8e8ec' stroke-width='1.4'/%3E%3Cpath d='M5 1v3M11 1v3' stroke='%23e8e8ec' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  /* kill native dark glyph; our SVG is already light */
  filter: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: brightness(1.25);
}

/* 持仓四组：赛事 | 入场 | 试算状态 | 操作 */
.pos-card {
  display: grid;
  grid-template-columns: minmax(120px, 1.35fr) minmax(110px, 1.05fr) minmax(110px, 1.05fr) auto;
  gap: 4px 12px;
  align-items: start;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.pos-card .pc-audit {
  grid-column: 1 / -1;
  margin-top: 0;
}
#posList.pos-list { display: flex; flex-direction: column; gap: 6px; }
#posList.pos-list.compact { gap: 4px; }
#posList.pos-list.compact .pos-card {
  padding: 5px 8px;
  gap: 2px 8px;
  font-size: 12px;
}
#posList.pos-list.compact .pos-card .pc-label { display: none; }
#posList.pos-list.compact .pos-card .pc-league { font-size: 12px; }
#posList.pos-list.compact .pos-card .pc-vs { font-size: 13px; margin-top: 0; }
#posList.pos-list.compact .pos-card .pc-live,
#posList.pos-list.compact .pos-card .pc-money { margin-top: 1px; font-size: 12px; font-variant-numeric: tabular-nums; }
#posList.pos-list.compact .pos-card .pc-audit .audit-trail:not([open]) { margin: 0; }
#posList.pos-list.compact .pos-card .pc-audit .audit-trail:not([open]) summary {
  padding: 0 2px; font-size: 12px; opacity: 0.75;
}
.pos-card .pc-league { color: var(--muted); font-size: 12px; }
.pos-card .pc-vs { font-weight: 700; font-size: 14px; margin-top: 2px; }
.pos-card .pc-live { margin-top: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pos-card .pc-live .muted { color: var(--muted); }
.pos-card .pc-label { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.pos-card .pc-pick { font-weight: 700; }
.pos-card .pc-quote {
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pos-card .pc-money { margin-top: 4px; font-size: 12px; color: var(--muted); }
.pos-card .pc-money b { color: var(--ink); font-weight: 650; }
.pos-card .pc-status-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--panel3);
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.pos-card .pc-trial { font-size: 12px; color: var(--muted); }
.pos-card .pc-trial .up { color: var(--win); font-weight: 700; }
.pos-card .pc-trial .down { color: var(--odd); font-weight: 700; }
.pos-card .pc-ops { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pos-card .pc-ops .btn { width: 100%; }
@media (max-width: 900px) {
  .pos-card { grid-template-columns: 1fr 1fr; }
  .pos-card .pc-ops { flex-direction: row; }
}
.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.stats-tabs button {
  font-size: 12px;
  padding: 0 12px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--head);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.stats-tabs button.on {
  color: var(--ink);
  border-color: var(--win);
  background: var(--win-bg);
}
.equity-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}
#equitySvg .endlab { fill: var(--accent); font-size: 11px; font-weight: 650; }
#equitySvg .xlab { fill: var(--muted-2); font-size: 10px; }
#equitySvg .base { stroke: #6a6a74; stroke-width: 1.25; stroke-dasharray: 5 4; }


/* 资金曲线：轴标/末值 HTML，不随 SVG 横向拉伸 */
.equity-wrap {
  padding: 4px 8px 22px 36px;
  box-sizing: border-box;
}
.equity-wrap #equitySvg {
  width: 100%;
  height: 180px;
  display: block;
}
.equity-end-lab {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2px 8px;
  pointer-events: none;
  white-space: nowrap;
}
.equity-end-lab.up { color: #5eead4; border-color: #2f6b56; }
.equity-end-lab.down { color: var(--odd-bright); border-color: var(--odd-line); }
.equity-x-labs {
  position: absolute;
  left: 36px;
  right: 8px;
  bottom: 2px;
  height: 18px;
  pointer-events: none;
}
.equity-x-labs span {
  position: absolute;
  font-size: 10px;
  color: #b0b0b8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.equity-x-labs span.x-mid { transform: translateX(-50%); }
.equity-x-labs span.x-start { transform: translateX(0); }
.equity-x-labs span.x-end { transform: translateX(-100%); }
.equity-y-labs {
  position: absolute;
  left: 2px;
  top: 8px;
  bottom: 24px;
  width: 34px;
  pointer-events: none;
}
.equity-y-labs span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: 10px;
  color: #b0b0b8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#btnPosCompact.on {
  border-color: var(--win);
  color: var(--ink);
}

.equity-wrap.eq-empty #equitySvg { opacity: 0.25; }
.equity-wrap.eq-empty { min-height: 72px; }

.equity-empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  color: #d0d0d8;
  background: var(--panel-deep);
  border-radius: 3px;
}
.equity-wrap.eq-empty #equitySvg,
.equity-wrap.eq-empty .equity-y-labs,
.equity-wrap.eq-empty .equity-x-labs,
.equity-wrap.eq-empty .equity-end-lab { display: none !important; }
.equity-wrap.eq-empty { min-height: 88px; padding: 0; }
.equity-wrap.eq-empty .equity-empty { display: flex; }
.equity-empty[hidden] { display: none !important; }

.equity-mode-bar {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.equity-mode-bar.hidden { display: none !important; }
.equity-mode-bar .btn.on {
  border-color: var(--win);
  color: var(--ink);
  background: #1a2e2a;
}
.section-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eq-empty-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.eq-empty-sub {
  font-size: 12px;
  color: #a8a8b0;
  margin-bottom: 12px;
}
.eq-empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.equity-empty {
  flex-direction: column;
}

/* —— Phase2: status dots / hierarchy / pos scan / equity dd —— */
.st-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  background: var(--line-strong);
}
.st-dot.run { background: var(--win); box-shadow: 0 0 8px rgba(38,166,154,.7); }
.st-dot.idle { background: #6a6a74; }
.hb-bar { max-width: 280px; }
.hb-bar.ok #hbMs { color: #9ee4dc; font-weight: 650; }

.pos-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.pos-filters, .pos-sorts { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pos-filters .btn.on, .pos-sorts .btn.on {
  border-color: var(--win); color: var(--ink); background: #1a2e2a;
}

.pos-card .pc-vs { font-weight: 800; font-size: 15px; color: #f2f2f6; } /* L1 */
.pos-card .pc-score { font-weight: 800; font-size: 15px; color: #f2f2f6; font-variant-numeric: tabular-nums; }
.pos-card .pc-pnl { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; } /* L1 */
.pos-card .pc-pick { font-weight: 700; font-size: 13px; color: var(--ink-2); } /* L2 */
.pos-card .pc-money { font-size: 12px; color: var(--accent); } /* L2 */
.pos-card .pc-league,
.pos-card .pc-meta { font-size: 12px; color: var(--muted-2); } /* L3 */
.pos-card .pc-label { display: none; }

.pos-card.late {
  border-color: #6a5a2a;
  box-shadow: inset 3px 0 0 var(--gold-soft);
}
.pos-card .pc-min.late { color: var(--gold-soft); font-weight: 750; }
.tag-late {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  border-radius: 3px; font-size: 10px; font-weight: 700;
  color: var(--gold-soft); border: 1px solid #6a5a2a; background: #2a2414;
}
.tag-score {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 700; color: var(--win-bright); background: var(--win-bg); border: 1px solid var(--win-line);
}
.pos-card.score-hit {
  box-shadow: inset 3px 0 0 var(--win);
}
.tag-inc {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  border-radius: 3px; font-size: 10px; font-weight: 650;
  color: var(--muted); border: 1px dashed #4a4a55; background: transparent;
}
.pos-card.incomplete { border-style: dashed; }


/* bridgebtn1：普通用户持仓直接「桥接」加大字号 */
#posList .btn-locate-direct,
.pos-ticket .btn-locate-direct {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  min-height: 34px;
  border-radius: 6px;
}
@media (max-width: 720px) {
  #posList .btn-locate-direct,
  .pos-ticket .btn-locate-direct {
    font-size: 17px;
    padding: 8px 16px;
    min-height: 40px;
  }
}

.pc-menu { position: relative; }
.pc-menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 12px; color: var(--muted); padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 4px;
}
.pc-menu > summary::-webkit-details-marker { display: none; }
.pc-menu[open] > summary { color: var(--ink); border-color: var(--win); }
.pc-menu-body {
  position: absolute; right: 0; top: 100%; z-index: 5;
  margin-top: 4px; padding: 6px; min-width: 88px;
  background: var(--head); border: 1px solid #33333c; border-radius: 6px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
}

#shoutFeed .ticket .vs,
#shoutFeed .ticket .sel { font-weight: 800; color: #f2f2f6; }
#shoutFeed .ticket .lg,
#shoutFeed .ticket .clk,
#shoutFeed .ticket .min { color: var(--muted-2); font-size: 11px; }
#shoutFeed .t-col.t-right { font-variant-numeric: tabular-nums; }

#equitySvg .dd-band { fill: rgba(242, 54, 69, 0.10); stroke: none; }
#equitySvg .peak-dot { fill: var(--gold-soft); stroke: var(--panel-deep); stroke-width: 1; }

.eq-sep {
  width: 1px; height: 16px; background: #33333c; margin: 0 4px;
}
.eq-sep.hidden, .equity-mode-bar .btn.hidden { display: none !important; }

.density-bar { display: inline-flex; gap: 4px; margin-left: 8px; }
.density-bar .btn.on { border-color: var(--win); color: var(--ink); background: #1a2e2a; }
.theme-choice-bar { margin-left: 0; }
.theme-choice-bar .btn.on { background: var(--select-bg, var(--hover-2)); }
html[data-theme="light"] .density-bar .btn.on,
html[data-theme="paper"] .density-bar .btn.on { background: var(--win-bg); }

#app.density-compact .content { padding: 8px 10px 14px; }
#app.density-compact .panel { padding: 8px 10px; }
#app.density-compact .pos-card { padding: 5px 8px; gap: 2px 8px; font-size: 12px; }
#app.density-compact #shoutFeed .ticket { padding: 6px 8px; }
#app.density-compact .kpi { padding: 8px 10px; }
#app.density-compact .section-h h2 { font-size: 15px; }

#view-stats.stats-fade #sec-kpi,
#view-stats.stats-fade #sec-eq,
#view-stats.stats-fade #sec-cal {
  opacity: 0.55;
  transition: opacity 0.18s ease;
}
#view-stats #sec-kpi,
#view-stats #sec-eq {
  transition: opacity 0.18s ease;
}

.source-progress {
  margin: 8px 14px 0;
  padding: 10px 12px;
  background: var(--head);
  border: 1px solid #2f2f38;
  border-radius: 6px;
}
.source-progress.hidden { display: none !important; }
.sp-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.sp-title { font-weight: 750; color: var(--ink); }
.sp-phase {
  font-size: 11px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.sp-head #spClose { margin-left: auto; }
.sp-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.sp-step {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px; border-radius: 4px; background: var(--panel-deep);
  border: 1px solid var(--panel3); font-size: 12px; color: var(--muted);
}
.sp-step i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong);
  margin-bottom: 4px;
}
.sp-step b { color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 700; }
.sp-step.on { border-color: #3a5a52; }
.sp-step.on i { background: var(--gold-soft); box-shadow: 0 0 8px rgba(230,195,106,.6); }
.sp-step.ok { border-color: #2f6b56; }
.sp-step.ok i { background: var(--win); box-shadow: 0 0 8px rgba(38,166,154,.6); }
.sp-step.err { border-color: var(--odd-line); }
.sp-step.err i { background: var(--odd); }
.sp-msg { margin-top: 8px; }

button:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--win);
  outline-offset: 2px;
}


/* tv116: source status pill + message drawer */
.source-status-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid #2f6b56;
  color: #9ee0c8;
  background: rgba(38,166,154,.12);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.source-status-pill.err {
  border-color: var(--odd-line);
  color: var(--odd-bright);
  background: rgba(242,54,69,.12);
}
.source-status-pill.hidden { display: none !important; }
.source-progress {
  /* keep in flow under titlebar; auto-collapses after success */
}


/* tv117: admin / recon / stats UI knives */
.btn.warn:hover { filter: brightness(1.08); }
.btn.danger:hover { filter: brightness(1.08); }
.admin-section { margin-bottom: 12px; }
.admin-table .acts { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.admin-table .acts-primary { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-table .acts-warn { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-table .acts-danger { margin-top: 2px; }
.admin-table details.admin-more { display: inline-block; }
.admin-table details.admin-more > summary {
  list-style: none; cursor: pointer; font-size: 12px; color: var(--muted);
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 3px;
}
.admin-table details.admin-more > summary::-webkit-details-marker { display: none; }
.admin-table details.admin-more[open] > summary { color: var(--ink); border-color: var(--line-strong); }
.admin-table details.admin-more .acts-more {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; padding: 4px 0;
}
.audit-filters { padding: 0 12px 8px; gap: 8px; flex-wrap: wrap; align-items: end; }
.audit-list .audit-row {
  display: grid;
  grid-template-columns: 150px minmax(0,120px) minmax(0,72px) minmax(0,1fr) minmax(0,1.2fr);
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.audit-list .audit-row .ar-date { color: var(--muted); }
.audit-list .audit-row .ar-actor { color: var(--gold, var(--gold)); }
.audit-list .audit-row .ar-act { color: var(--ink); }
.audit-list .audit-row .ar-target { color: var(--ink); }
.audit-list .audit-row .ar-detail { color: var(--muted); }
.adv-details {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  background: #101014;
}
.adv-details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}
.adv-details[open] > summary { color: var(--ink); margin-bottom: 6px; }
.recon-verdict {
  margin: 4px 12px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a3a48;
  background: rgba(38,166,154,.08);
  font-size: 13px;
  line-height: 1.45;
}
.recon-verdict.bad { border-color: var(--odd-line); background: rgba(242,54,69,.08); }
.recon-verdict.warn { border-color: var(--gold); background: rgba(230,195,106,.08); }
.recon-verdict.ok { border-color: #2f6b56; background: rgba(38,166,154,.12); }
.recon-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 12px 10px;
}
.recon-tabs .btn.on {
  background: var(--win); border-color: transparent; color: var(--ink-on);
}
.recon-pane.hidden { display: none !important; }
.recon-danger-ops .btn { margin-bottom: 2px; }
.bucket-row.muted-roi .up,
.bucket-row.muted-roi .down,
.bucket-row.thin.muted-roi .up,
.bucket-row.thin.muted-roi .down {
  color: var(--muted) !important;
  font-weight: 500 !important;
}
.daily-legend {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  padding: 8px 4px 4px;
  font-size: 12px;
}
.daily-legend .dl-item { white-space: nowrap; }
.daily-legend .dl-item.up { color: var(--win); }
.daily-legend .dl-item.down { color: var(--odd); }
.settled-filters { margin-top: 4px; }
.strat-diff-line { font-size: 12px; color: var(--muted); line-height: 1.4; }
.strat-diff-line b { color: var(--ink); font-weight: 600; }
.cross-obs details > summary { cursor: pointer; color: var(--muted); font-size: 12px; }

/* tv118: phone portrait layout — desktop rules above remain unchanged */
@media (max-width: 720px) {
  :root {
    --mobile-head-h: 62px;
    --mobile-nav-h: 66px;
    --radius: 8px;
  }

  html, body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
  }

  body { padding-bottom: env(safe-area-inset-bottom); }
  button, .btn, input, select { min-height: 40px; }
  input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; }
  input[type="number"], input[type="text"], input[type="password"],
  select, input[type="date"] { font-size: 16px; }

  #app.mac-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
  }

  .sidebar.tabbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    width: 100%;
    height: var(--mobile-head-h);
    min-height: var(--mobile-head-h);
    padding: max(7px, env(safe-area-inset-top)) 12px 7px;
    flex-flow: row nowrap;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--veil);
    /* A filtered ancestor becomes the containing block of the fixed bottom nav. */
    backdrop-filter: none;
  }

  .side-brand {
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    gap: 9px;
  }
  .side-brand .logo-icon { display: block !important; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; }
  .side-brand h1 { font-size: 16px; letter-spacing: .04em; }
  .side-brand .sub { display: none !important; }
  .side-stats, .acct-chip { display: none !important; }

  .side-nav {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 2px;
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    background: rgba(18,18,22,.97);
    border-top: 1px solid #303038;
    box-shadow: 0 -8px 24px rgba(0,0,0,.35);
    backdrop-filter: blur(18px);
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav > .nav-item,
  .side-nav > .nav-fold,
  .side-nav > #pairDock {
    flex: 0 0 62px;
    min-width: 62px;
  }
  .side-nav .nav-item,
  .side-nav .nav-parent,
  .side-nav #pairDock {
    display: flex;
    min-height: 54px;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 25px 4px 4px;
    border-radius: 8px;
    text-align: center;
    font-size: 11px;
    line-height: 1;
    position: relative;
    white-space: nowrap;
  }
  .side-nav .nav-item::before,
  .side-nav #pairDock::before {
    content: "•";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    line-height: 1;
    color: var(--muted-2);
  }
  .side-nav [data-tab="watch"]::before { content: "◉"; }
  .side-nav [data-tab="pos"]::before { content: "▤"; }
  .side-nav [data-tab="stats"]::before { content: "▥"; }
  .side-nav [data-tab="sub"]::before { content: "◇"; }
  .side-nav [data-tab="strat"]::before { content: "⚙"; }
  .side-nav [data-tab="admin"]::before { content: "♙"; }
  .side-nav [data-tab="settings"]::before { content: "☷"; }
  .side-nav [data-tab="recon"]::before { content: "↻"; }
  .side-nav #pairDock::before { content: "✦"; }
  .side-nav .nav-item.active,
  .side-nav #pairDock.active {
    color: var(--ink-on);
    background: var(--panel3);
    box-shadow: inset 0 2px 0 var(--ink);
  }
  .side-nav .nav-item.active::before { color: var(--win); }
  .nav-fold .nav-parent::after, .nav-kids { display: none !important; }

  .workspace { width: 100%; height: auto; min-height: 0; overflow: visible; }
  .titlebar {
    position: static;
    min-height: 42px;
    height: auto;
    padding: 6px 10px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .titlebar-left {
    flex: 1;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
  }
  .titlebar-right { gap: 5px; flex-shrink: 0; }
  .titlebar-right .btn { min-height: 34px; padding: 5px 8px; }
  #btnAlignReport, #btnShortcutsHelp { display: none; }
  .hb-msg { max-width: 100px; }
  #lastTickEl { display: none; }
  .source-status-pill { max-width: 96px; margin-left: 0; }

  .content { padding: 8px 8px 14px; overflow: visible; }
  .panel { margin-bottom: 8px; padding-bottom: 10px; }
  .panel.grow { min-height: 0; }
  .section-h {
    min-height: 42px;
    padding: 7px 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .section-h h2, .section-h h3 { margin-right: auto !important; }
  .section-h .row { width: 100%; gap: 6px; }
  .section-h .btn { min-height: 34px; }
  #equityWrap, #bucketStats, #settledList, #shoutFeed, #posList, #stratLog { margin: 0 8px; }

  #app.cockpit-tiled .workspace { overflow: visible; }
  #app.cockpit-tiled .content {
    display: block !important;
    height: auto !important;
    padding: 8px 8px 14px !important;
    overflow: visible !important;
  }
  #app.cockpit-tiled .view { display: none !important; height: auto !important; overflow: visible !important; }
  #app.cockpit-tiled .view.active { display: block !important; }

  .shout-filters, .stats-tabs, .range-bar, .recon-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 7px;
  }
  .shout-filters::-webkit-scrollbar, .stats-tabs::-webkit-scrollbar,
  .range-bar::-webkit-scrollbar, .recon-tabs::-webkit-scrollbar { display: none; }
  .shout-filters .f-row, .stats-tabs button, .range-bar > *, .recon-tabs .btn { flex: 0 0 auto; }
  .range-bar { padding: 8px; align-items: flex-end; }
  .range-bar .field { flex-direction: column; align-items: flex-start; gap: 3px; }
  .range-bar input[type="date"] { min-width: 142px; width: 142px; }

  #shoutFeed.ticket-list .ticket.tape {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 10px;
  }
  #shoutFeed.ticket-list .ticket.tape .t-mid { grid-column: 1 / -1; grid-row: 2; }
  #shoutFeed.ticket-list .ticket.tape .t-right { grid-column: 2; grid-row: 1; }
  #shoutFeed.ticket-list .ticket.tape .t-more { grid-row: 3; }
  .ticket-h, .ticket-money, .ticket-meta, .ticket-foot { gap: 6px; }
  .ticket-money, .ticket-meta { flex-wrap: wrap; }

  .pos-card, #posList.pos-list.compact .pos-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    font-size: 13px;
  }
  #posList.pos-list.compact .pos-card .pc-label { display: block; }
  .pos-card .pc-ops { flex-direction: row; flex-wrap: wrap; }
  .pos-card .pc-ops .btn { width: auto; flex: 1; min-width: 96px; }

  .kpi-grid, .kpi-grid.kpi-core { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
  .kpi { padding: 9px; min-width: 0; }
  .kpi .v { font-size: 18px; overflow-wrap: anywhere; }
  .settle-dist, .research-kpis, .sp-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bucket-row { grid-template-columns: minmax(0,1fr) auto; }
  .bucket-row > :nth-child(3) { grid-column: 1 / -1; text-align: left; }
  .equity-wrap { min-height: 170px; overflow: hidden; }
  .equity-mode-bar { width: 100%; display: flex; overflow-x: auto; }
  .daily-legend { overflow-x: auto; flex-wrap: nowrap; }

  .split, .settings-panel .settings-grid, .strat-form { grid-template-columns: 1fr; }
  .settings-panel .settings-grid { padding: 2px 8px 12px; gap: 8px; }
  .settings-card { padding: 12px; }
  .controls .row, .row { gap: 8px; }
  .field { flex-wrap: wrap; }
  .field input:not([type="checkbox"]), .field select { max-width: 100%; }
  #opsPanel input[type="text"], .admin-note { max-width: none; width: 100%; }
  .admin-grant { align-items: stretch; }
  .admin-grant .field { width: 100%; justify-content: space-between; }
  .admin-grant .field input { flex: 1; width: 0; }

  .admin-table { display: table; min-width: 760px; }
  #adminList { overflow-x: auto; margin: 0 8px; border: 1px solid var(--line); border-radius: 6px; }
  .audit-list .audit-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 9px 0;
  }
  .audit-list .audit-row .ar-detail { grid-column: 1 / -1; }

  .cal-grid { padding: 0 6px 8px; overflow-x: auto; }
  .cal-week, .cal-days { min-width: 350px; gap: 2px; }
  .cal-cell { min-height: 58px; padding: 3px; }
  .cal-cell .p { font-size: 9px; }

  .pair-bar { width: 100vw; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .open-alert { top: calc(var(--mobile-head-h) + 8px); left: 8px; right: 8px; width: auto; }
  .source-progress { margin: 6px 8px 0; padding: 9px; }
  .shortcut-modal { align-items: flex-end; padding: 8px; }
  .shortcut-dialog { width: 100%; max-height: 82dvh; overflow-y: auto; border-radius: 12px; }
  .shortcut-body { grid-template-columns: 1fr; gap: 12px; padding: 14px; }

  .gate, .pay-gate {
    align-items: flex-start;
    padding: max(18px, env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  }
  .gate-card { width: 100%; max-width: 430px; padding: 18px 16px; margin: auto 0; }
  .gate-brand { padding: 8px; }
  .gate-logo { max-height: 92px; }
  .gate-card .row .btn { flex: 1; }
}

@media (max-width: 390px) {
  .side-brand .sub { display: none !important; }
  .titlebar-right #btnUpdateSourceTop { font-size: 0; width: 36px; padding: 0; }

  /* banner: 手机同样走底部 toast 位（不遮挡顶部功能键），不改内容流 */
  .banner {
    position: fixed;
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: 10px;
    right: 10px;
    max-width: none;
    z-index: 120;
  }

  .titlebar-right #btnUpdateSourceTop::after { content: "↻"; font-size: 18px; }
  .kpi-grid, .kpi-grid.kpi-core { grid-template-columns: 1fr 1fr; }
  .settle-dist, .research-kpis, .sp-steps { grid-template-columns: 1fr; }
  .section-h > .muted.small { width: 100%; }

  /* cal-list-20260917：窄屏压缩按日汇总表，4 列仍要全显示 */
  .cal-view-bar { margin-left: 0; }
  .cal-list { padding: 0 6px 10px; }
  .cal-table th, .cal-table td { padding: 6px 5px; font-size: 12px; }
  .cal-table .c-day b { font-size: 12px; }
  .cal-table .c-day span { font-size: 10px; }
  .cal-table tfoot td { padding: 7px 5px; }
}

/* tv119: larger, more legible phone typography */
@media (max-width: 720px) {
  body { font-size: 15px; line-height: 1.5; }

  .side-brand h1 { font-size: 18px; }
  .side-brand .sub { font-size: 11px; }
  .side-nav .nav-item,
  .side-nav .nav-parent,
  .side-nav #pairDock { font-size: 14px; }

  .hb-bar { font-size: 13px; }
  .section-h h2 { font-size: 16px; }
  .section-h h3 { font-size: 15px !important; }
  .small, .muted.small, .section-h .small {
    font-size: 13px;
    line-height: 1.45;
  }

  .shout-filters button,
  .stats-tabs button,
  .range-bar .btn,
  .recon-tabs .btn {
    font-size: 14px;
    padding: 7px 11px;
  }

  .ticket { font-size: 15px; }
  .ticket-h .lg, .ticket-h .vs { font-size: 14px; }
  .ticket-h .min, .ticket-kind, .ticket-meta, .ticket-live,
  #shoutFeed.ticket-list .ticket.tape .t-more { font-size: 13px; }
  .ticket-pick .sel, .ticket-pick .ln, .ticket-pick .od,
  .ticket-money { font-size: 15px; }

  .pos-card, #posList.pos-list.compact .pos-card { font-size: 15px; }
  .pos-card .pc-league, .pos-card .pc-money, .pos-card .pc-trial { font-size: 13px; }
  .pos-card .pc-vs { font-size: 16px; }
  .pos-card .pc-pick, .pos-card .pc-quote { font-size: 15px; }

  .kpi .k { font-size: 13px; }
  .kpi .v { font-size: 20px; }
  .bucket-row, .settle-cell .k, .settle-cell .pnl { font-size: 13px; }
  .settle-cell .v { font-size: 18px; }

  .settings-card h3 { font-size: 16px; }
  .field, .chk { font-size: 14px; }
  .btn { font-size: 14px; }
  .btn.tiny { font-size: 13px; }
  .admin-table, .audit-list .audit-row { font-size: 13px; }
  .gate-safety, .gate-hint { font-size: 13px; }
  .gate-card label { font-size: 14px; }
}

/* tv120: phone ticket emphasis */
@media (max-width: 720px) {
  #shoutFeed.ticket-list .ticket.tape {
    padding: 14px 12px;
    gap: 9px 12px;
  }
  #shoutFeed.ticket-list .ticket.tape .t-left,
  #shoutFeed.ticket-list .ticket.tape .t-mid,
  #shoutFeed.ticket-list .ticket.tape .t-right {
    line-height: 1.5;
  }
  #shoutFeed.ticket-list .ticket.tape .t-left .lg {
    font-size: 15px;
    line-height: 1.4;
  }
  #shoutFeed.ticket-list .ticket.tape .t-left .clk,
  #shoutFeed.ticket-list .ticket.tape .t-left .min {
    font-size: 14px;
  }
  #shoutFeed.ticket-list .ticket.tape .t-mid .vs {
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
  }
  #shoutFeed.ticket-list .ticket.tape .t-mid .sc {
    font-size: 18px;
    font-weight: 800;
  }
  #shoutFeed.ticket-list .ticket.tape .ticket-pick,
  #shoutFeed.ticket-list .ticket.tape .ticket-pick .sel,
  #shoutFeed.ticket-list .ticket.tape .ticket-pick .ln,
  #shoutFeed.ticket-list .ticket.tape .ticket-pick .od {
    font-size: 17px;
    line-height: 1.5;
  }
  #shoutFeed.ticket-list .ticket.tape .t-right {
    font-size: 16px;
  }
  #shoutFeed.ticket-list .ticket.tape .t-right b,
  #shoutFeed.ticket-list .ticket.tape .t-right .win {
    font-size: 17px;
  }
  #shoutFeed.ticket-list .ticket.tape .btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 15px;
  }
  #shoutFeed.ticket-list .ticket.tape .t-more,
  #shoutFeed.ticket-list .ticket.tape .t-more summary {
    font-size: 14px;
  }

  #settledList .ticket,
  #reconList .ticket { padding: 12px; }
  #settledList .ticket-h .vs,
  #reconList .ticket-h .vs { font-size: 17px; }
  #settledList .ticket-pick,
  #reconList .ticket-pick { font-size: 17px; }
  #settledList .ticket-money,
  #reconList .ticket-money { font-size: 16px; }
}

/* tv121: larger mobile bottom navigation, fill available width */
@media (max-width: 720px) {
  :root { --mobile-nav-h: 76px; }

  .side-nav {
    gap: 4px;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
  }
  .side-nav > .nav-item,
  .side-nav > .nav-fold,
  .side-nav > #pairDock {
    flex: 1 0 68px;
    min-width: 68px;
  }
  .side-nav .nav-item,
  .side-nav .nav-parent,
  .side-nav #pairDock {
    min-height: 62px;
    padding: 31px 6px 7px;
    font-size: 14px;
    font-weight: 700;
  }
  .side-nav .nav-item::before,
  .side-nav #pairDock::before {
    top: 8px;
    font-size: 21px;
  }
}

/* tv122: bridging is a desktop-only workflow */
@media (max-width: 720px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inline !important; }
  .perm-bridge,
  .btn-locate,
  #locateHint,
  #posLocateHint { display: none !important; }
}

/* === CAL BLACK FORCE 20260909c === */
#sec-cal,
#sec-cal.panel,
#view-stats #sec-cal,
#app.cockpit-tiled #view-stats #sec-cal.panel {
  background: #000000 !important;
  background-color: #000000 !important;
}
#sec-cal .cal-nav,
#sec-cal .cal-grid,
#sec-cal .cal-days,
#sec-cal .cal-week {
  background: #000000 !important;
  background-color: #000000 !important;
}
#sec-cal .cal-cell,
#sec-cal .cal-cell.out,
#sec-cal .cal-cell.in,
#sec-cal .cal-cell.flat {
  background: #000000 !important;
  background-color: #000000 !important;
  border-color: var(--line-strong) !important;
}
#sec-cal .cal-cell.empty {
  background: transparent !important;
  border-color: transparent !important;
}
#sec-cal .cal-cell.up,
#sec-cal .cal-cell.down {
  background: #000000 !important;
  background-color: #000000 !important;
  border-color: var(--line-strong) !important;
}
#sec-cal,
#sec-cal .cal-cell,
#sec-cal .cal-cell * {
  -webkit-font-smoothing: subpixel-antialiased !important;
  -moz-osx-font-smoothing: auto !important;
  
  filter: none !important;
}
#sec-cal .cal-cell .d {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
#sec-cal .cal-cell .n {
  color: #fff !important;
  font-weight: 650 !important;
  font-size: 12px !important;
}
#sec-cal .cal-cell .p {
  font-weight: 700 !important;
  font-size: 13px !important;
  font-variant-numeric: tabular-nums;
}
#sec-cal .cal-cell.up .p { color: var(--win) !important; }
#sec-cal .cal-cell.up .n { color: #fff !important; }
#sec-cal .cal-cell.down .p { color: var(--odd) !important; }
#sec-cal .cal-cell.down .n { color: #fff !important; }
#sec-cal .cal-cell.flat .p { color: #fff !important; }
#sec-cal .cal-wd {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}
#sec-cal #calTitle {
  color: #fff !important;
  font-weight: 700 !important;
}
#sec-cal .cal-cell.out:not(.up):not(.down):not(.flat) .d {
  color: #b0b0b8 !important;
  font-weight: 650 !important;
}
/* 盈亏格底必须纯黑（防旧规则回潮） */
#sec-cal .cal-cell.up,
#sec-cal .cal-cell.down,
#sec-cal .cal-cell.flat {
  background: #000000 !important;
  background-color: #000000 !important;
  border-color: var(--line-strong) !important;
  box-shadow: none !important;
}

/* 半自动桥接：非订阅隐藏开关区说明已在 hint；禁用勾选 */
#app.no-auto-bridge #autoBridgeInput { opacity: .45; cursor: not-allowed; }
#app.no-auto-bridge #autoBridgeSubHint { display: inline !important; color: var(--warn); }

.admin-kind {
  min-width: 72px; height: 28px; font-size: 12px;
  background: var(--panel-deep); border: 1px solid var(--line); border-radius: 3px; color: var(--ink);
  margin-right: 4px;
}

/* tv127: trial register hint + shout gate */
.gate-trial-hint { margin: 0 0 10px; text-align: center; line-height: 1.4; }
#app.no-shout .perm-shout { display: none !important; }
#app.no-shout #shoutFeed { opacity: 0.35; pointer-events: none; }
#app.no-shout .watch-sub-lock { display: block !important; }
.watch-sub-lock { display: none; margin: 8px 12px; padding: 10px 12px; border-radius: 8px; background: #1a1a1a; border: 1px solid #333; color: #c9c9c9; font-size: 13px; text-align: center; }


/* tv128: iOS-feel polish for phone portrait only — desktop untouched */
@media (max-width: 720px) {
  :root {
    --mobile-head-h: 58px;
    --mobile-nav-h: 78px;
    --ios-radius: 14px;
    --ios-radius-sm: 10px;
    --ios-card: #1c1c1e;
    --ios-card-2: #2c2c2e;
    --ios-sep: rgba(84, 84, 88, 0.65);
    --ios-teal: #30d5c8;
    --ios-label: #f5f5f7;
    --ios-secondary: #8e8e93;
  }

  html, body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
      "PingFang SC", "Helvetica Neue", sans-serif;
    background: #000;
    color: var(--ios-label);
    letter-spacing: -0.01em;
  }

  #app.mac-shell {
    background: #000;
  }

  /* top brand bar — compact, frosted */
  .sidebar.tabbar {
    height: calc(var(--mobile-head-h) + env(safe-area-inset-top));
    min-height: calc(var(--mobile-head-h) + env(safe-area-inset-top));
    padding: max(8px, env(safe-area-inset-top)) 14px 8px;
    background: rgba(0, 0, 0, 0.82) !important;
    border-bottom: 0.5px solid var(--ios-sep) !important;
  }
  .traffic { display: none !important; }
  .side-brand .logo-icon { display: block !important; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; }
  .side-brand h1 {
    font-size: 17px !important;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .side-brand .sub { display: none !important; }

  /* iOS tab bar */
  .side-nav {
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    gap: 4px;
    background: rgba(28, 28, 30, 0.92) !important;
    border-top: 0.5px solid var(--ios-sep) !important;
    box-shadow: 0 -10px 30px rgba(0,0,0,.45) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  }
  .side-nav > .nav-item,
  .side-nav > .nav-fold,
  .side-nav > #pairDock {
    flex: 1 1 0;
    min-width: 0;
  }
  .side-nav .nav-item,
  .side-nav .nav-parent,
  .side-nav #pairDock {
    min-height: 58px;
    border-radius: 12px;
    padding: 28px 2px 6px;
    font-size: 14px !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ios-secondary);
    background: transparent;
    box-shadow: none !important;
  }
  .side-nav .nav-item::before,
  .side-nav #pairDock::before {
    top: 5px;
    font-size: 20px;
    color: var(--ios-secondary);
  }
  .side-nav .nav-item.active,
  .side-nav #pairDock.active {
    color: var(--ios-teal) !important;
    background: rgba(48, 213, 200, 0.12) !important;
    box-shadow: none !important;
  }
  .side-nav .nav-item.active::before,
  .side-nav #pairDock.active::before {
    color: var(--ios-teal) !important;
  }

  /* content canvas */
  .content {
    padding: 10px 12px 18px !important;
    background: #000;
  }
  .titlebar {
    margin: 0 0 8px;
    padding: 8px 12px !important;
    border-radius: var(--ios-radius);
    background: var(--ios-card);
    border: 0.5px solid var(--ios-sep);
  }

  /* grouped panels like iOS inset groups */
  .panel,
  #view-watch .panel,
  #view-pos .panel,
  #view-stats .panel {
    background: var(--ios-card) !important;
    border: 0.5px solid var(--ios-sep) !important;
    border-radius: var(--ios-radius) !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    overflow: hidden;
    box-shadow: none !important;
  }
  .section-h {
    min-height: 44px;
    margin: 0 0 0 !important;
    padding: 10px 14px !important;
    border-bottom: 0.5px solid var(--ios-sep);
    background: transparent !important;
    border-radius: 0 !important;
  }
  .section-h h2, .section-h h3 {
    font-size: 15px !important;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  #equityWrap, #bucketStats, #settledList, #shoutFeed, #posList, #stratLog {
    margin: 0 10px 10px !important;
  }

  /* shout / ticket cards */
  #shoutFeed.ticket-list {
    gap: 10px;
  }
  #shoutFeed.ticket-list .ticket,
  #shoutFeed.ticket-list .ticket.tape,
  #settledList .ticket,
  #reconList .ticket {
    background: var(--ios-card-2) !important;
    border: 0.5px solid var(--ios-sep) !important;
    border-radius: var(--ios-radius-sm) !important;
    padding: 12px !important;
    box-shadow: none !important;
  }
  #shoutFeed.ticket-list .ticket:hover {
    background: #3a3a3c !important;
  }
  #shoutFeed.ticket-list .ticket.tape .t-mid .vs,
  #settledList .ticket-h .vs {
    font-size: 17px !important;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .ticket-h .lg, .ticket-meta, .ticket-kind {
    color: var(--ios-secondary) !important;
  }

  /* holdings cards */
  .pos-card,
  #posList.pos-list.compact .pos-card {
    background: var(--ios-card-2) !important;
    border: 0.5px solid var(--ios-sep) !important;
    border-radius: var(--ios-radius-sm) !important;
    padding: 12px !important;
    gap: 10px !important;
  }
  .pos-card .pc-ops .btn {
    border-radius: 10px;
    font-weight: 600;
  }

  /* KPI chips */
  .kpi {
    background: var(--ios-card-2) !important;
    border: 0.5px solid var(--ios-sep) !important;
    border-radius: var(--ios-radius-sm) !important;
    padding: 12px !important;
  }
  .kpi .v {
    font-size: 20px !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
  }
  .kpi .k { color: var(--ios-secondary) !important; font-size: 11px; }

  /* filters as pill chips */
  .shout-filters .f-row button,
  .stats-tabs button,
  .recon-tabs .btn,
  .range-bar .btn {
    border-radius: 999px !important;
    min-height: 32px !important;
    padding: 4px 12px !important;
    font-size: 13px !important;
    font-weight: 600;
    border: 0.5px solid var(--ios-sep) !important;
    background: var(--ios-card-2) !important;
  }
  .shout-filters .f-row button.active,
  .stats-tabs button.active,
  .recon-tabs .btn.active {
    background: rgba(48, 213, 200, 0.18) !important;
    color: var(--ios-teal) !important;
    border-color: rgba(48, 213, 200, 0.35) !important;
  }

  /* buttons */
  .btn.primary, button.primary {
    border-radius: 12px !important;
    background: var(--ios-teal) !important;
    color: #04120f !important;
    border: none !important;
    font-weight: 700;
  }
  .btn, button.btn {
    border-radius: 10px;
  }

  /* empty states */
  .feed.empty, .list.empty {
    padding: 28px 12px !important;
    text-align: center;
    color: var(--ios-secondary) !important;
    font-size: 14px !important;
  }

  .watch-sub-lock {
    margin: 10px 12px !important;
    border-radius: var(--ios-radius-sm) !important;
    background: var(--ios-card-2) !important;
    border: 0.5px solid var(--ios-sep) !important;
  }

  /* settings cards */
  .settings-card {
    background: var(--ios-card) !important;
    border: 0.5px solid var(--ios-sep) !important;
    border-radius: var(--ios-radius) !important;
  }

  /* login gate */
  .gate-card {
    background: var(--ios-card) !important;
    border-radius: 18px !important;
    border: 0.5px solid var(--ios-sep) !important;
  }
}

@media (max-width: 720px) and (display-mode: standalone) {
  .sidebar.tabbar {
    padding-top: max(10px, env(safe-area-inset-top));
  }
}


/* ruleHash attribution (tv129-ruleattr) */
.rule-attr-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 4px 8px; }
table.rule-attr { width: 100%; border-collapse: collapse; font-size: 12px; }
table.rule-attr th, table.rule-attr td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.rule-attr th { color: var(--muted); font-weight: 600; }
table.rule-attr tr.rule-attr-row { cursor: pointer; }
table.rule-attr tr.rule-attr-row:hover { background: rgba(255,255,255,0.04); }
table.rule-attr tr.rule-attr-row.bad td:first-child { box-shadow: inset 3px 0 0 #e85d5d; }
table.rule-attr tr.thin { opacity: 0.72; }
.rule-attr-filter { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  table.rule-attr { font-size: 11px; }
  table.rule-attr th, table.rule-attr td { padding: 5px 6px; }
}


/* full-auto bridge (tv131-fullauto) */
#app.no-auto-bridge #fullAutoInput { opacity: .45; cursor: not-allowed; }


/* lab console / signal UI (tv133-lab-ui) */
.lab-console { margin-bottom: 10px; border: 1px solid rgba(80,200,120,.22); background: linear-gradient(180deg, rgba(30,50,40,.35), rgba(18,18,22,.9)); }
.lab-console .recon-verdict { margin: 0 12px 8px; }
.lab-gate-mini { padding: 0 12px 8px; }
.lab-kpis { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.lab-kpis b { color: var(--ink-2); font-weight: 650; }
.lab-tick-stats { padding: 0 12px 10px; }
.pass-card { border-left: 3px solid #8a8f9c; opacity: .95; }
.pass-card .tag.pass {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: rgba(140,140,160,.25); color: #c8cad2; font-size: 11px; font-weight: 700;
}
.pass-why { margin-top: 4px; color: #e0b35a; font-size: 12px; }
#signalModeBar { margin-bottom: 4px; }
#passFeed.hidden, #scanList.hidden, #passFeed.hidden, #shoutFeed.hidden, #shoutFilters.hidden { display: none !important; }
@media (max-width: 720px) {
  .lab-kpis { gap: 6px 10px; }
  .lab-console .section-h h2 { font-size: 15px; }
}


/* Baseline + evidence (tv134-evidence) */
.baseline-table { display: flex; flex-direction: column; gap: 4px; }
.baseline-head, .baseline-row {
  display: grid;
  grid-template-columns: minmax(120px,1.6fr) 52px 120px 64px 64px minmax(80px,1.4fr);
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  font-size: 12px;
}
.baseline-head { color: var(--muted); border-bottom: 1px solid var(--panel3); font-weight: 650; }
.baseline-row { background: rgba(255,255,255,.03); border-radius: 8px; }
.baseline-row.champ { outline: 1px solid rgba(80,200,120,.35); background: rgba(40,120,70,.12); }
.baseline-row.nullrow { opacity: .9; border: 1px dashed var(--line-strong); }
@media (max-width: 720px) {
  .baseline-head, .baseline-row {
    grid-template-columns: 1.2fr 40px 1fr;
    grid-template-rows: auto auto;
  }
  .baseline-head span:nth-child(n+4),
  .baseline-row span:nth-child(n+4) { display: none; }
}

/* Mobile bottom nav: 4 entries only — Radar / Portfolio / Lab / Settings */
@media (max-width: 720px) {
  .side-nav {
    justify-content: space-between;
    overflow-x: hidden;
    gap: 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  .side-nav > .nav-fold,
  .side-nav > #pairDock,
  .side-nav > .nav-item[data-tab="sub"],
  .side-nav > .nav-item[data-tab="strat"],
  .side-nav > .nav-item[data-tab="admin"],
  .side-nav > .nav-item.nav-parent { display: none !important; }
  /* 手机底栏第三格统一「战果」；Lab/复算走页内入口，避免运营号点不到战果 */
  #app.role-ops .side-nav > .nav-item[data-tab="recon"] { display: none !important; }
  #app:not(.role-ops) .side-nav > .nav-item[data-tab="recon"] { display: none !important; }
  .side-nav > .nav-item[data-tab="stats"] {
    display: flex !important;
    flex: 1 1 0;
    min-width: 0;
  }
  .side-nav > .nav-item[data-tab="watch"],
  .side-nav > .nav-item[data-tab="pos"],
  .side-nav > .nav-item[data-tab="settings"] {
    display: flex !important;
    flex: 1 1 0;
    min-width: 0;
  }
  .side-nav > .nav-item { max-width: none; }
}

#adminDangerPanel { border: 1px solid rgba(220,80,60,.45); }
#adminDangerPanel .section-h h2 { color: #e88; }


/* tv138-ledger: research signal cards — stake/sim in details */
#shoutFeed.ticket-list .ticket.tape.signal-research .sig-tag {
  font-size: 11px; font-weight: 650; color: var(--accent, #7dd3fc); margin-top: 2px;
}
#shoutFeed.ticket-list .ticket.tape.signal-research .sig-reason { margin-top: 2px; }
#shoutFeed.ticket-list .ticket.tape.signal-research .money-details {
  grid-column: 1 / -1;
  font-size: 11px; color: var(--muted);
}
#shoutFeed.ticket-list .ticket.tape.signal-research .money-details summary {
  cursor: pointer; color: var(--muted);
}
#shoutFeed.ticket-list .ticket.tape.signal-research .t-right > div:not(button) {
  /* stake lines live in details, not face */
}
.lab-evidence-chain {
  padding: 4px 12px 10px;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}
@media (max-width: 720px) {
  #shoutFeed.ticket-list .ticket.tape.signal-research .t-right {
    align-items: flex-end;
  }
  #shoutFeed.ticket-list .ticket.tape.signal-research .money-details {
    order: 4;
  }
}

/* tv139-audit: gate table + evidence certificate */
.lab-gate-table {
  padding: 0 12px 8px;
  overflow-x: auto;
}
.lab-gate-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.lab-gate-table th,
.lab-gate-table td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--panel3);
  vertical-align: top;
}
.lab-gate-table th {
  color: var(--muted, #8b8b96);
  font-weight: 650;
}
.lab-gate-table .gate-note {
  display: block;
  color: var(--muted, #8b8b96);
  font-size: 10px;
  margin-top: 2px;
}
.lab-evidence-chain .ev-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lab-evidence-chain .ev-badge.ok {
  color: #0d2a18;
  background: #7dcea0;
}
.lab-evidence-chain .ev-badge.bad {
  color: #3a1010;
  background: #e07a7a;
}
.lab-evidence-chain .ev-badge.warn {
  color: #2a2208;
  background: #e0c06a;
}
.evidence-cert-dialog {
  width: min(720px, 96vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.evidence-cert-dialog .shortcut-body {
  overflow: auto;
  max-height: calc(86vh - 52px);
  padding: 12px 16px 18px;
}
.evidence-cert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}
.evidence-cert-table th,
.evidence-cert-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--panel3);
  vertical-align: top;
  word-break: break-all;
}
.evidence-cert-table th {
  width: 28%;
  color: var(--muted, #8b8b96);
  font-weight: 650;
  white-space: nowrap;
}
.evidence-events {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.evidence-events th,
.evidence-events td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--panel3);
  vertical-align: top;
  word-break: break-all;
}
.evidence-events th { color: var(--muted, #8b8b96); font-weight: 650; }
.baseline-verdict-strip {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}
.baseline-verdict-strip.warn {
  background: rgba(224, 192, 106, 0.12);
  color: #e0c06a;
  outline: 1px solid rgba(224, 192, 106, 0.35);
}
.baseline-verdict-strip.ok {
  background: rgba(125, 206, 160, 0.1);
  color: #7dcea0;
  outline: 1px solid rgba(125, 206, 160, 0.35);
}

.suggest.suggest-highlight { outline: 2px solid #e0c06a; box-shadow: 0 0 0 4px rgba(224,192,106,.18); }


/* Opportunity Ledger coverage (tv143-ol1) */
.sec-coverage, .ol-coverage-card {
  margin: 0 12px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(90,160,220,.28);
  border-radius: 8px;
  background: rgba(30,50,70,.28);
}
.ol-cov-h { font-size: 13px; margin-bottom: 2px; }
.ol-cov-pct { color: #7ec8ff; font-weight: 700; font-size: 16px; margin-left: 4px; }
.ol-cov-kpis {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  font-size: 12px; color: var(--muted); margin-top: 6px;
}
.ol-cov-kpis b { color: var(--ink-2); font-weight: 650; }
.ol-cov-reasons { margin-top: 4px; }


/* Execution Penalty card (tv143-ep2) */
.sec-execpen {
  margin: 0 12px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(220,160,90,.30);
  border-radius: 8px;
  background: rgba(70,45,20,.22);
}

/* Source Coverage Audit (tv143-sc1 → ec5 in-play align) */
/* Research governance knives tv143-ec6 */
.sec-srccov {
  margin: 0 12px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(120,190,140,.32);
  border-radius: 8px;
  background: rgba(20,55,35,.22);
}


/* tv143-ui3-p2 */

.gate-card .gate-field input.invalid,
.gate-card input.invalid {
  border-color: var(--danger, #e07a7a) !important;
  box-shadow: 0 0 0 1px rgba(224,122,122,.45);
}
.gate-contact {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted-2);
}
.settings-card-lead {
  margin: -4px 0 8px;
  font-size: 12px;
  color: var(--muted-2);
}
.sub-pack {
  position: relative;
}
.sub-pack em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
}
.sub-pack.featured {
  border-color: var(--gold, var(--gold));
  background: linear-gradient(180deg, rgba(201,162,39,.10), transparent 70%);
  box-shadow: 0 0 0 1px rgba(201,162,39,.28);
}
.sub-pack .sub-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold, var(--gold));
  color: #1a1408;
}
.pos-list {
  max-width: 1100px;
}
.pos-card .pc-col-h {
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 2px;
  font-weight: 650;
}
#posList.pos-list.compact .pos-card .pc-col-h { display: none; }
@media (max-width: 720px) {
  .lab-gate-table,
  .lab-sens-table,
  .sec-srccov .lab-gate-table {
    overflow-x: visible;
  }
  .lab-gate-table table,
  .lab-sens-table table {
    display: block;
    width: 100%;
  }
  .lab-gate-table thead,
  .lab-sens-table thead {
    display: none;
  }
  .lab-gate-table tbody,
  .lab-sens-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .lab-gate-table tr,
  .lab-sens-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    padding: 8px 10px;
    background: var(--panel-deep);
    border: 1px solid var(--line, var(--panel3));
    border-radius: 8px;
  }
  .lab-gate-table td,
  .lab-sens-table td {
    border: none;
    padding: 2px 0;
    font-size: 12px;
    word-break: break-word;
  }
  .lab-gate-table td:first-child,
  .lab-sens-table td:first-child {
    grid-column: 1 / -1;
    font-weight: 700;
    color: var(--ink);
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--panel3);
    margin-bottom: 2px;
  }
}

/* Freedom-leak governance (tv143-fl4) */
.eval-fallback-banner {
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.35);
}
.sens-tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  color: #7ec8ff;
  margin-left: 4px;
}
.lab-sens-table td .sens-tier { color: #9ad0ff; }


/* Evaluation Constitution / Hypothesis Family hash chips */
.hash-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
  vertical-align: middle;
  white-space: nowrap;
}
.hash-chip.rule-chip {
  border-color: rgba(120, 180, 255, 0.45);
  background: rgba(120, 180, 255, 0.10);
  color: #8ec5ff;
}
.hash-chip.protocol-chip {
  border-color: rgba(140, 220, 160, 0.45);
  background: rgba(140, 220, 160, 0.10);
  color: #9fe0b0;
}


/* FMI Context Allocation Lab cards (tv143-ca4) */
.sec-ctxanalytics, .sec-ctxevidence, .sec-shadowalloc, .sec-alloceval {
  margin-top: 8px;
}
.ctx-table-wrap {
  overflow-x: auto;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 6px;
}
.ctx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.ctx-table th, .ctx-table td {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 3px 6px;
  text-align: left;
  white-space: nowrap;
}
.ctx-table th { color: #9aa3b2; font-weight: 600; position: sticky; top: 0; background: #1a1f2a; }
.ctx-lowconf { opacity: 0.55; }
/* 同上：::after 的前导空格会被吞，导致「61-75LOW」粘连 */
.ctx-lowconf td:first-child::after { content: "\00a0LOW"; color: var(--gold); font-size: 10px; }
.ctx-roi-warn { color: var(--gold); }
.ctx-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.ctx-compare-card {
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
}
.ctx-compare-card b { color: var(--ink-2); }

.ae1-banner {
  margin: 6px 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(80, 140, 255, 0.12);
  border: 1px solid rgba(80, 140, 255, 0.35);
  font-size: 12px;
}
.ae1-banner.warn {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.45);
}
.ae1-banner.bad {
  background: rgba(220, 80, 80, 0.12);
  border-color: rgba(220, 80, 80, 0.45);
}
.ae1-contrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.ae1-contrib-card {
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
}

.ca4-verdict {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(80, 140, 255, 0.14);
  border: 1px solid rgba(80, 140, 255, 0.4);
  font-size: 13px;
  font-weight: 600;
}
.ca4-verdict.suspended, .ca4-verdict.fail {
  background: rgba(220, 80, 80, 0.14);
  border-color: rgba(220, 80, 80, 0.5);
}
.ca4-verdict.eligible {
  background: rgba(60, 180, 100, 0.14);
  border-color: rgba(60, 180, 100, 0.5);
}
.ca4-verdict.watch, .ca4-verdict.extend {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.45);
}
.ca4-delta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
}
.ca4-delta-table th, .ca4-delta-table td {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 3px 6px;
  text-align: left;
}
.ca4-integrity {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  font-size: 11px;
}
.ca4-tags { margin-top: 4px; font-size: 11px; color: var(--gold); }


/* ---- tv143-ui1: P0 console fold + logo + fonts + num align ---- */
.lab-verdict-hero {
  margin: 4px 12px 12px !important;
  padding: 14px 16px !important;
  border-radius: 10px !important;
  border-width: 2px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}
.lab-verdict-hero > div:first-child {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: 4px;
}
.lab-verdict-hero.bad { box-shadow: 0 0 0 1px rgba(242,54,69,.25); }
.lab-verdict-hero.warn { box-shadow: 0 0 0 1px rgba(230,195,106,.22); }
.lab-verdict-hero.ok { box-shadow: 0 0 0 1px rgba(38,166,154,.28); }

.lab-fold {
  margin: 0 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: 12px;
}
.lab-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 12px;
  color: var(--ink);
  font-weight: 650;
  font-size: 12.5px;
  user-select: none;
}
.lab-fold > summary::-webkit-details-marker { display: none; }
.lab-fold > summary::before {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-right: 8px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--muted);
  vertical-align: 1px;
}
.lab-fold[open] > summary::before { transform: rotate(90deg); }
.lab-fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.lab-fold .ol-coverage-card,
.lab-fold .lab-gate-table,
.lab-fold .lab-tick-stats,
.lab-fold .lab-evidence-chain { margin: 0; }

.ticket-pick .od, code, .mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

table.rule-attr th:nth-child(n+2),
table.rule-attr td:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
table.rule-attr th:first-child,
table.rule-attr td:first-child,
table.rule-attr th:last-child,
table.rule-attr td:last-child {
  text-align: left;
}
.lab-gate-table th.num,
.lab-gate-table td.num,
.admin-table th.num,
.admin-table td.num,
td.num, th.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.baseline-head span:nth-child(n+2),
.baseline-row span:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.kpi .v, #kpiGrid .v {
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .side-brand .logo-icon {
    display: block !important;
    width: 28px; height: 28px; flex-basis: 28px;
  }
  .lab-verdict-hero > div:first-child { font-size: 16px; }
  .lab-fold { margin: 0 8px 8px; }
}


/* ---- tv143-ui2: tokens + segmented filters + pnl color ---- */
:root, html[data-pnl-color="intl"] {
  --win: #26a69a;
  --odd: #f23645;
}
html[data-pnl-color="cn"] {
  --win: #f23645; /* 红=盈 */
  --odd: #26a69a; /* 绿=亏 */
}

.btn, .tag, .panel, .settings-card, .ticket, .kpi,
.lab-fold, .recon-verdict, input[type="date"], select,
input[type="text"], input[type="password"], input[type="number"] {
  border-radius: var(--radius-sm);
}
.panel, .settings-card, .lab-fold, .lab-verdict-hero, .gate-card {
  border-radius: var(--radius);
}
.tag { border-radius: var(--radius-sm); }
.stats-tabs button, .range-bar .btn.tiny, .density-bar .btn.tiny {
  border-radius: 999px;
}

/* unified segmented controls for stats */
.seg-bar.stats-tabs,
.seg-bar.range-bar {
  gap: 6px;
}
.range-bar.seg-bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.range-bar.seg-bar .btn.tiny {
  background: var(--head);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  box-shadow: none;
}
.range-bar.seg-bar .btn.tiny:hover {
  color: var(--ink);
  background: var(--hover-2);
}
.range-bar.seg-bar .btn.tiny.on,
.range-bar.seg-bar .btn.tiny.active,
.range-bar.seg-bar .btn.tiny.primary {
  color: var(--ink);
  border-color: var(--win);
  background: var(--win-bg);
  box-shadow: none;
}
.range-bar.seg-bar .field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--head);
  color: var(--muted);
  font-size: 12px;
}
.range-bar.seg-bar input[type="date"] {
  border: none;
  background: transparent;
  min-width: 118px;
  width: auto;
  padding: 2px 0;
  border-radius: 0;
}

.hb-bar.warn .hb-dot { background: var(--gold-soft); box-shadow: 0 0 8px rgba(201,162,39,.55); }
.hb-bar.warn { color: var(--gold-soft); }


/* tv143-ui5-v2 · UI复评正确性 + P1 */
.admin-table input[type="text"],
.admin-table input[type="password"],
.admin-table input:not([type]),
.admin-table input[type="number"],
.admin-table input[type="search"] {
  background: #0e0e12;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 4px);
  padding: 4px 8px;
  min-height: 28px;
}
.admin-table input::placeholder { color: var(--muted-2); }
.admin-table input:focus {
  outline: none;
  border-color: var(--gold, var(--gold));
  box-shadow: 0 0 0 1px rgba(201,162,39,.35);
}

.audit-list .audit-row .ar-actor,
.audit-list .audit-row .ar-act,
.audit-list .audit-row .ar-target,
.audit-list .audit-row .ar-detail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-foot b,
.ticket-foot .pos-amt,
.kpi .v,
.pc-pnl {
  white-space: nowrap;
}

/* 可读句 12px；机器标识保持 11px mono */
.lab-console .muted.small,
.lab-fold,
.ol-coverage-card,
.lab-gate-mini,
.lab-tick-stats,
.recon-pane .muted.small,
.settings-card-lead,
.gate-safety,
.gate-trial-hint {
  font-size: 12px;
  color: var(--muted);
}
.hash-chip,
.rule-chip,
.eval-hash,
.mono-id {
  font-size: 11px !important;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 横滚渐隐提示 */
.shout-filters,
.stats-tabs,
.range-bar,
.lab-kpis,
.recon-tabs {
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.kpi .v.neutral { color: var(--ink); }


/* tv143-ui6-v3 · Linear对照 + 三页字号 + 审计溢出 */
.panel {
  border-top-color: rgba(255,255,255,0.10);
}

#view-watch,
#view-stats,
#view-pos {
  font-size: 12px;
}
#view-watch .muted.small,
#view-stats .muted.small,
#view-pos .muted.small,
#view-watch .feed,
#view-pos .pos-card,
#view-stats .ticket-list {
  font-size: 12px;
  color: inherit;
}
#view-watch table,
#view-stats table,
#view-pos table,
#view-stats .rule-attr,
#view-watch .odds-grid,
#view-watch .odds-row,
#view-watch .odds-head {
  font-size: 13px;
}
#view-watch .hash-chip,
#view-stats .hash-chip,
#view-pos .hash-chip,
#view-watch .mono-id {
  font-size: 11px !important;
}

.sub-pack .sub-one {
  margin: 10px 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}
.sub-pack .sub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sub-pack .sub-chips i {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--accent);
  background: rgba(255,255,255,0.03);
}
.sub-pack span {
  letter-spacing: -0.5px;
  font-weight: 600;
  font-size: 28px;
}
.sub-pack b {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

/* density-bar / segmented tiny buttons stay tap-friendly */
.density-bar .btn.tiny,
.stats-tabs .btn.tiny,
.shout-filters button,
.f-row button {
  min-height: 28px;
}


/* tv143-ui6-btn-lock · 防止局部 tiny 再压回 22px */
.btn.tiny {
  min-height: 28px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box;
}
.btn:not(.tiny) {
  min-height: 32px;
}


/* tv143-ui7-pos · 持仓字号尾巴 + 战果 tab 28 + 审计列 120 */
#view-pos .pos-card .pc-league,
#view-pos .pos-card .pc-meta,
#view-pos .pos-card .pc-label,
#view-pos .pos-card .pc-status-tag,
#view-pos .pos-card .pc-col-h,
#posList.pos-list.compact .pos-card .pc-league,
#posList.pos-list.compact .pos-card .pc-live,
#posList.pos-list.compact .pos-card .pc-money,
#posList.pos-list.compact .pos-card .pc-audit summary {
  font-size: 12px;
}
#view-pos .pos-card .pc-live,
#view-pos .pos-card .pc-money,
#posList.pos-list.compact .pos-card .pc-live,
#posList.pos-list.compact .pos-card .pc-money {
  font-variant-numeric: tabular-nums;
}
.stats-tabs button,
.range-bar .btn.tiny,
#view-stats .btn.tiny {
  min-height: 28px !important;
}

/* tv143-ui8 · 产品化：统一加载/空/错误态 + 概览首页 + 帮助层 */
/* ---- 状态组件：骨架屏 / 加载 / 空态 / 错误 ---- */
.skel {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255,255,255,.035) 25%, rgba(255,255,255,.075) 37%, rgba(255,255,255,.035) 63%);
  background-size: 400% 100%;
  border-radius: var(--radius-sm);
  animation: skelShift 1.4s ease-in-out infinite;
}
.skel-line { height: 12px; margin: 6px 0; }
.skel-line.w40 { width: 40%; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-line.w100 { width: 100%; }
.skel-block { height: 64px; margin: 8px 0; }
@keyframes skelShift {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; background: rgba(255,255,255,.05); }
}
.skel-stack { padding: 4px 0; }

.spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: spinRot .8s linear infinite;
}
@keyframes spinRot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; border-top-color: rgba(255,255,255,.4); }
}
.state-note { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 2px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.015);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state .es-icon {
  width: 28px;
  height: 28px;
  opacity: .5;
  color: var(--muted);
}
.empty-state .es-title { font-size: 13px; color: #cfcfd6; }
.empty-state .es-hint { font-size: 12px; line-height: 1.6; max-width: 460px; }
.empty-state .es-hint b { color: var(--gold-soft); font-weight: 500; }

.err-state {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(242,54,69,.32);
  background: rgba(242,54,69,.07);
  border-radius: var(--radius);
  color: #f0b7be;
  font-size: 12px;
  line-height: 1.65;
}
.err-state .es-mark { color: var(--odd); font-weight: 600; }

/* ---- 概览首页 / 帮助术语层 ---- */
.ov-panel { padding-bottom: 18px; }
.ov-onboard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(201,162,39,.32);
  background: linear-gradient(180deg, rgba(201,162,39,.10), rgba(201,162,39,.03));
  border-radius: var(--radius);
}
.ov-onboard .ob-body { flex: 1; min-width: 0; }
.ov-onboard .ob-title { font-size: 13px; font-weight: 600; color: var(--gold-soft); margin-bottom: 4px; }
.ov-onboard .ob-text { font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.ov-onboard .ob-text b { color: var(--gold-soft); font-weight: 500; }
.ov-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ov-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 12px;
}
.ov-split .ov-card { margin-top: 0; }
.ov-card > h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--muted);
  text-transform: none;
}
.ov-rows { display: flex; flex-direction: column; gap: 6px; }
.ov-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,.05);
}
.ov-row:last-child { border-bottom: none; }
.ov-row .k { color: var(--muted); }
.ov-row .v { font-variant-numeric: tabular-nums; color: var(--ink); }
.ov-row .v.up { color: var(--win); }
.ov-row .v.down { color: var(--odd); }
.ov-row .v.muted { color: var(--muted); }
.ov-verdict {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
  padding: 8px 10px;
  border-left: 2px solid var(--gold);
  background: rgba(201,162,39,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.ov-short { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-short .btn { min-height: 30px; }
.ov-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.ov-dot.ok { background: var(--win); }
.ov-dot.warn { background: var(--gold); }
.ov-dot.off { background: #5b5b64; }

/* 帮助术语层 */
.help-intro {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
}
.help-intro b { color: var(--gold-soft); font-weight: 500; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.help-term {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.help-term .ht-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.help-term .ht-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}
.help-term .ht-text { font-size: 12px; line-height: 1.7; color: #c8c8ce; }
.help-term .ht-text b { color: var(--gold-soft); font-weight: 500; }
.help-term .ht-text code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  background: rgba(255,255,255,.05);
  border-radius: 3px;
  padding: 0 3px;
  color: var(--gold-soft);
}
.help-sect-h {
  margin: 18px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.help-disclaim {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: #e8c9a0;
  border: 1px solid rgba(201,162,39,.28);
  background: rgba(201,162,39,.07);
  border-radius: var(--radius);
  padding: 10px 12px;
}

/* tv143-ui8 · 总览/帮助 导航图标 + 移动端底栏收敛（帮助走总览页内入口，避免 6 格挤压） */
.side-nav [data-tab="overview"]::before { content: "◎"; }
.side-nav [data-tab="help"]::before { content: "☰"; }
@media (max-width: 720px) {
  .side-nav > .nav-item[data-tab="help"] { display: none !important; }
  .side-nav > .nav-item[data-tab="overview"] {
    display: flex !important;
    flex: 1 1 0;
    min-width: 0;
  }
  .side-nav > .nav-item[data-tab="overview"]::before { content: "◎"; }
  .side-nav .nav-item[data-tab="overview"],
  .side-nav .nav-item[data-tab="watch"],
  .side-nav .nav-item[data-tab="pos"],
  .side-nav .nav-item[data-tab="stats"],
  .side-nav .nav-item[data-tab="settings"] { font-size: 13px !important; }
}

/* 总览 KPI：4 列（窄屏 2 列），字号收敛 */
.ov-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ov-kpis .kpi .v { font-size: 24px; }
.ov-kpis .kpi .v .muted { font-size: 12px; font-weight: 400; }
@media (max-width: 900px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ov-card .ov-note {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  word-break: break-word;
}
.ov-badge {
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.ov-badge.warn { color: var(--gold-soft); border-color: rgba(201,162,39,.4); background: rgba(201,162,39,.10); }
.ov-badge.ok { color: var(--win); border-color: rgba(38,166,154,.42); background: rgba(38,166,154,.10); }
.ov-badge.bad { color: var(--odd-bright); border-color: rgba(242,54,69,.4); background: rgba(242,54,69,.10); }

/* ─── 总览图表 + 浅色主题 + 引导走查（tv143-ui10，2026-09-16） ─── */

.ov-chart { margin-top: 4px; }
.ov-chart svg { display: block; width: 100%; height: auto; }
.ov-ax { fill: var(--muted); font-size: 10px; font-family: "IBM Plex Mono", monospace; }

.ov-layers { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ov-layer {
  display: grid; grid-template-columns: 76px 1fr 64px; align-items: center;
  gap: 10px; font-size: 12px; cursor: default;
}
.ov-lname { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-lbar { position: relative; display: block; height: 14px; }
.ov-lbar::before {
  content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px;
  width: 1px; background: var(--line-strong, var(--line-strong)); opacity: .6;
}
.ov-lbar i {
  position: absolute; top: 2px; bottom: 2px; border-radius: 3px; display: block;
}
.ov-lbar i.pos { left: 50%; background: var(--win); opacity: .85; }
.ov-lbar i.neg { right: 50%; background: var(--odd); opacity: .85; }
.ov-lroi { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.ov-lroi.up { color: var(--win); }
.ov-lroi.down { color: var(--odd); }

/* 浅色主题（默认深色不变，html[data-theme=light] 覆盖变量） */
html[data-theme="light"] {
  --bg: #f3f4f6;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel2: #f6f7f9;
  --ink: #1c1d22;
  --muted: #63676f;
  --line: rgba(16, 18, 24, .10);
  --head: #eef0f3;
  --gold: #8f6f14;
  --gold-soft: #8f6f14;
  --odd: #cf2f40;
  --win: #10806e;
  --accent: #4b4f57;
  --warn: #8f6f14;
  --danger: #cf2f40;
  --info: #4b4f57;
  --muted-2: #83878e;
  --line-strong: #c4c8cf;
  --panel3: #e9ebee;
  --panel-deep: #dfe2e7;
  --sb-thumb: #c3c7ce;
  --veil: rgba(255, 255, 255, .96);
  --ink-on: #1c1d22;
  --veil-soft: rgba(16,18,24,.06);
  --veil-line: rgba(16,18,24,.09);
  --btn-veil: rgba(16,18,24,.07);
  --hover: #eceef1;
  --hover-2: #e9ebee;
  --win-bg: #e7f4f0;
  --win-bright: #0c7a67;
  --win-line: #b9ded6;
  --odd-bg: #fbeaec;
  --odd-line: #efc3c9;
  --odd-bright: #c22738;
  --ink-2: #2b2d33;
}
html[data-theme="light"] .ov-card { background: rgba(16, 18, 24, .015); }
html[data-theme="light"] .ov-row { border-bottom-color: rgba(16, 18, 24, .07); }

/* 暖灰米白主题：纸本数据室 */
html[data-theme="paper"] {
  --bg: #f0ede5;
  --sidebar: #e7e2d6;
  --panel: #f8f5ed;
  --panel2: #eee9de;
  --ink: #303b34;
  --muted: #696d62;
  --line: rgba(48, 59, 52, .14);
  --head: #f8f5ed;
  --gold: #8b6b35;
  --gold-soft: #8b6b35;
  --odd: #aa5146;
  --win: #42664e;
  --accent: #42664e;
  --warn: #8b6b35;
  --danger: #aa5146;
  --info: #526454;
  --muted-2: #77776b;
  --line-strong: #c8c0b0;
  --panel3: #e8e2d6;
  --panel-deep: #e7e2d6;
  --sb-thumb: #bcb4a5;
  --veil: rgba(248, 245, 237, .97);
  --ink-on: #303b34;
  --veil-soft: rgba(48, 59, 52, .07);
  --veil-line: rgba(48, 59, 52, .14);
  --btn-veil: rgba(48, 59, 52, .08);
  --hover: #e9e4d9;
  --hover-2: #e5dfd3;
  --win-bg: #e2ebdf;
  --win-bright: #355a43;
  --win-line: #c1d0bc;
  --odd-bg: #f3e5df;
  --odd-line: #dfc0b5;
  --odd-bright: #98483e;
  --ink-2: #3c463d;
}
html[data-theme="paper"] .ov-card { background: rgba(48, 59, 52, .025); }
html[data-theme="paper"] .ov-row { border-bottom-color: rgba(48, 59, 52, .09); }

/* 主题切换按钮 */
.btn-theme { font-size: 13px; line-height: 1; padding: 0 10px; }
.theme-choice-row { align-items: flex-start; flex-direction: column; gap: 6px; }
.theme-choice-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-choice-bar .btn { min-height: 30px; }
.theme-choice-bar .btn.on { color: var(--ink-on); background: var(--btn-veil); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* 新手引导走查（spotlight 聚光罩） */
.tour-veil {
  position: fixed; z-index: 200; inset: 0;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
}
.tour-spot {
  position: fixed; z-index: 201; border-radius: 8px;
  box-shadow: 0 0 0 4000px rgba(6, 7, 10, .72);
  border: 1px solid var(--gold-soft);
  transition: all .28s ease;
  pointer-events: none;
}
.tour-card {
  position: fixed; z-index: 202; width: min(320px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.tour-card .t-step { font-size: 10px; color: var(--gold-soft); letter-spacing: 1px; margin-bottom: 6px; }
.tour-card .t-title { font-size: 14px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.tour-card .t-text { font-size: 12px; line-height: 1.75; color: var(--muted); margin-bottom: 12px; }
.tour-card .t-acts { display: flex; justify-content: space-between; align-items: center; }
.tour-card .t-acts .right { display: flex; gap: 8px; }

/* 可访问性：全局 focus-visible + 键盘可达 */
:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 滚动条（浅色可读） */
html { scrollbar-color: var(--sb-thumb, var(--line-strong)) var(--bg); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb, var(--line-strong)); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* 表格 hover 打磨 */
.table tbody tr:hover, table tbody tr:hover { background: rgba(127, 127, 140, .06); }
html[data-theme="light"] .skel { background: rgba(16, 18, 24, .06); }
html[data-theme="light"] .tour-spot { box-shadow: 0 0 0 4000px rgba(244, 245, 247, .82); }
html[data-theme="paper"] .skel { background: rgba(48, 59, 52, .07); }
html[data-theme="paper"] .tour-spot { box-shadow: 0 0 0 4000px rgba(240, 237, 229, .82); }
.tour-card kbd { font-family: inherit; font-size: 11px; }

/* 浅色主题细节修正（tv143-ui10） */
html[data-theme="light"] .btn.primary,
html[data-theme="light"] .btn.primary:hover { color: #fff; }
html[data-theme="light"] .tag.good,
html[data-theme="light"] .tag.bad { color: var(--win-bright); }
html[data-theme="light"] .tag.bad { color: var(--odd-bright); }
html[data-theme="paper"] .btn.primary,
html[data-theme="paper"] .btn.primary:hover { color: #fff; }
html[data-theme="paper"] .tag.good { color: var(--win-bright); }
html[data-theme="paper"] .tag.bad { color: var(--odd-bright); }
/* 红绿对调设置在浅色下同样生效（须晚于浅色块，否则被覆盖） */
html[data-theme="light"][data-pnl-color="cn"] { --win: #cf2f40; --odd: #10806e; }
html[data-theme="paper"][data-pnl-color="cn"] { --win: #aa5146; --odd: #42664e; }

/* ===== ui11（2026-09-16）：图表交互（hover 提示 / 分层下钻 / 引导进度点） ===== */
.ov-chart { position: relative; }
.ov-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: var(--panel3); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 5px 9px; font-size: 11px; line-height: 1.55;
  color: var(--ink); white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .12s;
}
.ov-tip b { font-weight: 600; }
#ovDaily rect { transition: opacity .12s; }
#ovDaily rect:hover { opacity: 1; }
/* 分层行：可点击下钻（键盘亦可） */
.ov-layer { cursor: pointer; border-radius: 6px; padding: 3px 6px; margin: 0 -6px; transition: background .12s; }
.ov-layer:hover { background: var(--hover); }
.ov-layer:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
/* 下钻后战果页目标块闪烁定位 */
.ov-flash { animation: ovflash 1.6s ease; }
@keyframes ovflash {
  0%, 60% { background: var(--win-bg); box-shadow: 0 0 0 1px var(--win) inset; }
  100% { background: transparent; box-shadow: none; }
}
/* 引导进度点 */
.t-dots { margin-left: 7px; display: inline-flex; gap: 4px; vertical-align: 1px; }
.t-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.t-dots i.on { background: var(--gold); }


/* tv143-pool1 · 战果样本池拆开 */
#settledPoolBar { margin-top: 8px; }
.kpi-pool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi-pool-card {
  border: 1px solid var(--line, #1c222b);
  border-radius: 10px;
  padding: 8px 8px 4px;
  background: var(--panel-2, rgba(255,255,255,.02));
}
.kpi-pool-h {
  font-size: 12px;
  font-weight: 600;
  margin: 0 4px 6px;
  color: var(--muted, #8b98a8);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.kpi-pool-h em {
  font-style: normal;
  color: var(--fg, #d7dde6);
  font-weight: 600;
}
.kpi-pool-card .kpi-grid { margin: 0; }
.pool-tag {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--line, #2a3340);
  color: var(--muted, #8b98a8);
  margin-left: 6px;
  vertical-align: middle;
}
.pool-tag.browser { color: #93c5fd; border-color: #3b82f655; }
.pool-tag.headless { color: #c4b5fd; border-color: #8b5cf655; }
.pool-tag.other { color: #fbbf24; border-color: #f59e0b55; }
@media (max-width: 720px) {
  .kpi-pool-split { grid-template-columns: 1fr; }
}

/* tv143-mob-range1 · 手机战果时间窗/选中态 */
@media (max-width: 720px) {
  #statsFilter {
    position: sticky;
    top: calc(var(--mobile-head-h, 58px) + env(safe-area-inset-top, 0px));
    z-index: 6;
    background: var(--bg, #0b0d10);
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
  }
  #settledPoolBar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #settledPoolBar::-webkit-scrollbar { display: none; }
  .range-bar.seg-bar .btn.tiny,
  #settledPoolBar .btn.tiny {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
  }
  /* iOS 皮肤原先只认 .active，战果 tabs/range 实际用 .on */
  .stats-tabs button.on,
  .range-bar .btn.on,
  .range-bar .btn.tiny.on,
  #settledPoolBar .btn.on,
  #settledPoolBar .btn.tiny.on {
    background: rgba(48, 213, 200, 0.18) !important;
    color: var(--ios-teal, #30d5c8) !important;
    border-color: rgba(48, 213, 200, 0.35) !important;
  }
  .kpi-pool-split { grid-template-columns: 1fr; gap: 8px; }
  .kpi-pool-h { font-size: 13px; }
  /* 日期框在窄屏占宽，容易误触；收到第二行并缩小 */
  .range-bar .field input[type="date"] {
    min-width: 128px;
    width: 128px;
    font-size: 16px; /* 防 iOS 聚焦自动放大 */
  }
}

/* tv143-posfont1 · 持仓注单字号加大 */
.pos-card { font-size: 14px; }
.pos-card .pc-league { font-size: 13px; }
.pos-card .pc-vs { font-size: 16px; }
.pos-card .pc-label { font-size: 13px; }
.pos-card .pc-live { font-size: 14px; }
.pos-card .pc-money { font-size: 13px; }
.pos-card .pc-trial { font-size: 13px; }
.pos-card .pc-status-tag { font-size: 12px; }
.pos-card .pc-pick { font-size: 14px; }
.pos-card .pc-score,
.pos-card .pc-pnl { font-size: 16px; }
.pos-card .pc-meta { font-size: 13px; }
#posList.pos-list.compact .pos-card { font-size: 14px; }
#posList.pos-list.compact .pos-card .pc-league { font-size: 13px; }
#posList.pos-list.compact .pos-card .pc-vs { font-size: 15px; }
#posList.pos-list.compact .pos-card .pc-live,
#posList.pos-list.compact .pos-card .pc-money { font-size: 13px; }
#posList.pos-list.compact .pos-card .pc-label { font-size: 13px; }
@media (max-width: 720px) {
  .pos-card, #posList.pos-list.compact .pos-card {
    font-size: 15px;
    padding: 12px;
    gap: 9px;
  }
  .pos-card .pc-league { font-size: 14px; }
  .pos-card .pc-vs,
  .pos-card .pc-score,
  .pos-card .pc-pnl { font-size: 17px; }
  .pos-card .pc-pick,
  .pos-card .pc-live { font-size: 15px; }
  .pos-card .pc-money,
  .pos-card .pc-label,
  .pos-card .pc-meta,
  .pos-card .pc-trial { font-size: 14px; }
  .pos-card .pc-status-tag { font-size: 13px; padding: 3px 8px; }
}

/* tv143-posfont2 · 手机持仓：更大字 + 纯黑底 + 明显分割线 */
@media (max-width: 720px) {
  #view-pos,
  #view-pos .panel,
  #view-pos .content,
  #posList,
  #posList.pos-list,
  #posList.pos-list.compact {
    background: #000 !important;
    background-color: #000 !important;
  }
  #view-pos .panel {
    border-color: #1a1a1a !important;
    box-shadow: none !important;
  }
  #posList.pos-list,
  #posList.pos-list.compact {
    gap: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #view-pos .pos-card,
  .pos-card,
  #posList.pos-list.compact .pos-card {
    background: #000 !important;
    background-color: #000 !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 2px solid #2e2e2e !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 16px 14px !important;
    gap: 10px !important;
    font-size: 16px !important;
  }
  #view-pos .pos-card:last-child,
  #posList .pos-card:last-child {
    border-bottom-width: 2px !important;
  }
  #view-pos .pos-card .pc-league,
  .pos-card .pc-league { font-size: 15px !important; }
  #view-pos .pos-card .pc-vs,
  #view-pos .pos-card .pc-score,
  #view-pos .pos-card .pc-pnl,
  .pos-card .pc-vs,
  .pos-card .pc-score,
  .pos-card .pc-pnl { font-size: 19px !important; }
  #view-pos .pos-card .pc-pick,
  #view-pos .pos-card .pc-live,
  .pos-card .pc-pick,
  .pos-card .pc-live { font-size: 16px !important; }
  #view-pos .pos-card .pc-money,
  #view-pos .pos-card .pc-label,
  #view-pos .pos-card .pc-meta,
  #view-pos .pos-card .pc-trial,
  #view-pos .pos-card .pc-col-h,
  #posList.pos-list.compact .pos-card .pc-league,
  #posList.pos-list.compact .pos-card .pc-live,
  #posList.pos-list.compact .pos-card .pc-money,
  #posList.pos-list.compact .pos-card .pc-label,
  #posList.pos-list.compact .pos-card .pc-audit summary,
  .pos-card .pc-money,
  .pos-card .pc-label,
  .pos-card .pc-meta,
  .pos-card .pc-trial { font-size: 15px !important; }
  #view-pos .pos-card .pc-status-tag,
  .pos-card .pc-status-tag {
    font-size: 14px !important;
    padding: 4px 9px !important;
  }
}

/* tv143-mobux1 · 手机战果体验包 */
.stats-custom-dates {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.stats-custom-dates > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line, #2a3340);
  background: var(--head, #141a22);
  color: var(--muted, #8b98a8);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}
.stats-custom-dates > summary::-webkit-details-marker { display: none; }
.stats-custom-dates[open] > summary {
  color: var(--ink, #e8edf4);
  border-color: var(--win, #30d5c8);
  background: var(--win-bg, rgba(48,213,200,.14));
}
.stats-custom-dates-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 0 2px;
}
@media (max-width: 720px) {
  /* 1) 分段换行，短标签，少滑过头 */
  #statsTabs.stats-tabs {
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
  }
  #statsTabs.stats-tabs button {
    flex: 0 0 auto;
    min-height: 34px !important;
    padding: 5px 11px !important;
    font-size: 13px !important;
  }
  #statsTabs.stats-tabs button[data-short] {
    font-size: 0 !important;
  }
  #statsTabs.stats-tabs button[data-short]::after {
    content: attr(data-short);
    font-size: 13px;
    font-weight: 600;
  }
  /* 2) 日期在自定义折叠内 */
  #rangeBar .stats-custom-dates {
    flex: 1 0 100%;
    margin-top: 2px;
  }
  #rangeBar .stats-custom-dates-body {
    width: 100%;
  }
  #rangeBar .stats-custom-dates-body .field {
    flex: 1 1 140px;
  }
  /* 3) 日历：列表更合适（逻辑默认 list；格子仍可选手动） */
  #sec-cal .cal-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 4) 审计默认折叠、更克制 */
  .audit-trail.audit-mobile {
    margin-top: 6px;
  }
  .audit-trail.audit-mobile > summary {
    font-size: 13px;
    color: var(--muted, #8b98a8);
    padding: 4px 0;
  }
  .audit-trail.audit-mobile:not([open]) .audit-body {
    display: none !important;
  }
  .audit-trail.audit-mobile .audit-body {
    font-size: 12px;
    max-height: 40vh;
    overflow: auto;
    padding: 6px 0 2px;
    border-top: 1px solid #222;
  }
  /* 5) 底栏安全区：战果末行不被挡住 */
  #view-stats.view.active,
  #view-stats {
    padding-bottom: calc(var(--mobile-nav-h, 78px) + env(safe-area-inset-bottom, 0px) + 28px) !important;
  }
  #app.mac-shell {
    padding-bottom: calc(var(--mobile-nav-h, 78px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
  }
  #settledList.ticket-list,
  #settledList {
    padding-bottom: 24px;
  }
}

/* 6) 横屏窄高：压标题/底栏，内容多留一截 */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 500px) {
  :root {
    --mobile-head-h: 44px;
    --mobile-nav-h: 52px;
  }
  #app.mac-shell {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .titlebar, #app .titlebar {
    min-height: 44px !important;
    height: auto !important;
    padding-top: max(4px, env(safe-area-inset-top)) !important;
    padding-bottom: 4px !important;
  }
  .side-nav, .tabbar, nav.side-nav {
    height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 2px !important;
    padding-bottom: calc(2px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #statsFilter {
    top: calc(44px + env(safe-area-inset-top, 0px)) !important;
  }
  #statsTabs.stats-tabs {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  .kpi .v { font-size: 16px !important; }
  #view-stats .panel { margin-bottom: 8px !important; }
  .pos-card, #posList .pos-card {
    padding: 10px 12px !important;
  }
}

/* ========== tv143-mobux2b · 阶段一→三（修顶栏 backdrop 困底栏）（仅 ≤720px；桌面零变化） ========== */
@media (max-width: 720px) {
  :root {
    --mobile-head-h: 44px;
    --mobile-nav-h: 56px;
  }

  /* A) 顶栏瘦身 44px + 紧凑心跳胶囊 */
  .sidebar.tabbar {
    height: calc(var(--mobile-head-h) + env(safe-area-inset-top));
    min-height: calc(var(--mobile-head-h) + env(safe-area-inset-top));
    padding: max(4px, env(safe-area-inset-top)) 10px 4px;
    align-items: center;
    gap: 8px;
    /* 禁止 filter/backdrop：否则会成为 fixed 底栏的 containing block，底栏/顶栏一起消失 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
    perspective: none !important;
    contain: none !important;
    overflow: visible !important;
    background: rgba(0, 0, 0, 0.92) !important;
  }
  .side-brand { gap: 7px; flex: 1 1 auto; min-width: 0; }
  .side-brand .logo-icon {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
    border-radius: 6px;
  }
  .side-brand h1 {
    font-size: 14px !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  .mobile-hb-cap {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
    max-width: 46%;
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d7fff8;
    background: rgba(48, 213, 200, 0.16);
    border: 1px solid rgba(48, 213, 200, 0.35);
    box-shadow: 0 0 10px rgba(48, 213, 200, 0.18);
  }
  .mobile-hb-cap.ok {
    color: #d7fff8;
    background: rgba(48, 213, 200, 0.18);
    border-color: rgba(48, 213, 200, 0.4);
    box-shadow: 0 0 12px rgba(48, 213, 200, 0.28);
  }
  .mobile-hb-cap.warn {
    color: #ffe0b0;
    background: rgba(255, 160, 40, 0.18);
    border-color: rgba(255, 160, 40, 0.45);
    box-shadow: none;
  }
  .mobile-hb-cap.bad {
    color: #ffc9c9;
    background: rgba(220, 70, 70, 0.2);
    border-color: rgba(220, 70, 70, 0.5);
    animation: mobHbBlink 1.1s ease-in-out infinite;
  }
  .mobile-hb-cap.idle {
    color: #b0b0b8;
    background: rgba(80, 80, 90, 0.25);
    border-color: rgba(120, 120, 130, 0.35);
    box-shadow: none;
  }
  @keyframes mobHbBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }

  /* 压缩 titlebar：心跳细节进胶囊，少占纵向 */
  .titlebar {
    min-height: 0 !important;
    height: auto !important;
    padding: 2px 8px !important;
    gap: 4px !important;
  }
  .titlebar-left #lastTickEl,
  .titlebar-left #hbBar,
  .titlebar-left #hbMsg,
  .titlebar-left #locateHint { display: none !important; }
  .titlebar-left #sourceStatusPill { max-width: 120px; }
  #btnShortcutsHelp,
  #btnCockpitToggle { display: none !important; }
  .titlebar-right .btn { min-height: 30px; padding: 3px 7px; font-size: 12px; }

  /* B) 盯盘单据三层卡片 */
  #shoutFeed.ticket-list .ticket.tape.tape-m,
  #passFeed.ticket-list .ticket.tape.tape-m {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "left pick"
      "mid mid"
      "tag action"
      "more more" !important;
    gap: 6px 10px !important;
    padding: 10px 12px !important;
    align-items: center;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left,
  #passFeed.ticket-list .ticket.tape.tape-m .t-left {
    grid-area: left;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    line-height: 1.35;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .lg,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .min,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .t-score-inline {
    display: inline;
    font-size: 12px;
    color: var(--muted, #8e8e93);
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .lg::after,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .min::after {
    content: " · ";
    color: #555;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .clk,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .sig-tag,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-mid .t-score-desk,
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-mid .sig-reason {
    display: none !important;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-mid {
    grid-area: mid;
    min-width: 0;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-mid .ticket-pick {
    grid-area: pick;
    /* pick is inside mid — hoist via absolute-ish: use display contents */
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-mid {
    display: contents;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .vs {
    grid-area: mid;
    font-size: 14px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35 !important;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .ticket-pick {
    grid-area: pick;
    justify-self: end;
    align-self: center;
    font-size: 12px;
    white-space: nowrap;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .ticket-pick .od {
    font-size: 14px !important;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--ios-teal, #30d5c8);
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .ticket-pick .sel,
  #shoutFeed.ticket-list .ticket.tape.tape-m .ticket-pick .ln {
    font-size: 12px !important;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .sig-tag {
    grid-area: tag;
    display: inline-flex !important;
    align-items: center;
    font-size: 11px;
    font-weight: 650;
    color: var(--accent, #7dd3fc);
  }
  /* sig-tag lives in t-left; with display contents on mid only — re-show tag in left flow bottom */
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .sig-tag {
    display: none !important;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-right {
    grid-area: action;
    margin-left: 0 !important;
    align-items: stretch;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-more {
    grid-area: more;
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .btn-locate,
  #shoutFeed.ticket-list .ticket.tape.tape-m .btn.tiny {
    min-height: 40px !important;
    min-width: 72px;
    padding: 8px 12px !important;
    font-size: 14px !important;
  }

  /* C) 四键底栏 + 更多 sheet */
  .side-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 100 !important;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)) !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
    gap: 2px !important;
    overflow-x: hidden !important;
    justify-content: space-between;
    /* 底栏自身可毛玻璃；祖先不可 */
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  }
  .side-nav > .nav-item,
  .side-nav > .nav-fold,
  .side-nav > #pairDock {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .side-nav .nav-item,
  .side-nav .nav-parent,
  .side-nav #pairDock {
    min-height: 48px !important;
    padding: 22px 2px 4px !important;
    font-size: 11px !important;
    font-weight: 700;
  }
  .side-nav .nav-item::before,
  .side-nav #pairDock::before {
    top: 5px !important;
    font-size: 17px !important;
  }
  .side-nav > .nav-item[data-tab="overview"],
  .side-nav > .nav-item[data-tab="settings"],
  .side-nav > .nav-item[data-tab="sub"],
  .side-nav > .nav-item[data-tab="strat"],
  .side-nav > .nav-item[data-tab="admin"],
  .side-nav > .nav-item[data-tab="recon"],
  .side-nav > .nav-item[data-tab="help"],
  .side-nav > .nav-fold,
  .side-nav > #pairDock {
    display: none !important;
  }
  .side-nav > .nav-item[data-tab="watch"],
  .side-nav > .nav-item[data-tab="pos"],
  .side-nav > .nav-item[data-tab="stats"],
  .side-nav > #navMore {
    display: flex !important;
    flex: 1 1 0 !important;
  }
  #navMore::before { content: "⋯"; }
  .nav-pos-badge {
    position: absolute;
    top: 2px;
    right: 10%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e85d5d;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    z-index: 2;
  }
  #app.mac-shell {
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 10px) !important;
  }
  #view-stats.view.active,
  #view-stats {
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 24px) !important;
  }

  /* D) 大表首列冻结 */
  #view-stats,
  #view-stats .panel,
  .rule-attr-wrap,
  #adminList,
  #sec-cal .cal-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #view-stats table th:first-child,
  #view-stats table td:first-child,
  table.rule-attr th:first-child,
  table.rule-attr td:first-child,
  .admin-table th:first-child,
  .admin-table td:first-child,
  .cal-table th:first-child,
  .cal-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #141418;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
  }
  #view-stats table thead th:first-child,
  table.rule-attr thead th:first-child,
  .admin-table thead th:first-child,
  .cal-table thead th:first-child {
    z-index: 3;
  }

  /* E) 弹窗软键盘 */
  #authGate .gate-card,
  #authGate,
  .gate-card,
  .shortcut-dialog,
  .pay-gate .gate-card {
    max-height: 85vh;
    overflow-y: auto;
  }

  /* Touch scrub tip fade */
  .chart-tip.fade-out {
    opacity: 0;
    transition: opacity .2s ease;
  }
  #equityWrap,
  .equity-wrap {
    touch-action: none;
  }
}

/* 桌面：强制隐藏手机「更多」与胶囊 */
#navMore,
#mobileMoreSheet,
.mobile-hb-cap,
.nav-pos-badge {
  display: none !important;
}
@media (max-width: 720px) {
  #navMore { display: flex !important; }
  .mobile-hb-cap { display: inline-flex !important; }
  .nav-pos-badge:not([hidden]) { display: inline-block !important; }
  #mobileMoreSheet:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 200;
  }
  #mobileMoreSheet[hidden] { display: none !important; }
  .mobile-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }
  .mobile-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(72vh, 520px);
    padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    background: #1c1c1e;
    border-top: 0.5px solid rgba(84, 84, 88, 0.65);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }
  html[data-theme="light"] .mobile-more-panel { background: #fff; border-color: #d9dce1; }
  html[data-theme="paper"] .mobile-more-panel { background: #f8f5ed; border-color: #d8d1c3; }
  html[data-theme="light"] .mobile-more-grab { background: #c5c8ce; }
  html[data-theme="paper"] .mobile-more-grab { background: #bcb4a5; }
  html[data-theme="light"] .mobile-more-title { color: #707986; }
  html[data-theme="paper"] .mobile-more-title { color: #696d62; }
  html[data-theme="light"] .mobile-more-item { background: #f3f5f7; color: #202630; border-color: #e2e6eb; }
  html[data-theme="paper"] .mobile-more-item { background: #eee9de; color: #303b34; border-color: #d8d1c3; }
  .mobile-more-grab {
    width: 36px;
    height: 4px;
    margin: 4px auto 10px;
    border-radius: 999px;
    background: #3a3a3c;
  }
  .mobile-more-title {
    font-size: 13px;
    font-weight: 700;
    color: #8e8e93;
    margin-bottom: 8px;
  }
  .mobile-more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mobile-more-item {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid #2c2c2e;
    background: #2c2c2e;
    color: #f5f5f7;
    font-size: 15px;
    font-weight: 650;
  }
  .mobile-more-item:active { background: #3a3a3c; }
  .mobile-more-cancel {
    width: 100%;
    margin-top: 10px;
    min-height: 44px;
  }
}

/* 桌面 tape：.t-score-inline 仅手机用，桌面隐藏以免多一行 */
.ticket.tape .t-score-inline { display: none; }
@media (max-width: 720px) {
  .ticket.tape .t-score-inline { display: inline; }
  .ticket.tape .t-score-desk { display: none !important; }
}

/* tape-m status: desktop keep left tag; mobile use t-status sibling */
.ticket.tape .sig-tag-mob,
.ticket.tape .t-status { display: none; }
@media (max-width: 720px) {
  #shoutFeed.ticket-list .ticket.tape.tape-m .sig-tag-desk { display: none !important; }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-status.sig-tag-mob {
    display: inline-flex !important;
    grid-area: tag;
    align-items: center;
    font-size: 11px;
    font-weight: 650;
    color: var(--accent, #7dd3fc);
  }
  #shoutFeed.ticket-list .ticket.tape.tape-m .t-left .sig-tag {
    display: none !important;
  }
  /* clear conflicting rule that hid all sig-tag in left */
  #shoutFeed.ticket-list .ticket.tape.tape-m .sig-tag {
    /* noop — specific rules above win */
  }
}

/* ========== navcollapse1 · 桌面侧栏可收缩（仅 ≥721px；手机端底栏零变化） ========== */
:root { --sidebar-w-collapsed: 60px; }
.sidebar.tabbar .side-collapse-btn { display: none; }
@media (min-width: 721px) {
  .sidebar.tabbar {
    transition: width .2s ease, min-width .2s ease, padding .2s ease;
    overflow-x: hidden;
  }
  .sidebar.tabbar.no-anim { transition: none !important; }
  .side-brand { gap: 8px; padding-left: 2px; padding-right: 2px; }
  .side-brand .brand-text { flex: 1 1 auto; }
  .side-brand h1 { white-space: nowrap; }
  .sidebar.tabbar .side-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 22px;
    margin-left: auto;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted-2);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    box-shadow: none;
  }
  .sidebar.tabbar .side-collapse-btn:hover { background: var(--veil-soft); color: var(--ink-on); }
  .side-nav .nav-item, .side-nav #pairDock { white-space: nowrap; }

  /* —— 收起态 —— */
  #app.side-collapsed .sidebar.tabbar {
    width: var(--sidebar-w-collapsed);
    min-width: var(--sidebar-w-collapsed);
    padding: 12px 6px 12px;
  }
  #app.side-collapsed .side-brand {
    flex-direction: column;
    gap: 8px;
    padding: 2px 0 10px;
  }
  #app.side-collapsed .side-brand .brand-text { display: none; }
  #app.side-collapsed .side-brand .logo-icon { width: 32px; height: 32px; flex-basis: 32px; }
  #app.side-collapsed .sidebar.tabbar .side-collapse-btn { margin-left: 0; width: 32px; flex-basis: 22px; }

  #app.side-collapsed .side-nav .nav-item,
  #app.side-collapsed .side-nav #pairDock {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 8px 0;
    font-size: 0;
    text-align: center;
  }
  #app.side-collapsed .side-nav .nav-item::before,
  #app.side-collapsed .side-nav #pairDock::before {
    content: attr(data-short);
    display: block;
    font-size: 18px;
    line-height: 20px;
    font-weight: 650;
  }
  #app.side-collapsed .side-nav [data-tab="overview"]::before { content: "◎"; }
  #app.side-collapsed .side-nav [data-tab="watch"]::before { content: "◉"; }
  #app.side-collapsed .side-nav [data-tab="pos"]::before { content: "▤"; }
  #app.side-collapsed .side-nav [data-tab="stats"]::before { content: "▥"; }
  #app.side-collapsed .side-nav [data-tab="sub"]::before { content: "◇"; }
  #app.side-collapsed .side-nav [data-tab="strat"]::before { content: "⚙"; }
  #app.side-collapsed .side-nav [data-tab="admin"]::before { content: "♙"; }
  #app.side-collapsed .side-nav [data-tab="settings"]::before { content: "☷"; }
  #app.side-collapsed .side-nav [data-tab="recon"]::before { content: "⚗"; }
  #app.side-collapsed .side-nav [data-tab="help"]::before { content: "☰"; }
  #app.side-collapsed .side-nav #pairDock::before { content: "✦"; }
  #app.side-collapsed #pairDock .msg-n {
    position: absolute;
    top: 2px;
    right: 4px;
    margin: 0;
    font-size: 10px;
    line-height: 1;
  }
  /* 策略：小三角贴右缘，子项改为浮层 */
  #app.side-collapsed .nav-fold { position: relative; }
  #app.side-collapsed .nav-fold .nav-parent::after {
    position: absolute;
    right: 3px;
    top: 50%;
    margin: -4px 0 0;
    transform: none !important;
  }
  #app.side-collapsed .nav-fold .nav-kids { display: none !important; }
  #app.side-collapsed .nav-fold.flyout .nav-kids {
    display: flex !important;
    position: fixed;
    left: var(--fly-left, 60px);
    top: var(--fly-top, 80px);
    z-index: 300;
    min-width: 136px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 6px;
    gap: 1px;
    background: var(--sidebar);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  }
  #app.side-collapsed .nav-fold.flyout .nav-kids::before {
    content: attr(data-fly-title);
    display: block;
    padding: 4px 10px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-2);
    letter-spacing: .04em;
  }
  #app.side-collapsed .nav-fold.flyout .nav-sub { white-space: nowrap; padding: 7px 12px; }

  /* 页脚：仅保留持仓数 + 状态点；账号只留「退出」 */
  #app.side-collapsed .side-stats {
    justify-items: center;
    text-align: center;
    gap: 6px;
  }
  #app.side-collapsed .side-stats .k { display: none; }
  #app.side-collapsed #openCountEl { font-size: 13px; }
  #app.side-collapsed #runStateEl { font-size: 0; display: inline-flex; justify-content: center; }
  #app.side-collapsed #runStateEl .st-dot { width: 9px; height: 9px; margin: 0; }
  #app.side-collapsed .acct-chip { text-align: center; }
  #app.side-collapsed .acct-chip .acct-name,
  #app.side-collapsed .acct-chip .acct-remain { display: none; }
  #app.side-collapsed .acct-chip .btn {
    width: 100%;
    min-width: 0;
    padding: 0 2px;
    font-size: 11px;
  }
}
@media (max-width: 720px) {
  .sidebar.tabbar .side-collapse-btn { display: none !important; }
}

/* ========== navlogin1 · 手机端登录：输入框加高、收窄居中（仅 ≤768px；桌面零变化） ========== */
@media (max-width: 768px) {
  #authGate.gate {
    max-height: none;
    align-items: flex-start;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
  #authGate .gate-card {
    width: 100%;
    max-width: 360px;
    margin: auto;
    padding: 22px 20px 20px;
  }
  #authGate .gate-card .gate-field {
    gap: 8px;
    font-size: 15px;
    margin-bottom: 16px;
  }
  #authGate .gate-card input[type="text"],
  #authGate .gate-card input[type="password"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    padding: 0 14px;
    font-size: 17px;
    line-height: 1.2;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
  }
  #authGate .gate-card .row {
    display: flex;
    gap: 12px;
    margin: 8px 0 10px;
  }
  #authGate .gate-card .row .btn {
    flex: 1 1 0;
    height: 50px;
    min-height: 50px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 12px;
  }
}

/* ========== wallnav1 · 侧栏「大屏」入口（2026-10-05；新窗口打开 wall.html；手机底栏不出现——.side-nav > .nav-fold 已隐藏，入口在「更多」） ========== */
a.nav-sub.nav-wall-link { display: block; text-decoration: none; box-sizing: border-box; }
a.nav-sub.nav-wall-link::after { content: "\00a0↗"; opacity: .55; font-size: 11px; }
@media (min-width: 721px) {
  #app.side-collapsed .side-nav #navWall::before { content: "▣"; }
}
a.mobile-more-link { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.mobile-more-title.mobile-more-sub { margin-top: 12px; }


/* ui3fix-20261011：雷达首屏精简 · 战果筛选抽屉 · 持仓情景文案 */
.lab-console-fold > summary.lab-console-sum {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  cursor: pointer;
  padding: 10px 12px;
  user-select: none;
}
.lab-console-fold > summary.lab-console-sum::-webkit-details-marker { display: none; }
.lab-console-title { font-weight: 700; font-size: 14px; }
.lab-console-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lab-console-body { padding: 0 0 8px; }
.lab-console-fold:not([open]) .lab-verdict-hero,
.lab-console-fold:not([open]) .lab-gate-mini { display: none; }
.stats-scope-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  flex-wrap: wrap;
}
.stats-scope-chip {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--hover-2, rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-filter-drawer {
  padding: 0 8px 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.stats-filter-drawer.hidden { display: none !important; }
.pos-card .pc-status-tag { font-size: 11px; color: var(--muted); }
.pc-scen-foot { color: var(--muted); }
@media (max-width: 720px) {
  .lab-console-fold > summary.lab-console-sum { padding: 8px 10px; gap: 6px; }
  .lab-console-actions { width: 100%; margin-left: 0; }
  .stats-scope-chip { white-space: normal; font-size: 11px; }
  .stats-filter-drawer .range-bar { flex-wrap: wrap; }
}
