:root {
  --bg0: #f4f5f7;
  --bg1: #ffffff;
  --ink: #12151c;
  --ink-2: #2a303c;
  --muted: #6b7382;
  --soft: #3d4452;
  --line: rgba(18, 21, 28, 0.08);
  --line2: rgba(18, 21, 28, 0.14);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --chrome-1: #f8f9fb;
  --chrome-2: #d5dae3;
  --chrome-3: #8e97a8;
  --accent: #1c2433;
  --ok: #1f8a52;
  --ok-soft: #e6f7ee;
  --bad: #c23b3b;
  --bad-soft: #fdeeee;
  --radius: 18px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Segoe UI Semibold", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
  --max: 1480px;
  --blur: 22px;
  --shadow: 0 18px 50px rgba(30, 40, 60, 0.08);
  --shadow-sm: 0 8px 24px rgba(30, 40, 60, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 480px at 8% -6%, rgba(255, 255, 255, 0.95), transparent 55%),
    radial-gradient(780px 420px at 96% 2%, rgba(190, 200, 220, 0.28), transparent 50%),
    radial-gradient(700px 500px at 50% 110%, rgba(210, 218, 232, 0.35), transparent 55%),
    linear-gradient(165deg, #fbfcfe 0%, #eef1f6 46%, #e7ebf2 100%);
  color: var(--ink);
  font-family: var(--font);
}
body { font-size: 14px; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.45) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 28px 56px;
}

/* —— 顶栏：Logo 裸露 + 托盘毛玻璃 —— */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.brand-logo {
  width: auto;
  height: 72px;
  max-width: 260px;
  object-fit: contain;
  object-position: left center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: contrast(1.05);
}

.topbar-tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.85), rgba(255,255,255,0.45)),
    var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    var(--shadow-sm);
}

.nav {
  display: flex;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}
.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,0.55); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(180deg, #3a4252 0%, #1a2030 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 6px 16px rgba(20, 28, 40, 0.22);
}

.top-tools select {
  background: rgba(255,255,255,0.75);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 8px 14px;
}

.main { min-height: 60vh; }
.view.hidden, .hidden { display: none !important; }

.glass-panel {
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(255,255,255,0.88), rgba(255,255,255,0.5) 48%, rgba(245,247,252,0.62)),
    var(--glass-strong);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    var(--shadow);
}

/* —— Hero —— */
.hero {
  margin-bottom: 16px;
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.8);
  background:
    linear-gradient(125deg, rgba(255,255,255,0.92), rgba(255,255,255,0.42) 42%, rgba(236,240,248,0.55)),
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(236,240,247,0.55));
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 #fff,
    0 22px 55px rgba(35, 45, 65, 0.09);
}
.hero.has-stake {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.15fr);
  gap: 18px 22px;
  align-items: stretch;
}
.hero-main { min-width: 0; }
.hero-stake,
.stake-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.85);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.95), rgba(236,240,248,0.7));
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stake-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stake-card-hd strong {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.stake-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stake-ratio-btn {
  font-size: 11px !important;
  padding: 5px 10px !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap;
}
.stake-copy {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}
.stake-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}
.stake-side {
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(20, 24, 31, 0.08);
  background: #fff;
  min-width: 0;
}
.stake-side.on {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(110, 231, 183, 0.14);
}
.stake-side.off {
  border-color: rgba(20, 24, 31, 0.1);
  background: rgba(248, 250, 252, 0.95);
}
.stake-side-hd {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.stake-side-hd b { font-size: 18px; color: #0f766e; }
.stake-side.off .stake-side-hd b { color: var(--ink); }
.stake-per-inp {
  width: 3.6em;
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #0f766e;
  background: #fff;
  vertical-align: baseline;
}
.stake-side.off .stake-per-inp {
  border-color: rgba(20, 24, 31, 0.18);
  color: var(--ink);
}
tr.hk-main {
  cursor: pointer;
}
tr.hk-main:hover {
  background: rgba(15, 118, 110, 0.05);
}
.hk-detail-sec {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 24, 31, 0.08);
  background: #fff;
  margin-top: 10px;
}
.hk-board-box .friend-formula-list,
.hk-detail-sec .friend-formula-list {
  margin: 4px 0 8px;
}
.hk-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.hk-modal.hidden { display: none; }
.hk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.hk-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.7);
  background: linear-gradient(165deg, #fff, #f3f6fb);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  padding: 18px 18px 22px;
}
.hk-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.hk-modal-title {
  margin: 0 36px 8px 0;
  font-size: 18px;
  font-weight: 800;
}
.hk-modal-calc { margin-top: 8px; }
.hk-modal-pings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hk-modal-ping {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  font-size: 11px;
}
.hk-modal-ping i { color: var(--muted); font-style: normal; }
.hk-modal-ping b { font-size: 14px; }
.hk-modal-ping em { font-style: normal; color: var(--soft); }
.hero-stake .copy-btn.stake-copy,
.stake-card .copy-btn {
  padding: 6px;
}
.stake-card-hd .copy-btn {
  flex-shrink: 0;
}
.stake-nums {
  font-size: 12px;
  color: var(--soft);
  line-height: 1.45;
  word-break: break-word;
}
.stake-side-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.stake-side-foot b { color: var(--ink); font-size: 14px; }
.stake-total {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.stake-total b { color: var(--ink); font-size: 15px; }
.stake-hint {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.kelly-rule {
  margin: 0 0 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  color: var(--soft);
  font-size: 12px;
  line-height: 1.55;
  backdrop-filter: blur(10px);
}
.kelly-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
}
.kelly-range-btn {
  font-size: 12px !important;
  padding: 6px 12px !important;
  letter-spacing: 0.06em;
}
.kelly-range-btn.is-active {
  color: #fff !important;
  background: linear-gradient(180deg, #3a4252, #1a2030) !important;
  border-color: transparent !important;
}
.kelly-from-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: 0;
  top: 0;
}
@media (max-width: 860px) {
  .hero.has-stake { grid-template-columns: 1fr; }
  .stake-row { grid-template-columns: 1fr; }
}
.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(180deg, #3d4658, #1b2230);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 12px rgba(20,28,40,0.18);
}
.hero-badge.frozen {
  background: rgba(255,255,255,0.55);
  color: var(--muted);
  border: 1px solid var(--line2);
  box-shadow: none;
}
.hero-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--ink);
}
.hero-sub {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 13px;
  width: 100%;
}
.hero-xiaos-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.hero-xiaos-line {
  display: inline;
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.45em;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--ink);
}
.hero-xiaos-line .on {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.hero-xiaos-line .off { color: #9aa3b2; font-weight: 650; }
.hero-codes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.panel-hd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-hd-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pending-badge {
  font-size: 10px !important;
  padding: 3px 8px !important;
}
.btn-ghost {
  background: rgba(255,255,255,0.55) !important;
  border: 1px solid var(--line2) !important;
  color: var(--soft) !important;
  box-shadow: none !important;
  letter-spacing: 0.12em;
}
.btn-ghost.active,
#hk-prev-month.active,
.kelly-range-btn.is-active {
  color: #fff !important;
  background: linear-gradient(180deg, #3a4252, #1a2030) !important;
  border-color: transparent !important;
}
.copy-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,0.7);
  color: var(--soft);
  cursor: pointer;
  flex: 0 0 auto;
}
.copy-btn:hover { color: var(--ink); border-color: var(--chrome-3); }
.copy-btn.copied {
  color: #fff;
  background: linear-gradient(180deg, #3a4252, #1a2030);
  border-color: transparent;
}
.xiao-with-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fold-panel { overflow: hidden; }
.fold-hd {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), transparent);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid transparent;
}
.fold-hd.open { border-bottom-color: var(--line); }
.fold-hd strong { letter-spacing: 0.04em; }
.fold-hd .muted { margin-right: auto; }
.fold-caret {
  color: var(--muted);
  transition: transform 0.2s;
}
.fold-hd.open .fold-caret { transform: rotate(180deg); }
.fold-body { border-top: 1px solid var(--line); }

.hk-ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  flex: 1;
  min-width: 280px;
}
.kpi {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.85);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.95), rgba(240,244,250,0.7));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm);
}
.kpi .k { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; font-weight: 650; }
.kpi .v {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.kpi .s { margin-top: 4px; color: var(--muted); font-size: 11px; }
.draw-pings {
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.draw-tema {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.range-seg, .seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 #fff;
}
.seg { margin: 0 0 14px; }
.seg.seg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px 4px 4px;
  border-radius: 14px;
}
.seg-tabs {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.year-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 28px 7px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.seg-btn.active {
  color: #fff;
  background: linear-gradient(180deg, #3a4252, #1a2030);
  box-shadow: 0 4px 12px rgba(20,28,40,0.18);
}

.kelly-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.toggle input { width: 18px; height: 18px; accent-color: #1a2030; }

.panel {
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,250,253,0.72));
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 #fff, var(--shadow);
}
.panel-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2));
}
.panel-hd strong { letter-spacing: 0.04em; color: var(--ink); }
.muted { color: var(--muted); font-size: 12px; }

.kelly-card { padding: 16px 18px; }
.kelly-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.kelly-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.kelly-fields label.check {
  flex-direction: row;
  align-items: center;
  padding-top: 22px;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}
.kelly-fields input[type="number"],
.kelly-fields input[type="date"],
.toolbar input,
.toolbar select {
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}
.kelly-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, #fff, #eef1f6);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
}
.btn:hover { border-color: var(--chrome-3); }
.btn-primary {
  background: linear-gradient(180deg, #3a4252 0%, #1a2030 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(20,28,40,0.2);
}

.table-wrap { overflow-x: auto; }
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th, .tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
.tbl th {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.65);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
}
.tbl tbody tr:hover { background: rgba(30, 40, 60, 0.03); }
.tbl tbody tr.is-pend { background: rgba(30, 90, 180, 0.04); }
.tbl td.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.period-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}
.period-cell .d { font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.period-cell .p { color: var(--muted); font-size: 12px; }

.xiao-line {
  display: inline;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4em;
  line-height: 1.4;
  white-space: nowrap;
}
.xiao-line i {
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4em;
}
.xiao-line .on {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.xiao-line .off { color: #9aa3b2; font-weight: 650; }
.xiao-line i.is-hit-xiao {
  display: inline-grid;
  place-items: center;
  width: 1.55em;
  height: 1.55em;
  margin: 0 0.08em;
  letter-spacing: 0;
  border-radius: 50%;
  color: #146b3e;
  background: radial-gradient(circle at 35% 30%, #b8efd0, #6dca97 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 0 1px rgba(46, 150, 95, 0.28);
  text-decoration: none;
}
.xiao-row { display: inline; letter-spacing: 0.3em; }
.xiao {
  display: inline;
  background: none !important;
  border: 0 !important;
  width: auto !important;
  height: auto !important;
  color: #9aa3b2;
  font-weight: 700;
}
.xiao.main, .xiao.meat, .xiao.hit-mark {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mark-ok, .mark-bad, .mark-pending {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
}
.mark-ok {
  background: radial-gradient(circle at 35% 28%, #5fd49a, #1f8a52 68%);
  color: #eafff2;
  border: 1px solid rgba(80, 190, 130, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 2px 8px rgba(20, 90, 50, 0.2);
  font-size: 14px;
}
.mark-bad {
  background: radial-gradient(circle at 35% 28%, #ef8080, #c23b3b 68%);
  color: #fff5f5;
  border: 1px solid rgba(220, 120, 120, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(140, 30, 30, 0.18);
  font-size: 14px;
}
.mark-pending {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line2);
}

.ball {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #d8dde8);
  border: 1px solid var(--line2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 #fff;
}
.ball.empty {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
  box-shadow: none;
}

.strategy-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
@media (max-width: 980px) {
  .strategy-grid, .collect-layout { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; }
  .topbar-tray { border-radius: 18px; flex-wrap: wrap; }
  .nav { justify-content: flex-start; width: 100%; }
  .author-rail { max-height: 220px; position: static; }
}
.strategy-doc {
  padding: 20px 22px;
  line-height: 1.65;
  color: var(--soft);
}
.strategy-doc h2 { margin: 0 0 12px; font-size: 18px; color: var(--ink); }
.strategy-doc h3 { margin: 18px 0 8px; font-size: 14px; color: var(--ink); letter-spacing: 0.04em; }
.strategy-doc ul { padding-left: 18px; margin: 8px 0; }
.strategy-doc li { margin: 4px 0; }
.case-body { padding: 16px 18px 22px; color: var(--soft); line-height: 1.55; }

#panel-strategy { display: grid; gap: 16px; }
.friend-boards-panel { padding: 0 0 12px; }
.friend-boards-note {
  margin: 0 18px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.board-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
  overflow: visible;
}
.board-tab {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: center;
  min-height: 58px;
  border: 1px solid rgba(20, 24, 31, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,248,247,.88));
  color: var(--soft);
  border-radius: 14px;
  padding: 8px 6px;
  font: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 8px 18px -16px rgba(20, 24, 31, 0.35);
}
.board-tab .tab-rate {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.board-tab .tab-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.board-tab:hover {
  border-color: rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}
.board-tab.active {
  background: linear-gradient(160deg, rgba(110,231,183,.35), rgba(15,118,110,.12));
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.18);
}
.board-tab.active .tab-rate { color: #064e3b; }
.board-tab.active .tab-sub { color: #115e59; }
.board-tab.calc-tab {
  grid-column: 1 / -1;
  min-height: 72px;
  background: linear-gradient(160deg, rgba(253,230,138,.28), rgba(255,252,248,.95));
  border-color: rgba(161, 98, 7, 0.28);
}
@media (min-width: 720px) {
  .board-tab.calc-tab { grid-column: span 2; }
}
.board-tab.calc-tab .tab-rate { color: #92400e; font-size: 15px; }
.board-tab.calc-tab .tab-sub { color: #a16207; }
.board-tab.calc-tab.active {
  background: linear-gradient(160deg, rgba(253,230,138,.55), rgba(161,98,7,.12));
  border-color: rgba(161, 98, 7, 0.5);
  box-shadow: 0 0 0 1px rgba(161, 98, 7, 0.2);
}
.ens-mini-tabs {
  padding: 0 0 10px;
  margin: 0;
}
.ens-mini-tab {
  min-height: 48px;
}
.strategy-doc .ens-mini-tabs,
.friend-board .ens-mini-tabs,
.hk-board-box .ens-mini-tabs,
.c-lists .ens-mini-tabs {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(15,118,110,.12), transparent 55%),
    linear-gradient(180deg, #f8faf9, #e8ecea);
}
.login-gate.hidden { display: none !important; }
.login-box {
  width: min(360px, 92vw);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: #fffcf8;
  border: 1px solid rgba(20,24,31,.1);
  box-shadow: 0 18px 40px -28px rgba(20,24,31,.4);
  display: grid;
  gap: 12px;
}
.login-logo {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto 8px;
}
.login-box label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.login-box input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(20,24,31,.12);
  font: inherit;
  background: #fff;
}
.login-btn { width: 100%; margin-top: 4px; }
.login-err { min-height: 1.2em; margin: 0; text-align: center; }
#app-shell.hidden { display: none !important; }

/* 计算器：独立命名空间，禁吃全局 .xiao / grid stretch */
.c-root {
  display: block;
  padding: 12px 14px 14px;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 14px;
  background: #fff;
  height: auto !important;
  min-height: 0 !important;
}
.c-hd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.c-hd strong { color: var(--ink); font-size: 14px; }
.c-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.c-card {
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid rgba(20, 24, 31, 0.1);
  background: linear-gradient(180deg, #fffcf8, #f4f7f6);
  box-shadow: 0 14px 32px -22px rgba(20,24,31,.4);
}
.c-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.9fr);
  gap: 18px 22px;
  align-items: stretch;
}
.c-card-left,
.c-card-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.c-card-hd {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f766e;
}
.c-pingte {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.c-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.c-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.c-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.c-field.c-num {
  flex: 1 1 64px;
  min-width: 58px;
  max-width: 88px;
  padding: 8px 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(20, 24, 31, 0.08);
  background: #fff;
  text-align: center;
}
.c-field input,
.c-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(20, 24, 31, 0.12);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  background: #fff;
  color: var(--ink);
}
.c-field.c-num input {
  border: 0;
  background: transparent;
  padding: 6px 4px 2px;
}
.c-xiao {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.c-field.c-sel {
  width: 100%;
  max-width: none;
}
.c-field.c-sel select {
  width: 100%;
  min-width: 0;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 12px;
}
.c-field.c-te {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.07);
}
.c-field.c-te input {
  color: #0f766e;
}
.c-plus {
  padding-bottom: 28px;
  font-size: 18px;
  font-weight: 800;
  color: var(--muted);
}
.c-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(145deg, #0f766e, #115e59);
  color: #fff;
  flex: 1;
}
.c-btn.c-ghost {
  background: rgba(20, 24, 31, 0.06);
  color: var(--ink);
}
.c-card-left .c-buy {
  margin-top: 4px;
}
.c-buy {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  margin: 0;
  border-radius: 14px;
  background: #eef8f4;
  border: 1px solid rgba(15, 118, 110, 0.18);
  line-height: 1.8;
  min-height: 56px;
  height: auto !important;
  max-height: none !important;
}
.c-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.c-chips { display: inline; }
.c-open-hit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.12);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.c-open-hit i { font-style: normal; color: var(--muted); }
.c-open-hit.hit {
  border-color: rgba(5, 150, 105, 0.35);
  background: rgba(110, 231, 183, 0.25);
}
.c-open-hit.hit i { color: #047857; }
.c-open-hit.miss {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 226, 226, 0.85);
}
.c-open-hit.miss i { color: #b91c1c; }
@media (max-width: 860px) {
  .c-card-body { grid-template-columns: 1fr; }
}
.c-buy b {
  font-size: 11px;
  font-weight: 800;
  color: #115e59;
  margin-right: 8px;
}
.c-chip {
  display: inline-block;
  vertical-align: middle;
  margin: 2px 4px 2px 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.25);
  color: #115e59;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none !important;
}
.c-chip.on {
  background: #6ee7b7;
  border-color: transparent;
  color: #064e3b;
}
.c-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0f766e;
  margin: 0 0 6px;
}
.c-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  height: auto !important;
}
.c-cell {
  border: 1.5px solid rgba(100, 116, 139, 0.3);
  border-radius: 12px;
  background: #fff;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
}
.c-cell b { font-size: 15px; color: var(--ink); line-height: 1.2; }
.c-cell span { font-size: 12px; font-weight: 800; color: var(--muted); }
.c-cell i { font-style: normal; font-size: 10px; color: var(--muted); }
.c-cell.kill {
  border-color: rgba(185, 28, 28, 0.45);
  background: rgba(254, 226, 226, 0.95);
}
.c-cell.kill b { color: #991b1b; }
.c-cell.kill.top {
  border: none;
  border-radius: 14px;
  background: #fecaca;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.28);
}
.c-cell .c-x {
  font-size: 13px;
  font-weight: 900;
  color: #b91c1c;
}
.c-cell.zero {
  opacity: 0.35;
  background: #f8fafc;
}
.c-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: auto !important;
}
.friend-formula-list .kill {
  margin-left: 6px;
  font-weight: 800;
  color: #a16207;
  white-space: nowrap;
}
.strategy-doc .friend-formula-list,
.case-body .friend-formula-list {
  margin: 0 0 4px;
}
@media (max-width: 720px) {
  .c-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-lists { grid-template-columns: 1fr; }
  .c-field input { width: 48px; }
}
.friend-boards {
  display: block;
  padding: 0 14px 8px;
  height: auto !important;
  min-height: 0 !important;
}
.friend-boards-note:empty { display: none; }
.friend-boards-panel { height: auto !important; }
.friend-board {
  border: 1px solid rgba(20, 24, 31, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px 14px 14px;
}
.friend-board.active {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}
.friend-board-hd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 6px;
}
.friend-board-hd strong { color: var(--ink); font-size: 14px; }
.friend-badge {
  font-size: 11px;
  font-weight: 800;
  color: #115e59;
  background: rgba(15, 118, 110, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}
.friend-board-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.friend-board-how {
  font-size: 12px;
  color: var(--soft);
  margin: 0 0 10px;
  line-height: 1.5;
}
.friend-formula-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.friend-formula-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(248, 250, 249, 0.9);
}
.friend-formula-list .role {
  font-weight: 800;
  color: #115e59;
}
.friend-formula-list .expr { color: var(--ink); word-break: break-word; }
.friend-formula-list .miss {
  grid-column: 2;
  font-size: 11px;
  color: var(--muted);
}
.friend-formula-list .code {
  grid-column: 2;
  font-size: 10px;
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
}
.friend-subhd {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.case-body .kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.case-body .kv span { color: var(--muted); }

.collect-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}
.author-rail {
  max-height: calc(100vh - 160px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  position: sticky;
  top: 16px;
}
.author-list {
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.author-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--soft);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.author-item:hover {
  background: rgba(255,255,255,0.7);
  border-color: var(--line);
}
.author-item.active {
  background: linear-gradient(135deg, #fff, #eef1f6);
  border-color: var(--line2);
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 1px 0 #fff;
}
.author-item .ameta { color: var(--muted); font-size: 11px; }
.collect-main .kpi-row { margin-bottom: 12px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.post-list { padding: 8px 12px 16px; display: grid; gap: 10px; }
.post-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fff, #f3f5f9);
}
.post-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.post-card .body {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--soft);
  font-size: 13px;
}
.pager {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.foot {
  margin-top: 8px;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.04em;
}

.num-ok { color: var(--ok); font-weight: 800; }
.num-bad { color: var(--bad); font-weight: 700; }
