: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: block;
  margin-bottom: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.topbar-chrome {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 28px;
  min-width: 0;
  padding: 8px 10px 8px 10px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.78);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,247,252,0.78) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(18, 24, 36, 0.04),
    0 18px 40px -20px rgba(18, 24, 36, 0.22);
  overflow: hidden;
}
.topbar-chrome::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 190, 205, 0.85), transparent);
  pointer-events: none;
}
.topbar-tray { display: contents; }

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 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.08);
}

.nav {
  display: inline-flex;
  justify-self: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(18, 24, 36, 0.05);
  border-radius: 999px;
  background: rgba(18, 24, 36, 0.045);
  box-shadow: none;
  overflow-x: auto;
  min-width: 0;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color .16s, background .16s, box-shadow .16s;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,0.72); }
.nav-item.active {
  color: #f5f7fb;
  background: linear-gradient(180deg, #2a3140 0%, #12161e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 18px rgba(12, 16, 24, 0.26);
}

.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-row.stake-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 900px) {
  .stake-row.stake-row-3 {
    grid-template-columns: 1fr;
  }
}
.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.mid {
  border-color: rgba(14, 116, 144, 0.22);
  background: rgba(125, 211, 252, 0.12);
}
.stake-side.off {
  border-color: rgba(20, 24, 31, 0.1);
  background: rgba(248, 250, 252, 0.95);
}
.stake-side-rate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.stake-side-rate b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stake-side.on .stake-side-rate b { color: #0f766e; }
.stake-side.mid .stake-side-rate b { color: #1d4ed8; }
.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);
}
.stake-sum {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}
.stake-side.off .stake-sum {
  color: var(--muted, #64748b);
}
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(980px, 100%);
  max-height: min(90vh, 960px);
  overflow: auto;
  border-radius: 20px;
  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: 20px 20px 24px;
}
.hk-yan-sec {
  padding: 14px 14px 16px;
}
.c-yan-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 12px;
}
.c-yan-k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #0f766e;
  text-transform: uppercase;
}
.c-yan-hd strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.c-duo {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
}
@media (max-width: 720px) {
  .c-duo { grid-template-columns: 1fr; }
}
.c-duo-card {
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: linear-gradient(180deg, #fff, #f7fbfa);
  padding: 12px 12px 14px;
  min-height: 120px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.c-duo-out {
  background: linear-gradient(165deg, #eef8f4, #e7f4ef);
  border-color: rgba(15, 118, 110, 0.22);
}
.c-duo-open {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.c-duo-open .c-open-hit {
  margin-left: 0;
}
.c-pend-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
  background: rgba(253, 230, 138, 0.55);
  border: 1px solid rgba(217, 119, 6, 0.28);
}
.pend-time-ok {
  color: #0f766e;
  font-weight: 800;
}
.pend-time-miss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #b91c1c !important;
  font-weight: 800;
  background: rgba(254, 226, 226, 0.95);
  border: 1px solid rgba(185, 28, 28, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}
#hk-pending-badge.time-miss,
.c-btn.is-time-miss,
#calc-prev-hd.is-time-miss,
#fcalc-prev-hd.is-time-miss {
  color: #b91c1c !important;
}
.hero-title .pend-time-miss,
.hero-title .pend-time-ok {
  font-size: 0.72em;
  vertical-align: middle;
}
.period-cell .pend-time-miss,
.period-cell .pend-time-ok {
  font-size: 12px;
}
.c-xiao-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0 0;
}
.c-xiao-lab {
  flex: 0 0 auto;
  min-width: 3.2em;
  font-size: 12px;
  font-weight: 800;
  color: #115e59;
  letter-spacing: 0.04em;
}
.c-xiao-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}
.c-xiao-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid rgba(15, 118, 110, 0.22);
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}
.c-xiao-card.is-atk {
  background: linear-gradient(160deg, #6ee7b7, #34d399);
  border-color: transparent;
  color: #064e3b;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.28);
}
.c-xiao-card.is-open {
  outline: 2px solid #0f766e;
  outline-offset: 1px;
}
.c-xiao-card.is-kill {
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.28);
  color: #991b1b;
  box-shadow: none;
}
.c-buy-air {
  display: grid;
  gap: 6px;
}
.c-buy-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.c-buy-foot .c-open-hit { margin-left: 0; }
.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 10px 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hk-modal-calc { margin-top: 0; }
.hk-modal-pings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hk-modal-ping {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.09);
  font-size: 11px;
}
.hk-modal-ping i { color: var(--muted); font-style: normal; font-weight: 700; }
.hk-modal-ping b { font-size: 16px; font-weight: 800; }
.hk-modal-ping em { font-style: normal; color: var(--soft); font-size: 13px; font-weight: 700; }
.hero-stake .copy-btn.stake-copy,
.stake-card .copy-btn,
.stake-card .stake-reset-btn {
  padding: 6px;
}
.stake-card-hd .copy-btn,
.stake-card-hd .stake-reset-btn {
  flex-shrink: 0;
}
.stake-reset-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;
}
.stake-reset-btn:hover { color: var(--ink); border-color: var(--chrome-3); }
.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-side-foot.is-hit { color: var(--ink); font-weight: 700; }
.stake-side-foot.is-hit b { color: #0a7a3e; }
.stake-side.is-hit-side {
  box-shadow: inset 0 0 0 2px rgba(10, 122, 62, 0.35);
  background: linear-gradient(160deg, rgba(232, 255, 242, 0.95), rgba(236, 240, 248, 0.7));
}
.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: center;
  gap: 10px 14px;
}
.hero-top-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* 凯利公式 · 开关（主卡右上） */
.kelly-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.kelly-switch-lab { white-space: nowrap; }
.kelly-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.kelly-switch-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c5cbd6;
  position: relative;
  transition: background 0.18s ease;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(20, 28, 40, 0.12);
}
.kelly-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 28, 40, 0.22);
  transition: transform 0.18s ease;
}
.kelly-switch input:checked + .kelly-switch-track {
  background: linear-gradient(180deg, #3a4252, #1a2030);
}
.kelly-switch input:checked + .kelly-switch-track::after {
  transform: translateX(18px);
}
.kelly-switch input:focus-visible + .kelly-switch-track {
  outline: 2px solid rgba(40, 80, 180, 0.45);
  outline-offset: 2px;
}
.hk-meta-line {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}
.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-official {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(180deg, #fff, #f1f5f9);
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  white-space: nowrap;
}
.hero-official:hover {
  border-color: rgba(14, 116, 144, 0.45);
  color: #0e7490;
}
.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-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.hero-xiaos-actions .lock-chip { margin-left: 0; }
.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: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  padding: 5px 12px !important;
  /* 期次旁待开：浅底深字，禁黑底青绿看不清 */
  color: #0f172a !important;
  background: linear-gradient(180deg, #ecfeff, #e0f2fe) !important;
  border: 1px solid rgba(14, 116, 144, 0.35) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 8px rgba(14, 116, 144, 0.12) !important;
}
#hk-pending-badge .pend-time-ok {
  color: #0f172a !important;
  font-weight: 800;
  font-size: inherit;
}
#hk-pending-badge .pend-time-miss {
  color: #b91c1c !important;
  background: transparent;
  border: 0;
  padding: 0;
}
#hk-pending-badge.frozen {
  color: #475569 !important;
  background: rgba(241, 245, 249, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  box-shadow: none !important;
}
#hk-pending-badge.early-lock {
  color: #0f766e !important;
  background: linear-gradient(180deg, #ecfdf5, #e0f2fe) !important;
  border-color: rgba(13, 148, 136, 0.45) !important;
}
.lock-chip {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--soft);
  vertical-align: middle;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.lock-chip svg { display: block; }
.lock-chip.lock-btn {
  cursor: pointer;
  color: var(--ink);
  border-color: var(--chrome-3);
}
.lock-chip.lock-btn:hover {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.55);
  background: #ecfdf5;
}
.lock-chip.lock-btn.is-locking {
  opacity: 0.55;
  pointer-events: none;
}
.lock-chip.is-locked {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.45);
  background: linear-gradient(180deg, #ecfdf5, #e0f2fe);
  cursor: default;
}
#hk-pending-badge.time-miss {
  color: #b91c1c !important;
  background: linear-gradient(180deg, #fef2f2, #fee2e2) !important;
  border-color: rgba(185, 28, 28, 0.4) !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);
}

.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; }

.author-tag {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.42rem;
  border-radius: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  line-height: 1.4;
  white-space: nowrap;
}
.author-tag.is-author {
  color: #d8ecff;
  background: rgba(56, 132, 220, 0.28);
  border: 1px solid rgba(110, 170, 240, 0.45);
}
.author-tag.is-no-author {
  color: #ffe6c8;
  background: rgba(180, 110, 40, 0.28);
  border: 1px solid rgba(220, 150, 70, 0.45);
}
.hero-sub .author-tag { margin-left: 0; margin-right: 0.35rem; }
.hero-xiaos-line .author-tag { margin-left: 0.55rem; }
.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);
}
.gate-deny {
  color: #b42318;
  font-weight: 700;
  line-height: 1.45;
}

.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-chrome {
    grid-template-columns: 1fr;
    border-radius: 22px;
    gap: 10px;
  }
  .brand { justify-content: center; }
  .brand-logo { height: 52px; }
  .nav { justify-content: flex-start; width: 100%; }
  .top-tools { justify-content: flex-end; }
  .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; }
#panel-friend { display: grid; gap: 16px; }
#panel-friend .xiao.on { color: #0f766e; font-weight: 800; }
#tbl-friend tbody tr {
  cursor: pointer;
}
#tbl-friend tbody tr:hover {
  background: rgba(15, 118, 110, 0.06);
}
.fcalc-toolbar-row {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.fcalc-toolbar-row .c-actions { margin-top: 0; }
.fcalc-killstat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20, 24, 31, 0.1);
  background: #fff;
  min-height: 120px;
}
.fcalc-killstat .killstat-period {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.fcalc-killstat .killstat-tier {
  grid-template-columns: 64px 1fr;
}
.fcalc-killstat .killstat-tier .open-tag {
  grid-column: 1 / -1;
  justify-self: start;
}
.fcalc-jue { margin-bottom: 14px; }
.fcalc-jue-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--line2);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(240, 244, 250, 0.88));
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm);
}
.fcalc-jue-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #0f766e, #1c2433);
}
.fcalc-jue-hd {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.fcalc-jue-hd .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #0f766e;
}
.fcalc-jue-hd .tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}
.fcalc-jue-kill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fcalc-jue-kill .lab {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.fcalc-jue-body { padding: 12px 18px 16px 20px; }
.fcalc-jue-expr {
  font-size: 13px;
  font-weight: 650;
  color: var(--soft);
  line-height: 1.55;
  margin-bottom: 12px;
}
.c-chip.kill {
  background: #1c2433 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none;
  min-width: 2em;
  justify-content: center;
}
.fcalc-jue-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px;
}
.fcalc-jue-step {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(18, 21, 28, 0.03);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.35;
}
.fcalc-jue-step.is-kill {
  color: var(--ink);
  font-weight: 800;
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.28);
}
.kpi.kpi-jue {
  border-color: rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(232, 245, 242, 0.7));
}
.kpi.kpi-jue .v { color: #0f766e; }
#tbl-friend .xiao-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 4px;
  margin: 0 1px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.16);
  outline: 2px solid rgba(15, 118, 110, 0.55);
  color: #0f766e;
  font-weight: 800;
}
#tbl-friend .xiao-jue {
  color: var(--soft);
  font-weight: 750;
}
#tbl-friend .xiao-jue.xiao-ring {
  background: rgba(15, 118, 110, 0.12);
  outline-color: rgba(15, 118, 110, 0.5);
  color: #0f766e;
}
#tbl-friend td.hit-cell { color: #0f766e; font-weight: 800; }
#tbl-friend td.miss-cell { color: #b91c1c; font-weight: 800; }
#tbl-friend .xiaos { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.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 12px;
  margin: 0;
  gap: 8px;
}
.ens-mini-tab {
  min-height: 52px;
  border-radius: 14px;
  padding: 10px 12px;
}
.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;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  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;
}
/* 融合定版：公式整宽；主杀|软杀在板内并排，禁空右栏 */
.c-lists.is-ens {
  grid-template-columns: 1fr;
}
.c-lists.is-ens .c-lists-side {
  display: none;
}
.ens-kill-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  align-items: start;
}
.ens-kill-cols .friend-subhd:first-child {
  margin-top: 0;
}
.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; }
  .ens-kill-cols { 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;
}
.collect-subtabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(20, 24, 31, 0.06);
  border: 1px solid rgba(20, 24, 31, 0.08);
}
.collect-subtab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.collect-subtab.active {
  background: #0f766e;
  color: #fff;
}
.killstat-body {
  padding: 4px 14px 18px;
  display: grid;
  gap: 16px;
}
.killstat-period {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffcf8, #f6f8f7);
  padding: 14px 16px 12px;
}
.killstat-period-hd {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.killstat-period-hd strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}
.killstat-tier {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 10px;
}
.killstat-tier.is-open {
  background: rgba(15, 118, 110, 0.12);
  outline: 1px solid rgba(15, 118, 110, 0.28);
}
.killstat-tier .nlab {
  font-weight: 800;
  color: #115e59;
  font-size: 13px;
}
.killstat-tier .xs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.killstat-tier .xs .xiao {
  min-width: 1.6em;
  text-align: center;
}
.killstat-tier .open-tag {
  font-size: 12px;
  font-weight: 800;
  color: #b91c1c;
  white-space: nowrap;
}
.killstat-empty {
  padding: 20px;
  color: var(--muted);
}
.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; }

/* —— Telegram 控制台（大气分区，禁挤卡片墙） —— */
#panel-telegram {
  padding-bottom: 40px;
}
.tg-studio {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tg-chrome {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 12px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(244,247,252,0.82) 100%);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 18px 40px -22px rgba(18, 24, 36, 0.22);
  overflow: hidden;
}
.tg-chrome::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 190, 205, 0.85), transparent);
  pointer-events: none;
}
.tg-chrome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.tg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(18,21,28,.06);
}
.tg-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
}
.tg-tab:hover { color: var(--ink); background: rgba(18,21,28,.04); }
.tg-tab.on {
  color: #fff;
  background: linear-gradient(180deg, #3a4252 0%, #1a2030 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 5px 14px rgba(20, 28, 40, 0.18);
}
.tg-tab-panel { display: none; }
.tg-tab-panel.on { display: block; }

.tg-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.tg-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tg-switch-ui {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #c5ccd6;
  position: relative;
  transition: background .18s ease;
  flex-shrink: 0;
}
.tg-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: left .18s ease;
}
.tg-switch input:checked + .tg-switch-ui { background: var(--ok); }
.tg-switch input:checked + .tg-switch-ui::after { left: 21px; }
.tg-switch-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  min-width: 1.5em;
}
.tg-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.tg-hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.15;
  color: var(--ink);
}
.tg-hero-sub { display: none; }
.tg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.tg-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 4px 4px 0;
}
.tg-status-bar .kpi-row {
  margin: 0;
  flex: 1 1 auto;
  gap: 12px;
}
.tg-status-bar #tg-meta {
  font-size: 12px;
  min-width: 12em;
}

.tg-sec {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tg-sec-hd h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .03em;
}
.tg-sec-hd p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.tg-sec-link a {
  color: var(--ink);
  font-weight: 700;
}

.tg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.tg-card {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 100%;
}
.tg-card-wide { width: 100%; }
.tg-card-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 0;
}
.tg-card-hd strong {
  font-size: 15px;
  letter-spacing: .04em;
}

.tg-kv {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px 18px;
  padding: 20px 24px 28px;
  font-size: 13px;
}
.tg-kv .k { color: var(--muted); padding-top: 2px; }
.tg-kv .v {
  color: var(--ink);
  word-break: break-all;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.tg-kv .v a { color: var(--ink); font-weight: 700; text-decoration: underline; }
.tg-kv .pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
}
.tg-kv .pill-ok { background: var(--ok-soft); color: var(--ok); }
.tg-kv .pill-bad { background: var(--bad-soft); color: var(--bad); }
.tg-kv .pill-warn { background: #fff4e0; color: #9a5b00; }

.tg-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px 24px 28px;
}
.tg-form-2 {
  grid-template-columns: 1fr 1fr;
}
.tg-form-2 .span-2 { grid-column: 1 / -1; }
.tg-form.tg-tight {
  padding: 0;
  margin-top: 8px;
  gap: 14px;
}
.tg-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.tg-form label.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid transparent;
}
.tg-form label.check:hover { border-color: var(--line2); }
.tg-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.tg-form input[type="text"],
.tg-form input[type="number"],
.tg-form textarea,
.tg-form select,
.tg-reg-row input[type="text"] {
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.tg-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.tg-banner-box,
.tg-callout {
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #f7f9fc, #eef2f7);
}
.tg-banner-hd {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: .02em;
}
.tg-banner-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}
.tg-banner-preview {
  width: 100%;
  min-height: 148px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #e4eaf2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tg-banner-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tg-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tg-banner-actions input[type="file"] { font-size: 13px; }
.tg-banner-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.tg-banner-hint code {
  font-size: 12px;
  background: rgba(255,255,255,.8);
  padding: 2px 6px;
  border-radius: 6px;
}
.tg-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.tg-reg-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 22px 24px 0;
}
.tg-reg-row .tg-grow {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.tg-chat-leave-bar {
  align-items: center;
  padding-top: 14px;
}
.tg-chat-leave-bar .check {
  margin: 0;
  white-space: nowrap;
}
.btn-danger {
  background: #b42318;
  color: #fff;
  border: 1px solid #912018;
}
.btn-danger:hover:not(:disabled) {
  background: #912018;
}
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tg-chat-left {
  opacity: 0.55;
}
.tg-confirm-modal {
  z-index: 120;
}
.tg-confirm-panel {
  width: min(440px, 100%);
  max-height: none;
  padding: 22px 22px 18px;
}
.tg-confirm-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}
.tg-confirm-msg {
  margin: 0 0 18px;
  color: var(--ink-2, #334155);
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 14px;
}
.tg-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.tg-pad { padding: 12px 24px 0; }
.tg-table { padding: 16px 16px 22px; }
.tg-howto {
  margin: 0;
  padding: 8px 28px 28px 44px;
  color: var(--ink-2);
  line-height: 1.75;
  font-size: 14px;
}
.tg-howto li { margin-bottom: 10px; }

.tg-acc-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 168px);
  padding: 0;
}
.tg-acc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(28, 36, 51, 0.96) 0%, rgba(42, 52, 72, 0.92) 52%, rgba(55, 68, 92, 0.88) 100%);
  color: #f4f6fa;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tg-acc-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tg-acc-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.tg-acc-pill {
  display: inline-flex;
  align-items: center;
  max-width: 42vw;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(244, 246, 250, 0.88);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-acc-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tg-acc-bar-actions .btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f4f6fa;
}
.tg-acc-bar-actions .btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.tg-acc-bar-actions .btn-primary {
  background: #f4f6fa;
  color: #1c2433;
  border-color: transparent;
}
.tg-acc-bar-actions .btn-primary:hover {
  background: #ffffff;
}
.tg-acc-line {
  margin: 0;
  padding: 10px 22px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 249, 251, 0.85);
}
.tg-acc-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 78vh;
  height: min(920px, calc(100vh - 240px));
  border: 0;
  background: #f3f5f8;
}

@media (max-width: 980px) {
  .tg-chrome-top {
    flex-direction: column;
    align-items: stretch;
  }
  .tg-tabs { border-radius: 18px; }
  .tg-split { grid-template-columns: 1fr; }
  .tg-form-2 { grid-template-columns: 1fr; }
  .tg-form-2 .span-2 { grid-column: auto; }
  .tg-banner-row { grid-template-columns: 1fr; }
  .tg-reg-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* 聚合壳 embed：壳顶栏已有 Man；本页 chrome 收成子导航条 */
html.embed, html.embed body { height: 100%; }
html.embed .brand { display: none; }
html.embed .top-tools { display: none !important; }
html.embed #login-gate { display: none !important; }
html.embed .nav-item[data-page="telegram"] { display: none !important; }
html.embed.lane-telegram .nav { display: none; }
html.embed.lane-telegram .topbar { display: none; }
html.embed .shell { padding-top: 4px; }
html.embed .topbar { margin-bottom: 14px; }
html.embed .topbar-chrome {
  grid-template-columns: 1fr;
  padding: 6px 8px;
}
