:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --panel2: #243044;
  --line: #2f3f56;
  --text: #e8eef7;
  --muted: #93a4bd;
  --accent: #3d9cf0;
  --ok: #2bb673;
  --bad: #e85d5d;
  --gold: #f0c14b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 480px at 8% -8%, #3a2a12 0%, transparent 50%),
    radial-gradient(900px 420px at 95% 0%, #1b3a5c 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(26, 35, 50, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
}

.login-card h1 { margin: 0 0 6px; font-size: 1.4rem; }
.btn-block { width: 100%; margin-top: 6px; padding: 14px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 14px 40px; }

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

h1 { margin: 0; font-size: 1.5rem; }
.sub { color: var(--muted); margin-top: 6px; font-size: .9rem; }
.head-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.date-lab { color: var(--muted); font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.date-lab input {
  border: 1px solid var(--line);
  background: #121a26;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: rgba(26, 35, 50, .92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.stat-card .k { color: var(--muted); font-size: .82rem; }
.stat-card .v { font-size: 1.35rem; font-weight: 700; margin-top: 4px; color: var(--gold); }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: .95rem;
}
.tab.active {
  color: var(--text);
  border-color: #8a6b28;
  background: linear-gradient(180deg, #4a3a1c, #2a2418);
}

.panel {
  background: rgba(26, 35, 50, .94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}

.grid-entry {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .grid-entry { grid-template-columns: 1fr; }
}

label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121a26;
  color: var(--text);
  outline: none;
  font-size: 1.05rem;
}
input:focus, select:focus { border-color: #8a6b28; }

.row { margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pos-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 700px) {
  .three-col, .pos-grid { grid-template-columns: 1fr; }
}

textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121a26;
  color: var(--text);
  outline: none;
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
}
textarea:focus { border-color: #8a6b28; }

.digit-pads { display: grid; gap: 10px; margin-bottom: 12px; }
.digit-row { display: flex; flex-wrap: wrap; gap: 6px; }
.digit-row button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: #243044;
  font-size: .95rem;
}
.digit-row button.on {
  background: linear-gradient(180deg, #f0c14b, #c9a227);
  color: #1a1408;
}
.unit-quick { margin: -4px 0 12px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #162032;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
.chip.active {
  color: #1a1408;
  background: linear-gradient(180deg, #f0c14b, #c9a227);
  border-color: #d4b23a;
}
.chip.mini { padding: 6px 12px; font-size: .9rem; }

.hint {
  margin-top: 10px;
  background: #152033;
  border: 1px dashed #355074;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: .84rem;
}

.preview {
  min-height: 72px;
  background: #121a26;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  line-height: 1.6;
  word-break: break-all;
}
.preview .ok { color: #9fe3b8; }

.amount-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #152033;
  border: 1px solid #3d4f6a;
  border-radius: 12px;
  padding: 12px 14px;
}
.muted { color: var(--muted); font-size: .85rem; }
.amount { font-size: 1.8rem; font-weight: 800; color: var(--gold); }

.btns { display: flex; gap: 8px; flex-wrap: wrap; }
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: .95rem;
}
button.secondary { background: #31445f; }
button.danger { background: var(--bad); }

.pad-title { color: var(--muted); margin-bottom: 8px; font-size: .86rem; }
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.numpad button {
  background: #243044;
  font-size: 1.25rem;
  padding: 16px 0;
  min-height: 56px;
}

.quick-multi { margin-top: 14px; }
.staff-today {
  margin-top: 16px;
  background: #121a26;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.staff-today h3 { margin: 0 0 8px; font-size: 1rem; }
.staff-today .line { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); }
.staff-today .line b { color: var(--text); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select { width: auto; min-width: 140px; }

.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .92rem;
}
th { background: #162032; color: var(--muted); font-weight: 600; }
td.money { color: var(--gold); font-weight: 700; }
.del-btn {
  background: transparent;
  color: #ff9b9b;
  padding: 4px 8px;
  font-size: .85rem;
}

.staff-list { display: grid; gap: 8px; margin-top: 8px; }
.staff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #121a26;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.station-card {
  background: #121a26;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.station-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.station-card .meta { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.station-card .money { font-size: 1.2rem; color: var(--gold); font-weight: 800; margin: 8px 0; }
.station-card.off { opacity: .55; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1f3d2a;
  border: 1px solid #2bb673;
  color: #d8ffe8;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* —— 快译台 —— */
.topbar .brand { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.topbar .brand strong { font-size: 1.25rem; }

.head-draw-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.head-draw {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
}
.hd-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0c1220;
  border: 1px solid #2a3a52;
  border-radius: 10px;
  padding: 6px 12px 6px 10px;
  min-height: 52px;
}
.hd-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
}
.hd-meta b {
  font-size: .82rem;
  color: #f0c14b;
  font-weight: 800;
  line-height: 1.1;
}
.hd-issue {
  font-size: .72rem;
  color: #93a4bd;
  white-space: nowrap;
}
.hd-balls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hd-balls i {
  font-style: normal;
  color: #64748b;
  font-size: .75rem;
  font-weight: 700;
}
.hd-ball {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #f87171, #dc2626);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 2px 0 #7f1d1d;
}
.hd-sum {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  margin-left: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #b91c1c;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
}
.hd-form {
  font-size: .72rem;
  color: #fdba74;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}
.btn-head-sync {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, #3d9cf0, #2563eb);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: .9rem;
  box-shadow: 0 2px 0 #1e3a8a;
}
.btn-head-sync:hover { filter: brightness(1.08); }
.btn-head-sync:disabled { opacity: .6; cursor: wait; }

@media (max-width: 900px) {
  .head-draw-wrap { order: 3; width: 100%; justify-content: flex-start; }
  .hd-block { flex: 1; min-width: 200px; }
}

.panel.desk {
  background: #f4f7fb;
  color: #1c2430;
  border-color: #cfd8e6;
}

.game-tabs {
  display: flex;
  gap: 0;
  margin: -16px -16px 14px;
  border-bottom: 1px solid #cfd8e6;
  background: #e8eef7;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.game-tab {
  flex: 1;
  border-radius: 0;
  background: transparent;
  color: #4a5b73;
  border: 0;
  border-right: 1px solid #cfd8e6;
  padding: 14px 10px;
}
.game-tab:last-child { border-right: 0; }
.game-tab.active {
  background: #2f6fed;
  color: #fff;
}

.desk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.desk .row.inline {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 160px;
}
.desk label { color: #5b6b82; }
.desk input, .desk select {
  background: #fff;
  color: #1c2430;
  border: 1px solid #c3cedd;
}
.mode-pill {
  margin-left: auto;
  background: #2f6fed;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.kyaku-box textarea {
  min-height: 200px;
  height: 200px;
  overflow-y: hidden;
  resize: none;
  background: #dff6c8;
  border: 2px solid #8fbf62;
  color: #16301a;
  font-size: 1.15rem;
  line-height: 1.55;
  border-radius: 8px;
  padding: 14px;
  box-sizing: border-box;
}
.kyaku-box textarea:focus {
  border-color: #5ea12f;
  box-shadow: 0 0 0 3px rgba(95, 170, 50, .2);
}

.kyaku-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.kyaku-actions #btnBet {
  background: #e85d2a;
  min-width: 96px;
}
.kyaku-actions #btnBet:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  opacity: .85;
}
.kyaku-total {
  margin-left: 4px;
  color: #dc2626;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}
.kyaku-total b {
  color: #dc2626;
  font-size: 1.55rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.kyaku-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  cursor: pointer;
  user-select: none;
  color: #475569;
  font-size: .9rem;
  white-space: nowrap;
}
.kyaku-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.kyaku-switch-ui {
  position: relative;
  width: 40px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .15s ease;
  flex-shrink: 0;
}
.kyaku-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .15s ease;
}
.kyaku-switch input:checked + .kyaku-switch-ui {
  background: #2563eb;
}
.kyaku-switch input:checked + .kyaku-switch-ui::after {
  transform: translateX(18px);
}
.kyaku-switch-text { line-height: 1; }

.help-line {
  color: #5b6b82;
  font-size: .86rem;
  margin-bottom: 12px;
  line-height: 1.6;
}
.help-line code {
  background: #e8eef7;
  padding: 2px 6px;
  border-radius: 4px;
  color: #1d4ed8;
}

.gen-table-wrap {
  overflow: auto;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  background: #fff;
}
.desk table { min-width: 680px; }
.desk th {
  background: #e8eef7;
  color: #4a5b73;
}
.desk td { border-bottom-color: #e5ebf3; color: #1c2430; }
.desk td.money { color: #c2410c; }
.desk td.empty { color: #94a3b8; text-align: center; padding: 20px; }
.desk .del-btn { color: #dc2626; }
.desk .staff-today {
  background: #fff;
  border-color: #cfd8e6;
}
.desk .staff-today h3 { color: #1c2430; }
.desk .staff-today .line { color: #64748b; }
.desk .staff-today .line b { color: #0f172a; }
.desk button.secondary { background: #64748b; color: #fff; }

/* 左右布局 */
.desk-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
}
@media (max-width: 980px) {
  .desk-layout { grid-template-columns: 1fr; }
}
.play-tag {
  margin-left: auto;
  align-self: center;
  margin-right: 12px;
  background: #e11d48;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 700;
}
.side-col { display: flex; flex-direction: column; gap: 10px; min-height: 520px; }
.acct-box, .hist-box {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  padding: 12px;
}
.acct-box h4, .hist-box h4 { margin: 0 0 10px; font-size: .95rem; color: #1e293b; }
.acct-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: #64748b;
  font-size: .88rem;
}
.acct-line b { color: #0f172a; }
.acct-line select { width: 58%; padding: 6px 8px; font-size: .85rem; }
.hist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.hist-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
}
.hist-search:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.hist-list {
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hist-empty { color: #94a3b8; text-align: center; padding: 24px 8px; font-size: .9rem; }
.hist-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}
.hist-item.refunded { opacity: .55; background: #f1f5f9; }
.hist-top { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: #0f172a; }
.hist-lot { display: inline-flex; align-items: center; gap: 6px; }
.hist-lot-name { font-size: .88rem; color: #334155; }

.lot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  vertical-align: middle;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .2);
}
.lot-badge + .lot-badge { margin-left: 4px; }
.lot-badge.lot-fu {
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
}
.lot-badge.lot-ti {
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
}

.parse-item-main {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: 36px;
}
.parse-idx {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: .9rem;
  font-weight: 700;
  border-right: 1px solid #cbd5e1;
}
.parse-item-main .mini-xiang {
  flex: 0 0 auto;
  align-self: center;
  margin: 0 0 0 2px;
  padding: 4px 8px;
  font-size: .78rem;
  background: #64748b;
  border-radius: 3px;
}
.parse-item-main .lot-badge {
  flex: 0 0 auto;
  align-self: center;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  padding: 0;
  border-radius: 3px;
  font-size: .85rem;
}
.parse-bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #dcfce7;
  border-left: 1px solid #bbf7d0;
}
.parse-bar.lot-fu { background: #dcfce7; }
.parse-bar.lot-ti { background: #e0f2fe; border-left-color: #bae6fd; }
.parse-bar.fail-bar { background: #fee2e2; border-left-color: #fecaca; }
.parse-bar.block-bar { background: #ffe4e6; border-left-color: #fecdd3; }
.parse-bar .parse-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}
.parse-sheet-sum {
  padding: 8px 12px 8px 40px;
  background: #fff;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid #f1f5f9;
}
.parse-detail {
  display: none;
}
.hist-id { color: #94a3b8; font-size: .75rem; margin: 4px 0; word-break: break-all; }
.hist-raw { color: #1d4ed8; font-weight: 600; margin: 4px 0; word-break: break-all; white-space: pre-line; }
.hist-amt { color: #c2410c; font-size: .88rem; margin-bottom: 6px; }
.hist-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-acts button {
  padding: 4px 8px;
  font-size: .78rem;
  border-radius: 4px;
}
.act-tui { background: #e11d48; }
.act-piao { background: #2563eb; }
.act-xiang { background: #0f766e; }
.act-copy { background: #64748b; }

.sub-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.subtab {
  background: #e2e8f0;
  color: #475569;
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
}
.subtab.active { background: #2f6fed; color: #fff; }

.kyaku-status {
  margin: 8px 0 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: .92rem;
}
.kyaku-status.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.kyaku-status.bad { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.kyaku-status.warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.help-doc {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  padding: 14px 16px;
  color: #334155;
  line-height: 1.65;
}
.help-doc code {
  background: #e8eef7;
  padding: 1px 6px;
  border-radius: 4px;
  color: #1d4ed8;
}
.row-refund td { opacity: .55; text-decoration: line-through; }

/* 逐行成功/失败标记 */
.parse-panel {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  /* 识别区随内容撑开，不锁死小窗高度 */
  max-height: none;
  overflow: visible;
}
.parse-empty {
  color: #94a3b8;
  text-align: center;
  padding: 28px 12px;
  font-size: .92rem;
}
.parse-row {
  border-bottom: 1px solid #e8eef5;
  padding: 10px 12px;
}
.parse-row.fail {
  background: #ffe4e6;
  border-left: 4px solid #e11d48;
}
.parse-row.ok {
  background: #ecfdf5;
  border-left: 4px solid #22c55e;
}
.parse-row.warn {
  background: #fffbeb;
  border-left: 4px solid #eab308;
}
.parse-row.block {
  background: #fff1f2;
  border-left: 4px solid #e11d48;
}
.parse-row.block .parse-idx {
  background: #e11d48;
  color: #fff;
  border-right-color: #be123c;
}
.parse-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-fail {
  background: #e11d48;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag-ok {
  background: #16a34a;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag-warn {
  background: #ca8a04;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag-block {
  align-self: center;
  background: #e11d48;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.parse-text {
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
}
.parse-reason {
  margin-top: 6px;
  color: #e11d48;
  font-size: .88rem;
}
.parse-reason.warn-reason {
  color: #a16207;
}
.parse-reason.block-reason {
  color: #be123c;
  font-weight: 600;
}
.parse-note {
  margin-top: 4px;
  color: #64748b;
  font-size: .82rem;
}
.mini-xiang {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: .75rem;
  background: #2563eb;
  border-radius: 4px;
}
.parse-sum {
  padding: 12px 14px;
  background: #fff7ed;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 2px solid #fdba74;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.parse-sum b {
  font-size: 1.28rem;
  font-weight: 800;
}
.parse-sum .amt {
  color: #dc2626;
  font-size: 1.35rem;
}
.parse-cascade {
  padding: 10px 12px 14px;
  color: #334155;
  font-size: .86rem;
  border-top: 1px dashed #94a3b8;
  background: #f1f5f9;
}

.settle-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.settle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.settle-row label { color: #64748b; font-size: .85rem; }
.settle-row input {
  width: 88px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 2px;
  background: #fff;
  color: #0f172a;
}
.settle-hint { margin-top: 8px; color: #64748b; font-size: .82rem; }
.sum-boxes {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.sum-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 10px;
  min-width: 92px;
}
.sum-box .sum-lab {
  font-size: .78rem;
  color: #64748b;
  font-weight: 700;
}
.sum-box b {
  font-size: 1.05rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.sum-box b.win { color: #be123c; }
.sum-box b.pl-pos { color: #16a34a; }
.sum-box b.pl-neg { color: #dc2626; }
.bet-sum {
  margin: 8px 0 12px;
  padding: 10px 12px;
  background: #fff7ed;
  border-radius: 8px;
  color: #9a3412;
  font-size: .92rem;
}
.bet-sum .win { color: #be123c; }
#ticketFoot td {
  background: #e0f2fe;
  color: #0c4a6e;
  font-weight: 800;
  border-top: 2px solid #38bdf8;
}
.settle-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
}
.st-pending { background: #e2e8f0; color: #475569; }
.st-win { background: #fecdd3; color: #be123c; }
.win-detail {
  max-width: 200px;
  font-size: 0.82rem;
  color: #be123c;
  font-weight: 600;
  word-break: break-all;
  white-space: pre-line;
}
.zn-app .win-detail { color: #be123c; }
.st-lose { background: #f1f5f9; color: #64748b; }
.st-refund { background: #fee2e2; color: #991b1b; }
.raw-cell { max-width: 220px; word-break: break-all; font-size: .82rem; white-space: pre-line; }
.muted { color: #94a3b8; font-size: .72rem; font-weight: 500; }
.odds-head { margin-bottom: 12px; }
.odds-head h3 { margin: 0 0 6px; }
.odds-table-wrap input {
  width: 100px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}
.odds-locked input {
  background: #f1f5f9 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

.lottery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.latest-draw {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: #9a3412;
  font-size: .95rem;
}
.ball {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  font-weight: 800;
  margin: 0 2px;
}
.draw-num { font-weight: 800; letter-spacing: 2px; color: #c2410c; }
.form-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
}
.form-z6 { background: #dbeafe; color: #1d4ed8; }
.form-z3 { background: #ffedd5; color: #c2410c; }
.form-bz { background: #fee2e2; color: #b91c1c; }
.trend-wrap { overflow: auto; max-height: 70vh; border: 1px solid #e2e8f0; border-radius: 8px; }
.trend-scroll { min-width: 100%; }
.trend-canvas-wrap {
  position: relative;
  display: inline-block;
  min-width: 100%;
  vertical-align: top;
  background: #fff;
}
.trend-lines {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.trend-table {
  border-collapse: collapse;
  font-size: .72rem;
  min-width: 900px;
  position: relative;
  z-index: 2;
  background: transparent;
}
.trend-table th, .trend-table td {
  border: 1px solid #e2e8f0;
  padding: 2px 3px;
  text-align: center;
  min-width: 18px;
  background: transparent;
}
.trend-table thead th { background: #fff; }
.trend-table .subhead th { background: #f8fafc; color: #64748b; font-weight: 600; }
.trend-table td.hit {
  background: transparent !important;
  padding: 1px;
  position: relative;
  z-index: 3;
}
.trend-table td.hit .hit-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
  font-size: .72rem;
  line-height: 1;
}
.trend-table td.hit.bai .hit-dot { background: #ef4444; color: #fff; }
.trend-table td.hit.shi .hit-dot { background: #2563eb; color: #fff; }
.trend-table td.hit.ge .hit-dot { background: #ef4444; color: #fff; }
.trend-table td.miss { color: #94a3b8; font-size: .65rem; }

.day-payout-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: #0c4a6e;
  font-size: .92rem;
}
.day-payout-box .payout-win { color: #b91c1c; font-weight: 800; }
.section-title {
  margin: 8px 0 10px;
  font-size: .95rem;
  color: #334155;
}
#lotteryResultBody tr.result-row { cursor: pointer; }
#lotteryResultBody tr.result-row:hover { background: #fff7ed; }
#lotteryResultBody tr.result-row.active-issue { background: #ffedd5; }

.zn-result-wrap {
  overflow: auto;
  max-height: 56vh;
  border: 1px solid #c5d0e0;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
.zn-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  min-width: 980px;
  color: #1c2430;
}
.zn-result-table th,
.zn-result-table td {
  border: 1px solid #d8e0ec;
  padding: 5px 4px;
  text-align: center;
  white-space: nowrap;
}
.zn-result-table thead th {
  background: #e8eef7;
  color: #334155;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}
.zn-result-table .zn-subhead th {
  top: 28px;
  background: #f1f5f9;
  font-weight: 600;
  font-size: .72rem;
  color: #64748b;
}
.zn-result-table tbody tr:nth-child(even) { background: #f8fafc; }
.zn-result-table tbody tr.active-issue { background: #fff3e0 !important; }
.zn-ball {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
}
.zn-ball.bai { background: #e11d48; }
.zn-ball.shi { background: #16a34a; }
.zn-ball.ge { background: #2563eb; }
.zn-ball.sum {
  background: #dc2626;
  min-width: 24px;
  padding: 0 4px;
  border-radius: 999px;
}
.attr-hot { color: #dc2626; font-weight: 700; }
.attr-cool { color: #2563eb; font-weight: 700; }
.zn-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 14px;
  color: #64748b;
  font-size: .85rem;
}
.zn-pager button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.zn-pager button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.zn-pager button:disabled { opacity: .45; cursor: default; }

/* ========== 中南式版面 ========== */
.zn-app {
  min-height: 100vh;
  background: #e8edf3;
  color: #1c2430;
  max-width: none;
  margin: 0;
  padding: 0;
}
.zn-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #1a3a6b;
  color: #fff;
  padding: 6px 12px;
  min-height: 52px;
}
.zn-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
  min-width: 88px;
}
.zn-brand strong {
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: #fff;
}
.zn-brand span {
  font-size: .7rem;
  color: #a8c0e0;
}

/* 解析器版本自检标（旧缓存时会变黄提醒强刷） */
.parser-build {
  font-size: .62rem !important;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
  letter-spacing: 0;
  cursor: default;
}
.parser-build.ok {
  background: rgba(74, 222, 128, .18);
  color: #86efac !important;
  border: 1px solid rgba(74, 222, 128, .35);
}
.parser-build.stale {
  background: #fbbf24;
  color: #422006 !important;
  font-weight: 700;
  animation: pbBlink 1.2s ease-in-out infinite;
}
@keyframes pbBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
@media (max-width: 820px) {
  .parser-build { display: none !important; }
}
.zn-head-draw {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}
.zn-app .hd-block {
  background: transparent;
  border: 0;
  padding: 2px 6px;
  min-height: auto;
  gap: 6px;
}
.zn-app .hd-meta b { color: #ffd666; font-size: .8rem; }
.zn-app .hd-issue { color: #c5d6ef; font-size: .7rem; }
.zn-app .hd-form { color: #fdba74; }
.zn-app .hd-ball {
  width: 24px;
  height: 24px;
  font-size: .85rem;
  background: linear-gradient(180deg, #ff6b6b, #dc2626);
}
.zn-app .hd-sum {
  background: #b91c1c;
  height: 24px;
  min-width: 26px;
  font-size: .8rem;
}
.zn-app .btn-head-sync {
  padding: 6px 12px;
  font-size: .82rem;
  border-radius: 4px;
  box-shadow: none;
  background: #3b82f6;
}
.zn-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  align-items: center;
  justify-content: flex-end;
}
.zn-links .tab {
  border: 0;
  background: transparent;
  color: #dbe7f7;
  padding: 4px 8px;
  border-radius: 0;
  font-size: .78rem;
  white-space: nowrap;
}
.zn-links .tab:hover { color: #fff; text-decoration: underline; }
.zn-links .tab.active {
  color: #ffd666;
  background: transparent;
  border: 0;
  font-weight: 700;
}
.zn-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.zn-app .date-lab { color: #c5d6ef; font-size: .75rem; }
.zn-app .date-lab input {
  background: #0f2748;
  border: 1px solid #3a5680;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: .75rem;
}
.zn-link-btn {
  border: 0;
  background: transparent;
  color: #dbe7f7;
  padding: 4px 8px;
  cursor: pointer;
  font-size: .78rem;
}
.zn-link-btn:hover { color: #fff; }

.zn-gamebar {
  background: #2f6fed;
  padding: 0 8px;
}
.zn-gamebar .game-tabs {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 0;
  overflow: visible;
}
.zn-gamebar .game-tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: transparent;
  color: #dbe7ff;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.2);
  font-weight: 700;
  font-size: .92rem;
}
.zn-gamebar .game-tab.active {
  background: #fff;
  color: #1a3a6b;
}

.zn-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff7e6;
  border-bottom: 1px solid #f0d9a8;
  padding: 6px 12px;
  font-size: .85rem;
}
.zn-sub-left { display: flex; align-items: center; gap: 8px; color: #8a6a30; }
.zn-sub-active { color: #c2410c; font-weight: 800; }
.zn-sub-sep { color: #d6b87a; }
.zn-sub-muted { color: #a07840; }
.btn-trend {
  background: #dc2626;
  color: #fff;
  border: 0;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 800;
  cursor: pointer;
  font-size: .85rem;
}
.btn-trend:hover { filter: brightness(1.08); }

.zn-main {
  padding: 10px 12px 24px;
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.zn-stats {
  margin-bottom: 8px;
}
.zn-stats .stat-card {
  background: #fff;
  border: 1px solid #d0dae8;
  padding: 8px 12px;
}
.zn-stats .stat-card .k { color: #64748b; }
.zn-stats .stat-card .v { color: #1a3a6b; font-size: 1.1rem; }

.zn-app .panel {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  box-shadow: none;
  color: #1c2430;
}
.zn-app .panel.desk {
  background: #fff;
  border: 0;
  padding: 0;
  box-shadow: none;
  /* 主工作区吃满视口剩余高度，识别结果不再挤在底部小窗 */
  min-height: calc(100vh - 168px);
  display: flex;
  flex-direction: column;
}
.zn-app .desk-layout {
  /* 原侧栏 260px，向右扩宽自身一半 → 390px；录入区吃剩余宽度 */
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 10px;
  flex: 1;
  align-items: start;
}
.zn-app .side-col {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.zn-app .acct-box {
  border: 1px solid #b8cce8;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}
.zn-app .acct-box h4 {
  margin: 0;
  background: #2f6fed;
  color: #fff;
  padding: 8px 12px;
  font-size: .9rem;
}
.zn-app .acct-line {
  padding: 7px 12px;
  border-bottom: 1px solid #e8eef7;
  margin: 0;
  font-size: .85rem;
}
.zn-app .acct-line:last-child { border-bottom: 0; }
.zn-app .acct-line span { color: #64748b; }
.zn-app .acct-line b { color: #0f172a; }
.zn-app .hist-box {
  border: 1px solid #cfd8e6;
  border-radius: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.zn-app .hist-head {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
}
.zn-app .hist-head h4 { margin: 0; font-size: .88rem; color: #334155; }
.zn-app .hist-search {
  margin: 8px 10px 6px;
  width: calc(100% - 20px);
}
.zn-app .hist-list { flex: 1; max-height: 420px; padding: 0 8px 8px; }
.desk-issue-inp {
  width: 88px;
  margin-left: 6px;
  padding: 3px 8px;
  border: 1px solid #b6c6e0;
  border-radius: 4px;
  background: #fff;
  color: #1a3a6b;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.desk-issue-inp:focus {
  outline: none;
  border-color: #3b82f6;
}
.zn-app .main-col {
  border: 1px solid #cfd8e6;
  background: #fff;
  display: flex;
  flex-direction: column;
  /* 随录入框自动增高，不锁死视口高度 */
  min-height: 100%;
  height: auto;
}
.issue-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #e8f0fe;
  border-bottom: 1px solid #c5d4f0;
  padding: 6px 12px;
  font-size: .85rem;
  color: #1e3a8a;
  font-weight: 700;
}
.issue-bar-mid { font-weight: 600; color: #334155; flex-shrink: 0; }
.seal-countdown {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-left: auto;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.seal-countdown .cd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 10px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  white-space: nowrap;
  min-width: 14.5em;
}
.seal-countdown .cd-lab {
  font-size: .92rem;
  font-weight: 700;
  color: inherit;
  opacity: .92;
}
.seal-countdown .cd-item b {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .03em;
  min-width: 7.6em;
  text-align: right;
  font-family: Consolas, "Courier New", monospace;
}
.seal-countdown .cd-item.cd-warn {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}
.seal-countdown .cd-item.cd-sealed {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}
.zn-app .sub-tabs {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  margin: 0;
  padding: 0 8px;
  gap: 0;
}
.zn-app .subtab {
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  padding: 10px 14px;
}
.zn-app .subtab.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  background: #fff;
  font-weight: 800;
}
.zn-app #subInput { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.zn-app .kyaku-box { flex: 0 0 auto; }
.zn-app .kyaku-box textarea {
  /* 交给 autoGrowKyakuInput：随行数增高，不设 max-height */
  min-height: 200px;
  height: 200px;
  overflow-y: hidden;
  resize: none;
  background: #e8f4ff;
  border: 1px solid #93c5fd;
  border-radius: 2px;
  color: #0f172a;
  box-sizing: border-box;
}
.zn-app .kyaku-actions {
  background: #f1f5f9;
  margin: 0 -10px;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  flex: 0 0 auto;
}
.zn-app .kyaku-actions #btnBet {
  background: #2563eb;
}
.zn-app .kyaku-total {
  font-size: 1.45rem;
}
.zn-app .kyaku-total b {
  font-size: 1.7rem;
}
.zn-app .parse-panel {
  /* 随识别行数自然撑开，不挤在底部小滚动窗 */
  flex: 0 0 auto;
  min-height: 220px;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  overflow: visible;
  max-height: none;
}
.zn-app .parse-row {
  margin: 0 0 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-left: 0;
  overflow: hidden;
}
.zn-app .parse-row.ok { border-left: 0; background: #fff; }
.zn-app .parse-row.warn { border-left: 3px solid #eab308; }
.zn-app .parse-row.block { border-left: 3px solid #e11d48; background: #fff1f2; }
.zn-app .parse-row.fail { border-left: 3px solid #e11d48; }
.zn-app .parse-row.block .parse-reason.block-reason {
  background: #fff1f2;
}
.zn-app .parse-reason {
  padding: 6px 12px 8px 40px;
  margin: 0;
  background: #fff;
}
.zn-app .parse-note { display: none; }
.zn-app .help-doc { padding: 14px; color: #334155; }
.zn-app label { color: #475569; }
.zn-app input,
.zn-app select,
.zn-app textarea {
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}
.zn-app .settle-row input {
  background: #fff;
  color: #0f172a;
  width: 88px;
}
.zn-app .lottery-toolbar select {
  width: auto;
  min-width: 110px;
  padding: 8px 12px;
  background: #fff;
  color: #0f172a;
}
.zn-app .lottery-toolbar .chip.active {
  background: #2563eb;
  color: #fff;
}
.zn-app .latest-draw {
  background: #fff7ed;
  border-color: #fdba74;
}
.zn-app .day-payout-box {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0c4a6e;
}
.zn-app .settle-bar {
  background: #f8fafc;
}
.zn-app .staff-item {
  background: #f8fafc;
  border: 1px solid #d0dae8;
  color: #0f172a;
}
.zn-app .staff-item b {
  color: #0f172a;
}
.zn-app .station-card {
  background: #f8fafc;
  border: 1px solid #d0dae8;
  color: #0f172a;
}
.zn-app .station-card h3 { color: #0f172a; }
.zn-app .station-card .meta { color: #64748b; }
.zn-app .station-card .money { color: #c2410c; }
.zn-app .chip {
  background: #e8eef7;
  border-color: #c5d0e0;
  color: #334155;
}
.zn-app .chip.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.zn-app .hint {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
.zn-app th {
  background: #e8eef7;
  color: #475569;
}
.zn-app button.secondary {
  background: #64748b;
  color: #fff;
}
.zn-app .toast {
  background: #1e3a5f;
  border-color: #3b82f6;
  color: #e0f2fe;
}

@media (max-width: 980px) {
  .zn-app .desk-layout { grid-template-columns: 1fr; }
  .zn-links { width: 100%; justify-content: flex-start; order: 5; }
  .zn-head-draw { order: 4; width: 100%; }
}

.day-hot-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.day-hot-card {
  background: #fff;
  border: 1px solid #d0dae8;
  border-radius: 8px;
  padding: 10px 14px;
}
.day-hot-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a3a6b;
  margin-bottom: 8px;
}
.day-hot-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: decimal;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.7;
}
.day-hot-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-right: 2px;
}
.day-hot-list .hot-num {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.day-hot-list .hot-amt {
  color: #b45309;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.day-hot-empty {
  color: #94a3b8;
  font-size: 0.85rem;
  list-style: none;
  margin-left: -1.25rem;
}
@media (max-width: 720px) {
  .day-hot-stats { grid-template-columns: 1fr; }
}

.list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.lf-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .78rem;
  color: #64748b;
  margin: 0;
}
.lf-item select,
.lf-item input[type="text"],
.lf-item input[type="date"] {
  min-width: 120px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: .9rem;
}
.lf-grow { flex: 1; min-width: 180px; }
.lf-grow input { width: 100%; min-width: 160px; }
.zn-app .list-filter-bar {
  background: #fff;
  border-color: #d0dae8;
}

/* ===== 分站每日额度 ===== */
.quota-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 5px;
  font-size: .8rem;
  color: #4a5568;
  flex-wrap: wrap;
}
.quota-line .quota-lab b { color: #1e293b; }
.quota-line .quota-used { color: #2b6cb0; }
.quota-line .quota-used.over { color: #c0392b; font-weight: 700; }
.quota-bar {
  height: 7px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 8px;
}
.quota-bar-fill {
  height: 100%;
  background: #3d9cf0;
  border-radius: 99px;
  transition: width .3s ease;
}
.quota-bar-fill.warn { background: #e0a33a; }
.quota-bar-fill.danger { background: #c0392b; }
.quota-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.quota-edit input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  font-size: .82rem;
  background: #fff;
  color: #1e293b;
}
.quota-edit button {
  flex: none;
  padding: 7px 12px;
  font-size: .8rem;
  white-space: nowrap;
}

/* ===== 订单号 ===== */
.order-no {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #eef4fc;
  color: #1b4f87;
  font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .78rem;
  letter-spacing: .02em;
  border: 1px solid #cfe0f5;
}
.order-no.empty {
  background: #f2f4f7;
  color: #8a97a8;
  font-weight: 400;
  border-color: #e2e8f0;
}

/* ===== 订单号 ===== */
.order-no {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #eef4fc;
  color: #1b4f87;
  font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .78rem;
  letter-spacing: .02em;
  border: 1px solid #cfe0f5;
}
.order-no.empty {
  background: #f2f4f7;
  color: #8a97a8;
  font-weight: 400;
  border-color: #e2e8f0;
}
.fb-orderno {
  font-family: ui-monospace, Consolas, monospace;
  color: #7cc0ff;
  font-weight: 700;
  white-space: nowrap;
}
.fb-orderno-box .fb-orderno-input {
  width: 140px;
  background: #121a26;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .84rem;
}

/* ===== MOBILE-LAYOUT-V1 ===== */
/* 全局防横向溢出 */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after {
  min-width: 0;
}
.zn-app {
  overflow-x: hidden;
}

@media (max-width: 820px) {
  /* ---- 顶栏：紧凑两行 ---- */
  .zn-top {
    padding: 6px 10px;
    gap: 6px;
    min-height: 0;
  }
  .zn-brand { min-width: auto; }
  .zn-brand strong { font-size: 1rem; letter-spacing: 0; }
  .zn-brand span { font-size: .66rem; }

  .zn-head-draw {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .zn-head-draw::-webkit-scrollbar { display: none; }
  .zn-app .hd-block {
    flex: 0 0 auto;
    padding: 2px 4px;
  }
  .zn-app .hd-meta b { font-size: .74rem; }
  .zn-app .hd-issue { font-size: .64rem; }
  .zn-app .hd-ball { width: 20px; height: 20px; font-size: .74rem; }
  .zn-app .hd-sum { height: 20px; min-width: 22px; font-size: .72rem; }
  .btn-head-sync { padding: 4px 10px; font-size: .74rem; }

  .zn-links {
    order: 4;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .zn-links::-webkit-scrollbar { display: none; }
  .zn-links .tab {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: .78rem;
    white-space: nowrap;
  }

  .zn-tools {
    order: 5;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
  }
  .zn-tools .date-lab { font-size: .74rem; }
  .zn-tools .date-lab input { padding: 5px 8px; font-size: .76rem; }
  .zn-sysmode, .fc3d-sysmode { padding: 4px 8px; font-size: .74rem; }
  .zn-link-btn { padding: 5px 10px; font-size: .76rem; }

  /* ---- 彩种切换栏 ---- */
  .zn-gamebar {
    padding: 0 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .zn-gamebar .game-tab { padding: 8px 14px; font-size: .84rem; white-space: nowrap; }

  /* ---- 封盘提示条 ---- */
  .zn-subbar {
    padding: 6px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .zn-sub-left { font-size: .76rem; flex-wrap: wrap; gap: 4px; }
  .btn-trend { padding: 5px 10px; font-size: .74rem; }

  /* ---- 主区域 ---- */
  .zn-main { padding: 8px 8px 24px; }

  .zn-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }
  .zn-stats .stat-card { padding: 8px 10px; }
  .zn-stats .stat-card .k { font-size: .7rem; }
  .zn-stats .stat-card .v { font-size: .98rem; }

  /* ---- 快译台：单栏，录入在上、历史在下 ---- */
  .zn-app .desk-layout,
  .desk-layout {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 10px;
  }
  .desk-layout .main-col {
    order: 1 !important;
    width: 100%;
  }
  .desk-layout .side-col {
    order: 2 !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .panel.desk { padding: 8px; border-radius: 12px; }

  /* ---- 期号 / 封盘倒计时 ---- */
  .issue-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .issue-bar > span:first-child { font-size: .86rem; }
  .seal-countdown {
    width: 100%;
    gap: 6px;
    order: 3;
  }
  .cd-item {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    gap: 4px;
  }
  .cd-lab { font-size: .68rem; white-space: nowrap; }
  .cd-item b { font-size: .8rem; }
  .issue-bar-mid {
    order: 2;
    margin-left: auto;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .desk-issue-inp { width: 96px !important; padding: 6px 8px !important; font-size: .82rem !important; }

  /* ---- 录入区 ---- */
  .sub-tabs { padding: 0 4px; }
  .subtab { padding: 8px 14px; font-size: .82rem; }

  .kyaku-box { padding: 8px; }
  .kyaku-box textarea {
    min-height: 110px;
    font-size: 16px;      /* 防止 iOS 聚焦放大 */
    line-height: 1.6;
    padding: 10px;
  }
  .kyaku-status { font-size: .74rem; padding: 6px 8px; }

  .kyaku-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }
  .kyaku-actions > button {
    flex: 1 1 calc(50% - 8px);
    min-height: 42px;
    font-size: .88rem;
    padding: 10px 8px;
  }
  .kyaku-total {
    width: 100%;
    font-size: .86rem;
    order: 5;
    text-align: center;
  }
  .kyaku-switch {
    width: 100%;
    justify-content: center;
    order: 6;
  }
  .parse-panel { max-height: 40vh; overflow-y: auto; }

  /* ---- 账户信息 / 下单历史 ---- */
  .acct-box, .hist-box { padding: 10px; border-radius: 10px; }
  .acct-box h4, .hist-box h4 { font-size: .88rem; margin-bottom: 8px; }
  .acct-line { font-size: .82rem; margin: 6px 0; }
  .acct-line select { padding: 7px 8px; font-size: .82rem; }

  .hist-search { padding: 8px 10px; font-size: .84rem; }
  .hist-list { max-height: 46vh; overflow-y: auto; }
  .hist-item { padding: 9px 10px; margin-bottom: 8px; }
  .hist-top { font-size: .78rem; }
  .hist-id { font-size: .68rem; line-height: 1.5; word-break: break-all; }
  .hist-raw { font-size: .8rem; line-height: 1.55; word-break: break-all; }
  .hist-amt { font-size: .78rem; }
  .hist-acts { gap: 6px; }
  .hist-acts button { padding: 5px 10px; font-size: .74rem; }

  /* ---- 表单栅格全部单列 ---- */
  .row.two-col, .row.three-col, .two-col, .three-col, .grid-entry, .pos-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .row label { font-size: .78rem; }
  input[type="text"], input[type="number"], input[type="password"], select, textarea {
    font-size: 16px;   /* 防 iOS 缩放 */
  }

  /* ---- 表格横向滚动 ---- */
  .table-wrap, .fb-table-wrap, .odds-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table, .fb-table-wrap table { min-width: 720px; }

  /* ---- 数据反馈 ---- */
  .fb-wrap { padding: 10px; }
  .fb-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .fb-actions { flex-wrap: wrap; gap: 6px; }
  .fb-actions button { flex: 1 1 calc(50% - 6px); font-size: .8rem; padding: 8px 10px; }
  .fb-autosync, .fb-source { width: 100%; font-size: .7rem; text-align: center; }
  .fb-cards { grid-template-columns: 1fr; gap: 10px; }
  .fb-card { padding: 12px; }
  .fb-ball { width: 38px; height: 38px; font-size: 1.08rem; }
  .fb-balls.small .fb-ball { width: 30px; height: 30px; font-size: .88rem; }
  .fb-save-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .fb-save-row input { width: 100%; }
  .fb-save-row button { width: 100%; padding: 10px; }
  .fb-stats { grid-template-columns: repeat(2, 1fr); }
  .fb-retention-body { flex-direction: column; align-items: stretch; gap: 8px; }
  .fb-retention-body button { margin-left: 0; width: 100%; }
  .fb-retention-body .fb-orderno-input { width: 100%; }

  /* ---- 分站卡片 ---- */
  .station-grid { grid-template-columns: 1fr !important; }
  .station-card { padding: 12px; }
  .station-card .btns { flex-wrap: wrap; gap: 6px; }
  .station-card .btns button { flex: 1 1 calc(50% - 6px); font-size: .8rem; }

  /* ---- 弹窗 ---- */
  .zn-confirm-box, .fc3d-modal { width: calc(100vw - 32px); padding: 16px; }
  .fc3d-modal-actions { flex-direction: column-reverse; }
  .fc3d-modal-actions button { width: 100%; }

  /* ---- 试机号横幅 ---- */
  .fc3d-trial-banner { gap: 8px; padding: 8px 10px; font-size: .8rem; flex-wrap: wrap; }
  .fc3d-trial-tip { margin-left: 0; width: 100%; }

  /* ---- toast ---- */
  .toast { left: 12px; right: 12px; width: auto; transform: none; font-size: .84rem; }
}

/* 小屏（<=420px）进一步压缩 */
@media (max-width: 420px) {
  .zn-brand strong { font-size: .94rem; }
  .zn-links .tab { padding: 6px 8px; font-size: .74rem; }
  .zn-stats .stat-card .v { font-size: .9rem; }
  .kyaku-actions > button { flex: 1 1 100%; }
  .fb-actions button { flex: 1 1 100%; }
}
/* ===== /MOBILE-LAYOUT-V1 ===== */

/* ===== MOBILE-LAYOUT-V2 ===== */
@media (max-width: 820px) {
  /* 顶栏改为：品牌+同步一行，导航横向滑动一行，工具一行 */
  .zn-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand draw sync"
      "links links links"
      "tools tools tools";
    align-items: center;
    row-gap: 6px;
    padding: 8px 10px 6px;
  }
  .zn-brand { grid-area: brand; }
  .zn-head-draw {
    grid-area: draw;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 2px;
    width: auto;
    min-width: 0;
  }
  .zn-head-draw::-webkit-scrollbar { display: none; }
  #btnHeadSync, .btn-head-sync { grid-area: sync; align-self: center; }

  /* 导航：横向滑动，不再换行 */
  .zn-links {
    grid-area: links;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    margin: 0 -10px;
    padding: 2px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .zn-links::-webkit-scrollbar { display: none; }
  .zn-links .tab {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: .8rem;
    white-space: nowrap;
    border-radius: 8px;
  }
  .zn-links .tab.active {
    background: rgba(255, 255, 255, .14);
  }

  /* 工具行 */
  .zn-tools {
    grid-area: tools;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -10px;
    padding: 0 10px 4px;
  }
  .zn-tools::-webkit-scrollbar { display: none; }
  .zn-tools > * { flex: 0 0 auto; }
  .zn-tools .date-lab { font-size: .72rem; gap: 4px; }
  .zn-tools .date-lab input { padding: 4px 6px; font-size: .74rem; width: 116px; }
  .zn-tools .zn-link-btn { padding: 5px 10px; font-size: .74rem; }

  /* 录入框降低高度 */
  .kyaku-box textarea { min-height: 88px !important; max-height: 30vh; }

  /* 按钮两列 */
  .kyaku-actions > button {
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 40px;
    font-size: .86rem;
  }
  /* 下注按钮单独整行更醒目 */
  #btnBet {
    flex: 1 1 100% !important;
    min-height: 46px;
    font-size: .96rem;
    font-weight: 700;
  }

  /* 统计卡更矮 */
  .zn-stats .stat-card { padding: 7px 10px; }
  .zn-stats .stat-card .k { font-size: .68rem; margin-bottom: 2px; }
  .zn-stats .stat-card .v { font-size: .92rem; }
}

@media (max-width: 420px) {
  .zn-links .tab { padding: 6px 9px; font-size: .76rem; }
  .kyaku-actions > button { flex: 1 1 calc(50% - 8px) !important; }
}
/* ===== /MOBILE-LAYOUT-V2 ===== */

/* ===== MOBILE-LAYOUT-V3 ===== */
@media (max-width: 820px) {
  /* 录入框：压掉内联 height（autoGrow 会写 inline style），限制最大高度 */
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 84px !important;
    height: auto !important;
    max-height: 24vh !important;
    overflow-y: auto !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    padding: 10px !important;
  }
  .zn-app .kyaku-box { padding: 6px !important; }

  /* 识别结果面板也压矮 */
  .parse-panel {
    max-height: 30vh !important;
    overflow-y: auto !important;
  }

  /* 统计卡：单行四个，更省垂直空间 */
  .zn-stats {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  .zn-stats .stat-card {
    padding: 6px 8px !important;
  }
  .zn-stats .stat-card .k {
    font-size: .62rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .zn-stats .stat-card .v {
    font-size: .86rem !important;
  }

  /* 期号行更紧凑 */
  .issue-bar {
    padding: 6px 8px !important;
    gap: 5px !important;
  }
  .seal-countdown { gap: 5px !important; }
  .cd-item { padding: 4px 7px !important; }
  .cd-lab { font-size: .64rem !important; }
  .cd-item b { font-size: .76rem !important; }

  /* 彩种切换栏更矮 */
  .zn-gamebar .game-tab { padding: 7px 12px !important; font-size: .82rem !important; }

  /* 封盘提示条收窄 */
  .zn-subbar { padding: 5px 8px !important; }
  .zn-sub-left { font-size: .72rem !important; }

  /* 主区域左右留白收窄 */
  .zn-main { padding: 6px 6px 20px !important; }
  .panel.desk { padding: 6px !important; }
}

@media (max-width: 420px) {
  .zn-stats .stat-card .k { font-size: .58rem !important; }
  .zn-stats .stat-card .v { font-size: .8rem !important; }
}
/* ===== /MOBILE-LAYOUT-V3 ===== */

/* ===== 登录提示条 / 空闲提醒 ===== */
.login-notice {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .84rem;
  line-height: 1.6;
  text-align: left;
  border: 1px solid transparent;
}
.login-notice.warn {
  background: rgba(214, 137, 16, .14);
  border-color: rgba(214, 137, 16, .42);
  color: #ffca7a;
}
.login-notice.error {
  background: rgba(192, 57, 43, .14);
  border-color: rgba(192, 57, 43, .42);
  color: #ff9b8f;
}
.login-notice.info {
  background: rgba(61, 156, 240, .12);
  border-color: rgba(61, 156, 240, .34);
  color: #9fd0ff;
}

.idle-warn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(214, 137, 16, .18);
  border: 1px solid rgba(214, 137, 16, .45);
  color: #ffca7a;
  font-size: .74rem;
  white-space: nowrap;
}
.idle-warn b {
  color: #ffdf9e;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 820px) {
  .idle-warn { font-size: .68rem; padding: 2px 7px; }
}

/* ===== 分站账号设置 ===== */
.acct-set {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.acct-set-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #1a3a6b;
}
.acct-set-hint {
  margin: 0 0 14px;
  font-size: .82rem;
  color: #64748b;
  line-height: 1.6;
}
.acct-set-sub {
  margin: 18px 0 10px;
  font-size: .92rem;
  color: #1a3a6b;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.acct-set-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.acct-set-grid label {
  font-size: .8rem;
  color: #64748b;
}
.acct-set-grid input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  font-size: .88rem;
  background: #f8fafc;
  color: #1c2430;
}
.acct-set-grid input[readonly] {
  background: #eef2f7;
  color: #64748b;
}
.acct-set-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.acct-set-actions button {
  padding: 10px 24px;
  font-size: .88rem;
  border-radius: 8px;
}
@media (max-width: 820px) {
  .acct-set { padding: 12px 14px; }
  .acct-set-grid { grid-template-columns: 1fr; gap: 10px; }
  .acct-set-actions button { width: 100%; }
}

/* ===== 主号编辑分站账号弹窗 ===== */
.st-edit-box {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
.st-edit-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  color: #e8eef7;
}
.st-edit-sub {
  margin: 0 0 16px;
  font-size: .8rem;
  color: #8ca0bd;
}
.st-edit-lab {
  display: block;
  font-size: .78rem;
  color: #a8bdd8;
  margin: 12px 0 6px;
}
.st-edit-inp {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #3a4d69;
  border-radius: 8px;
  background: #121a26;
  color: #e8eef7;
  font-size: .88rem;
  box-sizing: border-box;
}
.st-edit-inp:focus {
  outline: 2px solid #3d9cf0;
  outline-offset: 1px;
}
.st-edit-tip {
  margin: 14px 0 4px;
  font-size: .74rem;
  color: #8ca0bd;
  line-height: 1.6;
}

/* ===== 分站开通信息弹窗 ===== */
.st-created-box {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
.st-created-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: #7ee787;
}
.st-created-sub {
  margin: 0 0 16px;
  font-size: .8rem;
  color: #8ca0bd;
}
.st-created-row {
  margin: 12px 0;
}
.st-created-lab {
  display: block;
  font-size: .74rem;
  color: #8ca0bd;
  margin-bottom: 5px;
}
.st-created-val {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.st-created-val code {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  background: #121a26;
  border: 1px solid #3a4d69;
  border-radius: 8px;
  color: #cfe3ff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .86rem;
  word-break: break-all;
  display: flex;
  align-items: center;
}
.st-created-val code.st-created-muted {
  color: #7a8ba3;
  font-size: .76rem;
  font-family: inherit;
}
.st-created-copy {
  flex: none;
  padding: 0 14px;
  border: 1px solid #3d9cf0;
  background: rgba(61, 156, 240, .14);
  color: #7cc0ff;
  border-radius: 8px;
  font-size: .8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.st-created-copy:hover { background: rgba(61, 156, 240, .26); }
.st-created-copy.done {
  border-color: #4ade80;
  background: rgba(74, 222, 128, .18);
  color: #7ee787;
}
.st-created-tip {
  margin: 14px 0 16px;
  font-size: .74rem;
  color: #8ca0bd;
  line-height: 1.65;
}
.st-created-tip b { color: #ffd666; }
@media (max-width: 820px) {
  .st-created-box { width: 100%; }
  .st-created-val { flex-wrap: wrap; }
  .st-created-val code { width: 100%; }
  .st-created-copy { width: 100%; padding: 8px; }
}

/* ===== MOBILE-LAYOUT-V4 ===== */
/* 手机端录入框放大：之前 84px 太小，看不清也写不下 */
@media (max-width: 820px) {
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 40vh !important;
    height: 40vh !important;
    max-height: none !important;
    overflow-y: auto !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
    padding: 14px !important;
    border-radius: 10px !important;
    resize: none !important;
  }
  .zn-app .kyaku-box {
    padding: 8px !important;
  }

  /* 识别结果面板也放大，方便核对 */
  .parse-panel {
    max-height: 42vh !important;
    overflow-y: auto !important;
    font-size: .88rem !important;
  }

  /* 小屏手机（高度不足）按比例略缩，但不再小于 240px */
  @media (max-height: 700px) {
    .zn-app .kyaku-box textarea,
    .kyaku-box textarea,
    #kyakuInput {
      min-height: 34vh !important;
      height: 34vh !important;
    }
  }
}

/* 横屏时按高度算，避免撑出屏幕 */
@media (max-width: 900px) and (orientation: landscape) {
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 46vh !important;
    height: 46vh !important;
  }
}
/* ===== /MOBILE-LAYOUT-V4 ===== */

/* ===== MOBILE-LAYOUT-V5 ===== */
/* 手机端最终尺寸：录入框够大 + 下注按钮留在首屏 */
@media (max-width: 820px) {
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 32vh !important;
    height: 32vh !important;
    max-height: 40vh !important;
    overflow-y: auto !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
    padding: 14px !important;
    resize: none !important;
  }

  /* 缩短上方占用，把空间让给录入框 */
  .zn-stats { margin-bottom: 6px !important; }
  .zn-stats .stat-card { padding: 5px 8px !important; }
  .zn-stats .stat-card .v { font-size: .82rem !important; }

  .issue-bar { padding: 5px 8px !important; }
  .panel.desk { padding: 5px !important; }
  .sub-tabs { margin-bottom: 0 !important; }
  .subtab { padding: 6px 12px !important; }

  /* 下注按钮更高更醒目，且紧贴录入框 */
  .kyaku-actions { padding: 6px !important; gap: 6px !important; }
  #btnBet {
    min-height: 50px !important;
    font-size: 1.02rem !important;
    order: -1;
  }
  .kyaku-actions > button:not(#btnBet) {
    min-height: 38px !important;
    font-size: .82rem !important;
  }
  .kyaku-status { padding: 5px 8px !important; font-size: .74rem !important; }
}

/* 矮屏手机：再收一点，保证按钮可见 */
@media (max-width: 820px) and (max-height: 700px) {
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 28vh !important;
    height: 28vh !important;
    max-height: 34vh !important;
  }
}

/* 横屏：按高度分配 */
@media (max-width: 900px) and (orientation: landscape) {
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 40vh !important;
    height: 40vh !important;
    max-height: 50vh !important;
  }
}
/* ===== /MOBILE-LAYOUT-V5 ===== */

/* ===== MOBILE-LAYOUT-V6 ===== */
/* 矮屏手机：压缩头部与统计，优先保证「录入框 + 下注」同屏 */
@media (max-width: 820px) and (max-height: 720px) {
  /* 顶栏更紧凑 */
  .zn-top { padding: 4px 8px 3px !important; row-gap: 3px !important; }
  .zn-brand strong { font-size: .88rem !important; }
  .zn-brand span { display: none !important; }
  .zn-links .tab { padding: 5px 9px !important; font-size: .72rem !important; }
  .zn-tools { padding-bottom: 2px !important; }
  .zn-tools .date-lab input { padding: 3px 5px !important; font-size: .7rem !important; }

  /* 彩种栏变矮 */
  .zn-gamebar .game-tab { padding: 5px 10px !important; font-size: .78rem !important; }

  /* 封盘条压缩成一行 */
  .zn-subbar { padding: 3px 8px !important; }
  .zn-sub-left { font-size: .68rem !important; }
  .btn-trend { padding: 4px 8px !important; font-size: .7rem !important; }

  /* 统计卡：缩成极小行，只留数字 */
  .zn-stats { margin-bottom: 4px !important; gap: 4px !important; }
  .zn-stats .stat-card { padding: 4px 6px !important; border-radius: 8px !important; }
  .zn-stats .stat-card .k { font-size: .58rem !important; }
  .zn-stats .stat-card .v { font-size: .76rem !important; }

  /* 期号+封盘行压缩 */
  .issue-bar { padding: 4px 6px !important; gap: 4px !important; }
  .issue-bar > span:first-child { font-size: .8rem !important; }
  .seal-countdown { gap: 4px !important; }
  .cd-item { padding: 3px 6px !important; }
  .cd-lab { font-size: .6rem !important; }
  .cd-item b { font-size: .72rem !important; }
  .desk-issue-inp { width: 82px !important; padding: 4px 6px !important; font-size: .76rem !important; }

  /* 录入区 */
  .sub-tabs { margin: 0 !important; }
  .subtab { padding: 5px 10px !important; font-size: .76rem !important; }
  .zn-app .kyaku-box { padding: 4px !important; }
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 26vh !important;
    height: 26vh !important;
    max-height: 30vh !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    padding: 10px !important;
  }
  .kyaku-status { padding: 3px 6px !important; font-size: .68rem !important; }
  .kyaku-actions { padding: 4px !important; gap: 4px !important; }
  #btnBet { min-height: 44px !important; font-size: .94rem !important; }
  .kyaku-actions > button:not(#btnBet) { min-height: 34px !important; font-size: .76rem !important; }
  .panel.desk { padding: 4px !important; }
}
/* ===== /MOBILE-LAYOUT-V6 ===== */

/* ===== MOBILE-LAYOUT-V7 ===== */
/* 超小屏（如 320x568）：进一步精简单行，保证下注按钮可见 */
@media (max-width: 400px) and (max-height: 600px) {
  .zn-top { row-gap: 2px !important; padding: 3px 6px 2px !important; }
  .zn-head-draw { display: none !important; }
  .zn-links .tab { padding: 4px 8px !important; font-size: .7rem !important; }
  .zn-tools { padding-bottom: 1px !important; }
  .zn-tools .date-lab { display: none !important; }
  .zn-gamebar .game-tab { padding: 4px 8px !important; font-size: .74rem !important; }
  .zn-subbar { padding: 2px 6px !important; }
  .zn-sub-left .zn-sublot { display: none !important; }
  .zn-sub-left { font-size: .64rem !important; }
  .btn-trend { padding: 3px 6px !important; font-size: .66rem !important; }

  .zn-stats { display: none !important; }

  .issue-bar { padding: 3px 6px !important; }
  .seal-countdown { display: none !important; }
  .desk-issue-inp { width: 74px !important; padding: 3px 5px !important; font-size: .72rem !important; }

  .subtab { padding: 4px 8px !important; font-size: .72rem !important; }
  .zn-app .kyaku-box textarea,
  .kyaku-box textarea,
  #kyakuInput {
    min-height: 24vh !important;
    height: 24vh !important;
    max-height: 28vh !important;
    font-size: 16px !important;
    padding: 8px !important;
  }
  #btnBet { min-height: 42px !important; font-size: .9rem !important; }
  .kyaku-actions > button:not(#btnBet) { min-height: 32px !important; }
  .kyaku-actions { padding: 3px !important; gap: 3px !important; }
  .panel.desk { padding: 3px !important; }
}
/* ===== /MOBILE-LAYOUT-V7 ===== */

/* ===== 全站赔付看板 ===== */
.settle-board {
  background: #fff;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.settle-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.settle-board-head h3 {
  margin: 0;
  font-size: 1.02rem;
  color: #1a3a6b;
}
.settle-board-date {
  font-size: .78rem;
  color: #64748b;
}
.settle-board-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.sb-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.sb-k {
  font-size: .72rem;
  color: #64748b;
  margin-bottom: 4px;
}
.sb-v {
  font-size: 1.08rem;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}
.sb-v.sb-win { color: #b45309; }
.sb-v.sb-profit.pos, .sb-v.sb-profit { color: #047857; }
.sb-v.sb-profit.neg { color: #c0392b; }

.sb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.sb-table th {
  text-align: left;
  font-weight: 600;
  color: #64748b;
  font-size: .76rem;
  padding: 7px 8px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.sb-table td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.sb-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-table .win { color: #b45309; font-weight: 600; }
.sb-table .pos { color: #047857; font-weight: 600; }
.sb-table .neg { color: #c0392b; font-weight: 600; }
.sb-code {
  display: inline-block;
  margin-left: 6px;
  font-size: .7rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}
.sb-empty {
  text-align: center;
  color: #94a3b8;
  font-size: .84rem;
  padding: 18px;
}

/* 结算心跳提示条 */
.sb-settle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: .76rem;
  color: #64748b;
}
.sb-settle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex: 0 0 8px;
}
.sb-settle-dot.live {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
  animation: sbPulse 1.6s ease-in-out infinite;
}
@keyframes sbPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.sb-settle-line .mini-btn {
  margin-left: auto;
  padding: 3px 10px;
  font-size: .74rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.sb-settle-line .mini-btn:hover { background: #f1f5f9; }
.sb-settle-line .mini-btn:disabled { opacity: .55; cursor: default; }

/* 分站卡片里的赔付行 */
.st-settle {
  display: flex;
  gap: 14px;
  margin: 6px 0 2px;
  font-size: .76rem;
  color: #64748b;
  flex-wrap: wrap;
}
.st-settle b { font-variant-numeric: tabular-nums; }
.st-settle b.win { color: #b45309; }
.st-settle b.pos { color: #047857; }
.st-settle b.neg { color: #c0392b; }

@media (max-width: 820px) {
  .settle-board { padding: 10px 12px; }
  .settle-board-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sb-v { font-size: .96rem; }
  .settle-board-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sb-table { min-width: 520px; }
}

/* ===== 试机号同步按钮 ===== */
.btn-trial-sync {
  padding: 5px 12px;
  border: 1px solid #3d9cf0;
  background: rgba(61, 156, 240, .12);
  color: #1a6fc4;
  border-radius: 8px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.btn-trial-sync:hover:not(:disabled) { background: rgba(61, 156, 240, .22); }
.btn-trial-sync:disabled { opacity: .6; cursor: default; }

.trial-sync-num {
  font-size: .78rem;
  color: #64748b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.trial-sync-num.has-num {
  color: #b45309;
  font-weight: 600;
}

@media (max-width: 820px) {
  .btn-trial-sync { padding: 4px 9px; font-size: .72rem; }
  .trial-sync-num { font-size: .7rem; }
  .trial-sync-num.has-num { font-size: .68rem; }
}

/* ===== 顶栏试机号标记 ===== */
.hd-issue.hd-trial {
  color: #ffd666 !important;
  font-weight: 600;
}
.hd-issue.hd-trial::before {
  content: "试 ";
  display: inline-block;
  padding: 0 4px;
  margin-right: 3px;
  border-radius: 3px;
  background: rgba(255, 214, 102, .22);
  color: #ffd666;
  font-size: .68rem;
  vertical-align: middle;
}

/* ===== 退水 / 结果 列 ===== */
.rebate-cell { color: #8a6d3b; font-size: .8rem; }
td.money.pos { color: #047857; font-weight: 600; }
td.money.neg { color: #c0392b; font-weight: 600; }

/* ===== 投注记录：订单号列 ===== */
td.ordercell {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .78rem;
  color: #1a6fc4;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: all;
}
td.ordercell:hover {
  color: #3d9cf0;
  text-decoration: underline;
}
th.ordercell-h {
  white-space: nowrap;
}
@media (max-width: 820px) {
  td.ordercell { font-size: .72rem; }
}

/* ===== 报表查询 / 退水设置 ===== */
.report-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.report-head h3 { margin: 0; font-size: 1.05rem; color: #1a3a6b; }
.report-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
}
.report-tools label {
  display: inline-block;
  font-size: .78rem; color: #64748b;
  margin-bottom: 0; white-space: nowrap;
}
.report-tools select {
  padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: .84rem; background: #fff;
  width: auto; min-width: 130px; max-width: 160px;
  display: inline-block;
}
.report-tools button { white-space: nowrap; }

.rebate-box {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
}
.rebate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rebate-row label { font-size: .84rem; color: #92400e; font-weight: 600; }
.rebate-row input {
  width: 110px; padding: 7px 10px; border: 1px solid #fcd34d;
  border-radius: 8px; font-size: .88rem; background: #fff;
}
.rebate-tip { font-size: .74rem; color: #a16207; }
.rebate-list-head {
  margin: 12px 0 8px; font-size: .76rem; color: #92400e; font-weight: 600;
}
.rebate-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px dashed #fde68a; flex-wrap: wrap;
}
.rebate-name { min-width: 150px; font-size: .84rem; color: #78350f; }
.rebate-name i { font-style: normal; color: #a16207; font-size: .7rem; margin-left: 6px; }
.rebate-st-inp {
  width: 90px; padding: 5px 8px; border: 1px solid #fcd34d;
  border-radius: 6px; font-size: .82rem; background: #fff;
}
.rebate-save { padding: 5px 12px !important; font-size: .78rem !important; }
.rebate-clear {
  padding: 5px 10px; font-size: .74rem; border: 1px solid #d97706;
  background: transparent; color: #b45309; border-radius: 6px; cursor: pointer;
}

.report-summary {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-bottom: 14px;
}
.rp-card {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 10px 12px;
}
.rp-k { font-size: .72rem; color: #64748b; margin-bottom: 4px; }
.rp-v { font-size: 1.02rem; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; }
.rp-v.rp-pos { color: #047857; }
.rp-v.rp-neg { color: #c0392b; }

.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.report-table th {
  text-align: left; font-weight: 600; color: #64748b; font-size: .78rem;
  padding: 9px 10px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; background: #f8fafc;
}
.report-table td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table .pos { color: #047857; font-weight: 600; }
.report-table .neg { color: #c0392b; font-weight: 600; }
.report-foot td {
  background: #f1f5f9; font-weight: 700; border-top: 2px solid #cbd5e1;
}

@media (max-width: 820px) {
  .report-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rp-v { font-size: .92rem; }
  .rebate-row { gap: 6px; }
  .rebate-row input { width: 90px; }
  .rebate-name { min-width: 110px; }
  .rebate-st-inp { width: 76px; }
  .report-table { min-width: 560px; }
}

/* 分站退水行布局修正 */
.rebate-item {
  display: grid !important;
  grid-template-columns: 160px 92px auto auto;
  align-items: center;
  gap: 8px;
}
.rebate-item .rebate-name { min-width: 0; }
.rebate-item .rebate-save,
.rebate-item .rebate-clear {
  justify-self: start;
  height: 30px;
  line-height: 1;
}
@media (max-width: 820px) {
  .rebate-item { grid-template-columns: 1fr 80px auto; gap: 6px; }
  .rebate-item .rebate-clear { grid-column: 1 / -1; }
}

/* ===== 分站卡片退水行 ===== */
.st-rebate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.st-rebate-lab {
  font-size: .74rem;
  color: #92400e;
  font-weight: 600;
}
.st-rebate-inp {
  width: 66px;
  padding: 4px 6px;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: .78rem;
  background: #fff;
}
.st-rebate-save {
  padding: 4px 10px !important;
  font-size: .74rem !important;
  min-height: 0 !important;
  height: 26px;
  line-height: 1;
}
.st-rebate-clear {
  padding: 3px 8px;
  font-size: .7rem;
  border: 1px solid #d97706;
  background: transparent;
  color: #b45309;
  border-radius: 6px;
  cursor: pointer;
  height: 26px;
}
.st-rebate-eff {
  font-size: .68rem;
  color: #a16207;
  margin-left: auto;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .st-rebate { gap: 4px; padding: 5px 6px; }
  .st-rebate-inp { width: 56px; }
  .st-rebate-eff { margin-left: 0; width: 100%; font-size: .66rem; }
}

/* ===== 报表分节 / 分站汇总 ===== */
.report-sect { margin-bottom: 22px; }
.report-sect-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.report-sect-head h4 {
  margin: 0; font-size: .95rem; color: #1a3a6b;
  padding-left: 8px; border-left: 3px solid #2563eb;
}
.report-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-range label { font-size: .76rem; color: #64748b; }
.report-range input[type="date"] {
  padding: 5px 8px; border: 1px solid #cbd5e1;
  border-radius: 7px; font-size: .8rem; background: #fff;
}
.report-range button { padding: 5px 14px !important; font-size: .78rem !important; }
.rp-custom {
  font-style: normal; font-size: .64rem; color: #b45309;
  background: #fef3c7; border-radius: 4px; padding: 1px 4px; margin-left: 4px;
}
#rpStBody tr:hover, #reportBody tr:hover { background: #f8fafc; }
.report-table tfoot td { background: #f1f5f9; font-weight: 700; border-top: 2px solid #cbd5e1; }

@media (max-width: 820px) {
  .report-sect-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .report-range { width: 100%; }
  .report-range input[type="date"] { flex: 1; min-width: 0; font-size: .74rem; }
  .report-table { min-width: 720px; }
}

/* ===== 报表：试机号/正式号 大切换条（独立一行） ===== */
.rp-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rp-sw {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.rp-sw:hover { background: #eef2f7; border-color: #94a3b8; }
.rp-sw.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .3);
}
.rp-sw-hint {
  flex: 0 0 auto;
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
}
.rp-sw-hint.all { background: #eef2ff; color: #3730a3; }
.rp-sw-hint.trial { background: #fef3c7; color: #92400e; }
.rp-sw-hint.official { background: #dbeafe; color: #1e40af; }

/* 分站汇总：全部模式下的一站两行 */
.rp-tag {
  display: inline-block;
  font-style: normal;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}
.rp-tag.trial { background: #fef3c7; color: #92400e; }
.rp-tag.official { background: #dbeafe; color: #1e40af; }
tr.rp-sub-row td { background: #fcfdff; font-size: .92em; }
tr.rp-sub-row td:first-child { padding-left: 16px; }
.rp-stn { color: #334155; font-weight: 600; margin-right: 6px; }
tr.rp-main-row td { border-top: 1px solid #e2e8f0; }
tr.rp-total-row td { border-top: 2px solid #94a3b8; font-weight: 700; }

@media (max-width: 640px) {
  .rp-switch { padding: 8px 10px; gap: 6px; }
  .rp-sw { flex: 1 1 auto; min-width: 0; padding: 8px 10px; font-size: .8rem; }
  .rp-sw-hint { width: 100%; text-align: center; }
}

/* 旧版紧凑切换（保留兼容，不再使用） */
.rp-mode-tabs {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.rp-mode-btn {
  padding: 6px 16px;
  font-size: .8rem;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-weight: 500;
  transition: all .15s;
}
.rp-mode-btn + .rp-mode-btn { border-left: 1px solid #e2e8f0; }
.rp-mode-btn.active {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}
.rp-mode-btn:not(.active):hover { background: #f1f5f9; }
.rp-mode-hint {
  font-size: .74rem;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.rp-mode-hint.trial { background: #fef3c7; color: #92400e; }
.rp-mode-hint.official { background: #dbeafe; color: #1e40af; }

@media (max-width: 820px) {
  .rp-mode-tabs { width: 100%; }
  .rp-mode-btn { flex: 1; padding: 7px 8px; font-size: .76rem; }
  .rp-mode-hint { width: 100%; text-align: center; }
}

/* 报表模式按钮：紧凑横向 */
.rp-mode-tabs {
  display: inline-flex !important;
  flex-direction: row !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-mode-btn {
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  min-width: 68px;
  text-align: center;
  padding: 6px 14px !important;
}
.report-tools { flex-wrap: nowrap; }
.rp-mode-hint { flex-shrink: 0; }

.rp-sub { font-style: normal; font-size: .66rem; color: #94a3b8; margin-left: 4px; font-weight: 400; }

.rebate-row input.readonly {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
  cursor: default;
  font-weight: 600;
}

/* 试机号走势提示 */
.trend-trial-note {
  font-size: .74rem;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 10px;
  display: inline-block;
}
