/* 颜色、页面底 */
:root {
  --bg: #101114;
  --panel: #181b20;
  --panel-2: #12151a;
  --line: #2c313a;
  --text: #f4efe6;
  --muted: #c9c2b6;
  --gold: #e0b15a;
  --gold-dim: rgba(224, 177, 90, 0.16);
  --up: #e15d4a;
  --down: #3eae86;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; }
html { height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.boot { height: 100%; min-height: 0; overflow: auto; overscroll-behavior: none; display: grid; place-items: center; padding: 32px; }
.boot-box { text-align: center; max-width: 420px; }
.boot-box .lead { margin-bottom: 18px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

.gate {
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: none;
  display: grid;
  place-items: center;
  padding: 32px;
}
.gate form { width: min(480px, 100%); }
.eyebrow { margin: 0 0 8px; color: var(--gold); letter-spacing: 0.18em; font-size: 14px; }
.gate h1 { margin: 0; font-size: 56px; font-weight: 620; letter-spacing: -0.04em; }
.lead { color: var(--muted); line-height: 1.7; margin: 12px 0 28px; }
.money-field {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 8px;
}
.money-field input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 40px;
  outline: none;
}
.money-field span { color: var(--muted); }
/* 按钮、输入、芯片。新界面用这些类，旧选择器指向同一套。 */
button:disabled,
.btn:disabled,
.primary:disabled,
.buy-btn:disabled,
.retry-btn:disabled,
.manage-toggle:disabled { opacity: 0.45; }

.btn,
.sheet button,
.ops-bar button,
.ops-bar #ops-done,
.monitor-actions button,
.monitor-actions .monitor-open,
.monitor-col-row button,
.monitor-foot button,
.retry-btn,
.row-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-weight: 650;
  line-height: 1;
}

.btn-primary,
.primary,
.buy-btn,
.solid,
.gate button,
.sheet button.primary,
.sheet button.solid,
.sheet .btn-primary,
.monitor-page .solid,
.account #login-open,
.ops-bar .primary {
  border: 0;
  background: var(--gold);
  color: #1a1408;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 680;
}

.btn-ghost,
.account button,
.desk-icon {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.btn-danger,
.ops-danger,
.ops-bar .ops-danger {
  border: 1px solid rgba(225, 93, 74, 0.55);
  background: transparent;
  color: var(--up);
  border-radius: 999px;
}

.btn-icon,
.zoom button,
.quote-tabs .zoom button,
.col-zoom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.chip,
.monitor-picks button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  padding: 4px 10px;
  line-height: 1.4;
}

.field,
input,
select,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}
.field:focus,
input:focus,
select:focus,
textarea:focus { border-color: var(--gold); }
/* 顶栏、自选、弹层 */
.gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.gate button { margin-top: 0; padding: 12px 22px; }
.gate .file-pick { min-height: 44px; padding: 0 18px; }
#gate-import-msg { min-height: 1.2em; margin: 10px 0 0; }
@media (max-width: 820px) {
  .gate-actions { display: grid; }
  .gate-actions button, .gate-actions .file-pick { width: 100%; justify-content: center; }
}
.error { color: var(--up); min-height: 1.2em; margin: 0; }

.desk {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
header {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  padding: calc(6px + env(safe-area-inset-top)) 18px 8px;
  min-height: 52px;
  position: relative;
  z-index: 4;
}
.brand { font-size: 20px; font-weight: 680; letter-spacing: 0; flex: 0 0 auto; }
.pip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 8px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.pip[hidden] { display: none; }
.pip-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}
.pip-main b { font-size: 16px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pip-main small { color: var(--muted); font-size: 13px; }
.pip-main em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.pip svg { flex: 1 1 120px; width: 120px; max-width: 140px; height: 32px; display: block; }
.pip-x {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.pip-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  border-bottom: 1px solid var(--line);
}
.pip-count { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.pip-top [data-pip-config] {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 4px 8px;
}
.pip-config {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.pip-config[hidden] { display: none; }
.pip-config label { display: flex; align-items: center; gap: 4px; }
.pip-list { display: flex; flex-direction: column; min-height: 0; }
.pip-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.pip-row .pip-main { flex-wrap: wrap; padding: 6px 0 6px 10px; }
.pip-row .pip-main i { font-style: normal; font-variant-numeric: tabular-nums; }
.pip-row .pip-main svg { flex: 1 1 88px; height: 28px; }
.quote-pin {
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 14px;
}
.quote-pin.on { color: var(--gold); border-color: var(--gold); }
.market-turn {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px 14px;
  min-width: 0;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.market-turn[hidden] { display: none; }
.market-turn span { display: inline-flex; align-items: baseline; gap: 6px; }
.market-turn small { color: var(--muted); font-size: 14px; }
.market-turn b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.market-turn .turn-main b { font-size: 16px; }
.head-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
#mode-entry,
#page-full {
  flex: 0 0 auto;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}
#mode-entry:hover,
#page-full:hover { color: var(--text); }
#page-full.on,
html[data-mode="idle"] #mode-entry,
html[data-mode="bright"] #mode-entry { color: var(--gold); background: var(--gold-dim); }
.mode-menu {
  position: fixed;
  z-index: 45;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}
.mode-menu button {
  display: grid;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
}
.mode-menu button.on { background: var(--gold-dim); }
.mode-menu small { color: var(--muted); font-size: 14px; font-weight: 400; }
header { min-width: 0; }
.index-bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}
.index-row {
  display: flex;
  align-items: center;
  gap: 2px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  flex: 1 1 auto;
}
.index-row::-webkit-scrollbar { display: none; }
.index-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.index-chip:hover,
.index-chip.on { background: var(--gold-dim); }
.index-chip small { color: var(--muted); font-size: 14px; }
.index-chip b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
#index-edit {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
}
#index-edit.on,
#index-edit:hover { color: var(--gold); }
.index-editor {
  position: absolute;
  z-index: 6;
  top: calc(100% - 4px);
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.index-pick {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 14px;
}
.index-pick.on { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.index-empty { color: var(--muted); font-size: 14px; padding: 4px 0; }
.account { min-width: 0; }
.account span { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capital {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 8px 14px;
  text-align: left;
}
.capital small, .meters div small { display: block; color: var(--muted); font-size: 14px; }
.capital b, .meters b { font-size: 18px; font-variant-numeric: tabular-nums; }
.capital input { width: 140px; border: 0; background: transparent; font-size: 20px; outline: none; }
.meters { display: flex; flex-wrap: wrap; gap: 14px 18px; flex: 1; min-width: min(100%, 280px); }
.curve-wrap { height: 64px; width: min(320px, 100%); margin-left: auto; }
#curve { width: 100%; height: 64px; display: block; }

nav {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
nav button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px 11px;
  border-bottom: 2px solid transparent;
  font-weight: 550;
}
nav button.active { color: var(--text); border-bottom-color: var(--gold); font-weight: 680; }
.review {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.review-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.review-nav {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
}
.review-nav::-webkit-scrollbar { display: none; }
.review-nav.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
}
.review-nav button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
}
.review-nav button.active { color: var(--text); border-bottom-color: var(--gold); }
.capital.slim {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
}
.capital.slim small { display: inline; font-size: 14px; }
.capital.slim b { font-size: 14px; }
.capital.slim input { width: 7em; font-size: 16px; padding: 2px 0; }
.review-body { flex: 1; min-height: 0; overflow: auto; }
.review-curve { height: 72px; margin: 4px 0 12px; }
.review-curve svg, #curve { width: 100%; height: 72px; display: block; }
.account { display: flex; gap: 4px; align-items: center; }
.account button {
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1;
}
.account button:hover { color: var(--text); }
.account #login-open { padding: 6px 14px; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: none;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px;
}
.sheet > form, .sheet > div {
  width: min(440px, 100%);
  background: var(--panel);
  border-radius: 18px;
  padding: 22px;
}
.col-sheet { z-index: 80; align-items: end; justify-items: center; padding: 0; }
.col-sheet > form {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  margin: 0;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.col-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col-sheet-head h2 { font-size: 20px; }
.col-sheet #col-name { font-size: 20px; min-height: 44px; }
.col-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0; }
.col-sheet .col-kinds button {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 650;
}
.col-sheet .col-kinds button.on {
  color: var(--text);
  border-color: var(--gold);
  background: var(--gold-dim);
}
.col-rule { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.col-rule label {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.col-rule input { font-size: 20px; min-width: 0; }
#col-submit, #stock-make {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 680;
}
#stock-target { width: 100%; min-height: 44px; font-size: 16px; }
#stock-q { font-size: 20px; min-height: 44px; }
#stock-error:empty { display: none; }
.stock-hits { display: grid; gap: 6px; max-height: 38vh; overflow: auto; margin-top: 4px; }
.sheet .stock-hits button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
}
.stock-hits button small { color: var(--muted); font-size: 14px; }
.stock-hits .muted, .stock-hits .error { padding: 6px 2px; }
#col-error:empty { display: none; }
@media (min-width: 821px) {
  .col-sheet { align-items: center; padding: 24px; }
  .col-sheet > form { width: min(440px, 100%); border-radius: 18px; }
}
.sheet label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); }
.sheet input {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 0;
  font-size: 18px;
}
.readonly-banner {
  margin: 0 22px 8px;
  color: var(--gold);
}
body.readonly .buy-btn, body.readonly .primary, body.readonly #add-open, body.readonly #ops-btn, body.readonly .col-new, body.readonly #manage-new { display: none; }

main { flex: 1; min-height: 0; overflow: auto; }
main:has(.watch),
main:has(.flow-page),
main:has(.review) { overflow: hidden; }
.register {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 100%;
  min-height: 0;
}
.ticket {
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 32px;
  border-right: 1px solid var(--line);
  background: #14161b;
}
.ticket-head, .entry-top, .cash-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ticket-head { margin-bottom: 14px; }
.ticket-head .primary { margin: 0; }
.trade-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}
.trade-date input { flex: 1; min-width: 0; }
.cash-line { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.cash-line span { color: var(--muted); font-size: 14px; }
.cash-line b { font-size: 22px; font-variant-numeric: tabular-nums; }
.hold-list { margin: 8px 0 16px; }
.empty-hold, .empty-ticket { margin: 14px 0; }
.book { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.book-head {
  padding: 6px 14px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.book-head .sub { margin: 0; }
.book-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book-tools .sub { margin: 0; }
.desk-head { padding-bottom: 0; }
.desk-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 0;
}
.groups-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 100%;
  min-width: 0;
}
.groups-bar .groups { flex: 1; min-width: 0; }
.desk-tools {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0;
  margin-left: 4px;
}
.desk-icon {
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}
.desk-icon.on,
.desk-filter.on { color: var(--gold); background: var(--gold-dim); }
#list-find.desk-icon,
#desk-more.desk-icon,
.col-mode.desk-icon,
.desk-filter {
  font-size: 14px;
}
.col-host { min-width: 0; }
.col-periods {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.col-periods > button,
.col-more > button {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  font-size: 14px;
}
.col-periods > button.on,
.col-more > button.on { color: var(--text); border-bottom-color: var(--gold); }
.col-more { position: relative; flex: 1 1 0; }
.col-more-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 88px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.col-more-menu button {
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 10px;
}
.col-more-menu button.on { color: var(--gold); }
.col-zoom {
  display: flex;
  flex: none;
  gap: 4px;
  padding-right: 8px;
}
.col-card { padding: 8px 10px 2px; border-bottom: 1px solid var(--line); }
.col-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 0 2px;
  text-align: left;
}
.col-head b { font-size: 16px; font-weight: 680; }
.col-head small { color: var(--muted); font-size: 13px; }
.col-px { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 680; }
.col-pct, .col-chg { font-variant-numeric: tabular-nums; font-size: 14px; }
.col-chart { display: block; width: 100%; height: 156px; touch-action: pan-y; }
.col-empty { padding: 18px 12px; }
.desk-filter {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}
.desk-more { position: relative; }
.desk-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 132px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.desk-menu:not([hidden]) { display: flex; flex-direction: column; }
.desk-menu button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 15px;
}
.desk-menu button.on { color: var(--gold); }
.desk-menu button:hover { background: var(--panel-2); }
.desk-menu-label { color: var(--muted); font-size: 12px; padding: 8px 12px 2px; }
.desk-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--text);
  font-size: 15px;
}
.desk-check input { margin: 0; }
.desk-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 100%;
}
#ops-count .link { margin-left: 8px; }
.manage-new { width: 100%; min-height: 44px; margin: 0 0 12px; }
.stock-dock {
  flex: none;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold);
  font-weight: 650;
}
.desk-hint {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desk-head .filter-bar { padding: 0; }
.desk-head .filter-q { width: 148px; }
.list-search { display: flex; align-items: center; flex-wrap: nowrap; padding: 0; }
.list-search .filter-q { display: none; width: 168px; height: 32px; min-height: 32px; }
.list-search.open .filter-q { display: block; }
.list-search.open #list-find { display: none; }
.list-search #list-find { display: inline-flex; align-items: center; }
.board-x { width: max-content; min-width: 100%; }
.desk-head .manage { margin: 6px 0 8px; }
.desk-head .cols { padding: 4px 0 8px; }
.desk-head .add-line { margin: 4px 0 8px; }
.desk-head .hints:empty,
.desk-head .error:empty { display: none; min-height: 0; margin: 0; padding: 0; }
#list-q { width: 180px; background: var(--panel); }
h2 { margin: 0; font-size: 24px; font-weight: 680; letter-spacing: 0; line-height: 1.25; }
h3 { margin: 22px 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.sub { margin: 6px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.groups { display: flex; flex-wrap: nowrap; gap: 2px; align-items: center; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.groups::-webkit-scrollbar { display: none; }
.group-chip { display: inline-flex; align-items: center; }
.tab-x { padding: 0 4px 2px; font-size: 14px; line-height: 1; }
.groups button, .manage button, .sell-btn, .jump, .hints button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.groups button {
  flex: 0 0 auto;
  padding: 8px 10px 9px;
  border-bottom: 2px solid transparent;
  font-size: 16px;
}
.groups button.active { color: var(--text); border-bottom-color: var(--g, var(--gold)); font-weight: 680; }
.groups button .tab-avg { margin-left: 6px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.groups button .tab-avg:empty { display: none; }
.groups button .tab-avg.up { color: var(--up); }
.groups button .tab-avg.down { color: var(--down); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.who-line { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; max-width: max-content; }
.name-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; display: flex; flex-direction: column; overflow: hidden; }
.name-bar b { flex: 1 1 0; display: block; min-height: 3px; }
.ops-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #16181d;
  flex: 0 0 auto;
}
.ops-bar #ops-count { font-size: 14px; font-weight: 650; min-width: 4.5em; }
.ops-bar #ops-done { margin-left: auto; }
.ops-hint { flex: 1 1 180px; color: var(--muted); font-size: 14px; }
.ops-bar .ops-danger, .ops-bar .primary, .row-quote {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
}
.ops-bar select { flex: 1 1 140px; min-width: 0; max-width: 220px; }
.who-main { min-width: max-content; flex: none; }
.who-main b { font-size: 17px; font-weight: 650; line-height: 1.25; }
.who-main small { display: block; }
.row-quote {
  flex: none;
  font-size: 14px;
}
.row-quote:hover { color: var(--text); border-color: var(--gold); }
.mem-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.mem-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.dyn-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 14px;
  line-height: 1.4;
  vertical-align: middle;
}
.board th.sortable { cursor: grab; user-select: none; touch-action: pan-x pan-y; }
.board th.sortable:hover { color: var(--text); }
.board th.dragging { opacity: 0.4; cursor: grabbing; }
.board th.drop-before { box-shadow: inset 2px 0 0 var(--gold); }
.board th.drop-after { box-shadow: inset -2px 0 0 var(--gold); }
.quote-top h2 em b { margin-left: 4px; font-style: normal; font-weight: 650; }
.quote-top h2 .industry-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.quote-top h2 .industry-link:hover { color: var(--gold); }
.manage form select, .manage form input[type="number"] {
  width: auto;
  min-width: 0;
  background: var(--panel-2);
}
.manage .rule-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}
.manage .rule-edit input { width: 64px; padding: 4px 6px; }
.manage-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  background: transparent;
}
.manage-toggle.on {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: var(--gold-dim);
}
.universe-hint { flex: 1 1 100%; max-width: none; white-space: normal; }
.uni-chips {
  display: flex;
  flex: 1 1 100%;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.uni-chips::-webkit-scrollbar { display: none; }
.uni-chips button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
}
.uni-board-q { width: 100%; min-height: 44px; margin: 0 0 8px; }
.uni-pick { margin: 8px 0 2px; }
.uni-pick h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.uni-options { display: flex; flex-wrap: wrap; gap: 6px; }
.uni-options button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 14px;
}
.uni-options button.on {
  color: var(--text);
  border-color: var(--gold);
  background: var(--gold-dim);
}
.uni-dims { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.uni-row {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.uni-row input { min-height: 44px; font-size: 16px; width: 100%; min-width: 0; }
#uni-apply {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 680;
}
.universe-more { padding: 12px 14px 20px; }
.groups .manage-toggle { margin-left: 6px; }

.manage {
  margin: 8px 0 12px;
  padding: 12px;
  background: var(--panel);
  border-radius: 12px;
}
.manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.manage-head strong { font-size: 14px; letter-spacing: 0.06em; }
.manage form, .add-line { display: flex; gap: 8px; align-items: center; }
.manage-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.manage-row:first-of-type { border-top: 0; }

.hold {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.hold .top { display: flex; justify-content: space-between; gap: 8px; }
.hold .meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.entry.picking { border-color: var(--gold); }
.side-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.side-switch button { border: 0; background: transparent; color: var(--muted); padding: 8px 0; white-space: nowrap; }
.side-switch button.on { background: var(--gold); color: #1a1408; }
.entry .side-switch { flex: 1 1 150px; min-width: 140px; max-width: 220px; }
.entry .side-switch button { min-height: 38px; }
.pick-name {
  text-align: left;
  border: 0;
  background: var(--panel-2);
  border-radius: 12px;
  padding: 14px 12px;
}
.pick-name b { display: block; font-size: 22px; font-weight: 650; }
.pick-name small { color: var(--muted); }
.pick-name.empty b { color: var(--gold); font-size: 16px; font-weight: 560; }
.pair-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair-fields label, .entry .reason { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 14px; }
.pair-fields input, .entry .reason { width: 100%; font-size: 22px; padding: 10px 12px; }
.line-price { margin: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.entry .buy-btn { width: 100%; padding: 12px; }
.who small, .slip-table small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }

select { min-height: 38px; }
.add-line { margin: 8px 0; }
.add-line input { flex: 1; }
.hints { display: grid; gap: 6px; margin-top: 6px; }
.hints button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
  color: var(--text);
}

.buy-scroll, .table-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll { contain: layout paint; }
.buy-scroll { padding: 0 0 24px; overflow-x: auto; overflow-y: auto; scrollbar-gutter: stable; }
.buy-scroll > p.muted { padding: 18px 14px; margin: 0; }
.buy-scroll::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.buy-scroll::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: #4a5160;
  border-radius: 999px;
}
.buy-scroll::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track {
  background: #1a1d22;
}
.board { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.buy-scroll .board,
.board-member-scroll .board,
.flow-members-scroll .board { width: max-content; min-width: 0; }
.board th, .board td { width: 1px; padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buy-scroll .board th,
.buy-scroll .board td,
.board-member-scroll .board th,
.board-member-scroll .board td,
.flow-members-scroll .board th,
.flow-members-scroll .board td { overflow: hidden; }
.board th.board-fill, .board td.board-fill { width: auto; padding: 0; }
.board th { color: var(--muted); font-weight: 500; font-size: 14px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.board td.sticky, .board th.sticky { text-align: left; position: sticky; left: 0; width: 1px; background: var(--bg); z-index: 2; }
.board th.sticky { z-index: 3; }
.board tbody tr { cursor: pointer; }
.board tbody tr:hover td { background: #1c2026; }
.board tbody tr.picked td { background: #2a2418; }
.board tbody tr.on td { background: var(--gold-dim); }
.board tbody tr.on td.sticky { box-shadow: inset 3px 0 0 var(--gold); }
.board td.pick, .board th.pick {
  position: sticky;
  left: 0;
  width: 48px;
  min-width: 48px;
  padding: 0;
  text-align: center;
  background: var(--bg);
  z-index: 2;
}
.board th.pick { z-index: 4; }
.board .pick input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--gold);
  vertical-align: middle;
}
.board th.pick .ops-enter {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.2;
  padding: 0;
  min-height: 0;
  width: 100%;
}
.board.picking td.sticky, .board.picking th.sticky { left: 48px; }
.board tbody tr.picked td.pick { box-shadow: inset 3px 0 0 var(--gold); }
.cols { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 0 12px; }
.cols label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatch.on { border-color: var(--text); }
.swatch:disabled { opacity: 0.28; cursor: not-allowed; }
.watch, .trade { display: flex; height: 100%; min-height: 0; min-width: 0; }
.watch { position: relative; overflow: hidden; }
.watch .book, .trade-main { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.trade-main { overflow: auto; padding: 18px 22px 32px; }
/* 个股报价 */
.side-quote {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 92vw);
  font-size: 13px;
  z-index: 5;
  border-left: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
}
.side-quote #quote-slot {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.side-quote .quote {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 8px;
  overflow: hidden;
}
.side-quote .quote-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-quote .quote-top {
  display: flex;
  align-items: center;
  gap: 0;
}
.side-quote .quote-switch {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.side-quote .quote-title { position: relative; min-width: 0; flex: 1 1 auto; text-align: center; }
.side-quote .quote-switch .quote-title { flex: 0 1 auto; max-width: calc(100% - 72px); }
.side-quote .quote-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-quote .quote-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-quote .quote-title small { margin-left: 0; color: var(--muted); font-weight: 500; }
.side-quote .quote-title #q-industry { margin-left: 6px; color: var(--text); }
.side-quote .quote-title #q-industry b { margin-left: 4px; font-style: normal; font-weight: 650; }
.side-quote .quote-title #q-time { margin-left: 6px; }
.side-quote .quote-step,
.side-quote .quote-find {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  padding: 0;
}
.side-quote .quote-step {
  width: 32px;
  height: 40px;
  font-size: 26px;
}
.side-quote .quote-find {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.side-quote .quote-find svg { display: block; }
.side-quote .quote-step:disabled { opacity: 0.25; }
.side-quote .quote-search {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  width: min(260px, 70vw);
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: left;
}
.side-quote .quote-search input { width: 100%; }
.side-quote #quote-hits { display: grid; max-height: 220px; overflow: auto; margin-top: 6px; }
.side-quote #quote-hits button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.side-quote .quote-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.side-quote .quote-price {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.side-quote .quote-price b { font-size: 22px; line-height: 1; margin: 0; }
.side-quote .quote-price em { font-style: normal; display: flex; gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.side-quote .quote-price span { margin: 0; font-size: 13px; }
.side-quote .quote-head .sub { margin: 0; font-size: 13px; }
.side-quote .quote-after {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}
.side-quote .quote-after span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-quote .quote-after i { flex: none; font-style: normal; color: var(--muted); }
.side-quote .quote-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px 8px;
}
.side-quote .quote-hero-stats p {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.side-quote .quote-hero-stats small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.side-quote .quote-hero-stats b { font-size: 12px; font-weight: 650; white-space: nowrap; }
.side-quote .quote-chart {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.side-quote .quote-tabs {
  margin: 0;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  overflow: visible;
  gap: 0;
}
.side-quote .quote-tabs > button[data-period],
.side-quote .more-wrap { flex: 1 1 0; min-width: 36px; }
.side-quote .quote-tabs > button[data-period],
.side-quote .more-wrap > button { width: 100%; padding: 6px 0; font-size: 13px; text-align: center; }
.side-quote .more-wrap { position: relative; }
.side-quote .more-menu {
  position: absolute;
  z-index: 7;
  top: calc(100% + 4px);
  right: 0;
  width: min(280px, 72vw);
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.side-quote .more-menu.hidden { display: none; }
.side-quote .more-periods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.side-quote .more-periods button { border-radius: 8px; background: var(--panel-2); }
.side-quote .more-menu .overlay-bar {
  flex-wrap: wrap;
  overflow: visible;
  margin: 8px 0 0;
  gap: 6px;
}
.side-quote .more-menu .overlay-presets { flex-wrap: wrap; }
.side-quote .more-menu .overlay-search { min-width: 0; max-width: none; flex: 1 1 100%; }
.side-quote .chip-toggle,
.side-quote .quote-tabs .minute-day {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  padding: 4px 8px;
}
.side-quote .chip-toggle { color: var(--muted); }
.side-quote .chip-toggle.on { color: var(--text); }
.side-quote .more-menu .chip-toggle {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  text-align: center;
  border-radius: 8px;
  background: var(--panel-2);
}
.side-quote .more-menu .chip-toggle.hidden { display: none; }
.side-quote .q-legend {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.side-quote .q-legend b { font-weight: 600; }
.side-quote .legend-minute {
  margin-left: auto;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
}
.side-quote #q-bar {
  margin: 0;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px 8px;
}
.side-quote .quote-chart { position: relative; }
.side-quote .day-minute {
  position: absolute;
  z-index: 6;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100% - 16px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.side-quote .day-minute[hidden] { display: none; }
.side-quote .day-minute-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 28px;
  padding: 4px 2px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.side-quote .day-minute-head b { font-weight: 650; flex: none; }
.side-quote .day-minute-head .avg { color: var(--gold); flex: none; }
.side-quote .day-minute-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-quote .day-minute-head button {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.side-quote .day-minute-wait {
  flex: 0 0 132px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.side-quote .day-minute svg { display: block; width: 100%; height: 132px; }
.side-quote .day-minute-nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.side-quote .day-minute-nav button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
}
.side-quote .day-minute-nav button + button { border-left: 1px solid var(--line); }
.side-quote .day-minute-nav button:disabled { color: var(--muted); opacity: 0.4; }
.side-quote .quote-stage {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
}
.side-quote .quote-stage .k-wrap {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
}
.side-quote #q-chart {
  flex: 1 1 auto;
  width: 100%;
  height: 0;
  min-height: 0;
  display: block;
}
.side-quote .book-col {
  flex: 0 0 auto;
  width: max-content;
  max-width: 156px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  height: auto;
  max-height: 100%;
  min-height: 0;
  padding: 0 0 0 4px;
  border-left: 1px solid var(--line);
  overflow: hidden;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.side-quote .book-col[hidden] { display: none; }
.side-quote .book-levels,
.side-quote .book-stats,
.side-quote .book-ticks {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.side-quote .book-levels {
  flex: 0 1 auto;
  max-height: 52%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.side-quote .book-stats,
.side-quote .book-tick-head { flex: 0 0 auto; }
.side-quote .book-rest {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.side-quote .book-ticks {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  justify-content: flex-start;
}
.side-quote .book-col p {
  display: grid;
  grid-template-columns: 34px auto auto;
  gap: 0 4px;
  justify-content: start;
  align-items: baseline;
  margin: 0;
  white-space: nowrap;
}
.side-quote .book-col p.book-stat { grid-template-columns: 34px auto; }
.side-quote .book-col small { color: var(--muted); font-size: 12px; }
.side-quote .book-col b { font-weight: 650; }
.side-quote .book-col b.up { color: var(--up); }
.side-quote .book-col b.down { color: var(--down); }
.side-quote .book-col span { color: var(--muted); }
.side-quote .book-col .hot { background: rgba(225, 93, 74, 0.12); border-radius: 3px; }
.side-quote .book-col .bid.hot { background: rgba(62, 174, 134, 0.12); }
.side-quote .book-col .book-split {
  height: 1px;
  margin: 2px 0;
  background: var(--line);
}
.side-quote .book-big,
.side-quote .book-tick,
.side-quote .book-tick-head {
  display: grid;
  grid-template-columns: 34px auto auto;
  gap: 0 4px;
  justify-content: start;
  align-items: baseline;
  margin: 0;
}
.side-quote .book-tick-head { grid-template-columns: 1fr; color: var(--muted); padding-top: 4px; }
.side-quote .book-col .book-ticks { overflow-x: hidden; overflow-y: auto; }
.side-quote .quote-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.side-quote .quote:not(.quote-board) .quote-scroll .quote-main {
  height: 100%;
  min-height: 100%;
  flex: none;
}
.side-quote .quote-main {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.dossier { padding: 0 0 20px; }
.side-quote .quote:not(.quote-board) .quote-scroll .dossier {
  min-height: 100%;
  box-sizing: border-box;
}
.dossier-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.dossier-tab-row {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.dossier-tab-row::-webkit-scrollbar { display: none; }
.dossier-tabs button {
  flex: 1 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.dossier-tabs button.on { color: var(--text); border-bottom-color: var(--gold); }
.dossier-pane { display: none; padding: 8px 2px 4px; }
.dossier-pane.on { display: block; }
.dossier h3 { margin: 0 0 4px; font-size: 13px; font-weight: 680; }
.dossier h3 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.dossier-wait { margin: 8px 0; }
.dossier-chart { display: block; width: 100%; height: 168px; }
.dossier-chart.short { height: 132px; }
.dossier-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.dossier-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dossier-legend i { width: 8px; height: 8px; border-radius: 2px; }
.dossier-legend b { font-weight: 650; }
.dossier-name { margin: 0 0 6px; font-weight: 650; }
.dossier-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.dossier-facts p { display: flex; justify-content: space-between; gap: 8px; margin: 0; }
.dossier-facts small { color: var(--muted); }
.dossier-facts b { font-weight: 600; text-align: right; }
.dossier-text { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.dossier-news, .dossier-post { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.dossier-news b { font-weight: 650; }
.dossier-news small, .dossier-post-top small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.dossier-post-top { margin: 0; }
.dossier-post-top b { font-weight: 650; }
.dossier-post .dossier-text { margin-top: 4px; }
.dossier-text b { font-weight: 650; }
.dossier-table p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 64px;
  gap: 2px 8px;
  align-items: center;
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.dossier-table.segments p { grid-template-columns: minmax(0, 1fr) 76px 56px; }
.dossier-table span { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.dossier-table small { color: var(--muted); font-size: 11px; }
.dossier-table .head { color: var(--muted); font-size: 12px; }
.dossier-table .head span { align-items: flex-end; }
.lhb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.lhb-bar h2 { margin: 0; font-size: 20px; font-weight: 680; }
.lhb-daynav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lhb-daynav b { font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 650; }
.lhb-daynav button, #lhb-back {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 4px;
}
.lhb-daynav button:disabled { color: var(--muted); opacity: 0.4; }
.lhb-count { margin: 0; padding: 8px 14px 0; color: var(--muted); font-size: 14px; }
.lhb-empty { padding: 28px 14px; }
.lhb-card {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 12px 14px;
}
.lhb-card-top, .lhb-card-net { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.lhb-card-top b { font-size: 16px; font-weight: 680; }
.lhb-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 14px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.6;
  vertical-align: 1px;
}
.lhb-card-top .lhb-tag { margin-left: 0; }
.lhb-stock h2 .lhb-tag { vertical-align: 2px; }
.lhb-card-top small, .lhb-card p { color: var(--muted); font-size: 14px; }
.lhb-card-top em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.lhb-card-net { margin-top: 4px; }
.lhb-card-net span { color: var(--muted); font-size: 14px; }
.lhb-card-net b { font-size: 20px; font-weight: 720; font-variant-numeric: tabular-nums; }
.lhb-card p { margin: 2px 0 0; }
.lhb-card-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lhb-stock { padding: 8px 14px 28px; }
.lhb-stock h2 { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.lhb-stock h2 small { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.lhb-block { margin: 0 0 18px; }
.lhb-band {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gold-dim);
  color: var(--text);
  line-height: 1.5;
}
.lhb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lhb-stats div { min-width: 0; }
.lhb-stats small { display: block; color: var(--muted); font-size: 14px; }
.lhb-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.lhb-sum { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.lhb-side { margin: 14px 0 6px; font-size: 16px; font-weight: 700; }
.lhb-side.buy { color: var(--up); }
.lhb-side.sell { color: var(--down); }
.lhb-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.6em 4.6em 5em;
  gap: 6px;
  margin: 0;
  padding: 7px 0;
  align-items: start;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.lhb-line b { text-align: right; font-weight: 650; }
.lhb-head { color: var(--muted); border-bottom-color: var(--line); }
.lhb-head b { font-weight: 600; }
.lhb-name { line-height: 1.35; }
.side-quote .quote.quote-board {
  overflow-x: hidden;
  overflow-y: auto;
}
.side-quote .quote.quote-board .quote-main,
.side-quote .quote.quote-board .quote-chart,
.side-quote .quote.quote-board .board-members {
  flex: 0 0 auto;
}
.side-quote .quote.quote-board .quote-stage {
  flex: 0 0 auto;
  height: min(420px, 52dvh);
}
.board-members { min-width: 0; }
.board-members-title {
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 14px;
}
.board-member-scroll {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 12px;
}
.side-quote .info-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: auto;
  background: var(--panel);
  padding: 4px 2px 16px;
}
.side-quote .info-cover.hidden { display: none; }
.side-quote .info-cover-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 8px; }
.side-quote .info-cover-bar strong { font-size: 13px; }
.side-quote .info-cover-bar button { border: 0; background: transparent; color: var(--gold); font-size: 14px; }
.side-quote .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 18px; padding-bottom: 8px; }
.side-quote .info-grid p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.side-quote .info-grid small { color: var(--muted); }
.side-quote .info-grid b { font-weight: 600; }
.side-quote .k-tip { flex: 0 0 auto; padding: 2px 4px 0; min-height: 16px; font-size: 12px; }
.side-quote .k-tip:empty { display: none; min-height: 0; padding: 0; }
.side-quote .quote-extra {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.side-quote .quote-extra[open] {
  max-height: 160px;
  overflow: auto;
}
.side-quote .quote-extra > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 0 4px;
  user-select: none;
}
.side-quote .quote-extra > summary::-webkit-details-marker { display: none; }
.side-quote .quote-extra > summary::after { content: " ▾"; }
.side-quote .quote-extra[open] > summary::after { content: " ▴"; }
.side-quote .quote-extra .quote-grid { margin: 0 0 6px; }
.trade .ticket { width: min(380px, 36vw); min-width: 280px; }
.sell-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
}
.buy-btn:disabled, .sell-btn:disabled { opacity: 0.5; }

.page { padding: 18px 22px 48px; }
.global-page {
  height: 100%;
  min-height: 0;
  overflow: auto;
  box-sizing: border-box;
}
.global-page .toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.global-page .toolbar h2 { margin: 0; }
.global-board {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
}
.global-equity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.global-assets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.global-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px 8px;
  min-width: 0;
}
.global-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.global-section-head strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.global-section-head .global-when {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.global-section-head .global-when.live { color: var(--gold); }
.global-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.watch .book.global-book { overflow: auto; }
button.global-card {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}
.global-card {
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px 8px;
  min-width: 0;
}
.global-card:hover,
.global-card.on { background: var(--panel-2); }
.global-card small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-card b {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.global-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.global-card em.global-lots,
.global-card em.global-tick {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.global-card em.global-lots i {
  display: block;
  font-style: normal;
}
.global-card em.global-lots b {
  font-size: 14px;
  font-weight: 650;
}
.global-card em.global-tick:empty,
.global-card em.global-lots:empty { display: none; }
@media (max-width: 980px) {
  .global-board { grid-template-columns: 1fr; }
  .global-equity { grid-template-columns: 1fr; }
}
.slip-layout { display: grid; grid-template-columns: minmax(480px, 1.15fr) minmax(340px, 0.9fr); gap: 18px; align-items: start; }
.detail {
  position: sticky;
  top: 12px;
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 14px 18px;
}
.toolbar { display: flex; justify-content: flex-start; gap: 12px; align-items: center; margin-bottom: 12px; }
.toolbar input { width: 200px; background: var(--panel); margin-left: auto; }
.slip-table { width: 100%; border-collapse: collapse; }
.slip-table th, .slip-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.slip-table th:nth-child(-n+4), .slip-table td:nth-child(-n+4) { text-align: left; }
.slip-table th { color: var(--muted); font-weight: 500; font-size: 14px; }
.slip-table tr { cursor: pointer; }
.slip-table tr.active { background: var(--gold-dim); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.cards article, .snap article {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.cards small, .snap small { display: block; color: var(--muted); font-size: 14px; margin-bottom: 2px; }
.cards b, .snap b { font-variant-numeric: tabular-nums; }

.data-page { max-width: 1040px; }
.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}
.data-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.data-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.data-card h3 { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: 0.08em; }
.data-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.data-card code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
}
.data-card .primary { align-self: flex-start; }
.file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px dashed color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
}
.file-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-pick:focus-within { border-color: var(--gold); }
#import-name, #import-preview { font-size: 14px; }
#import-preview:empty, #import-name:empty, #import-error:empty { display: none; }
.data-stats { margin: 6px 0 16px; }
.data-footnote { margin-top: 4px; }
.snap { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.note {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  background: var(--panel-2);
  border: 0;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  line-height: 1.6;
}
.k-wrap { position: relative; background: var(--panel-2); border-radius: 12px; padding: 6px 6px 0; }
.quote h2 em { font-style: normal; margin-left: 8px; color: var(--gold); font-size: 14px; font-weight: 600; }
.q-float {
  position: absolute;
  z-index: 4;
  left: 8px;
  top: 8px;
  width: max-content;
  min-width: 176px;
  max-width: 240px;
  padding: 8px 10px 6px;
  background: rgba(18, 21, 26, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.q-float.hidden { display: none; }
.q-float .float-date { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.float-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.float-grid span { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.float-grid b { color: var(--text); font-size: 14px; font-weight: 600; }
.q-float .float-since { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 14px; }
.q-float .float-since small { color: var(--muted); }
.q-float .float-since b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.side-quote .day-minute-head .since { color: var(--text); flex: none; }
.float-minute {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 0 4px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.minute-day, .info-open {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 14px;
}
.minute-day { color: var(--gold); border-color: var(--gold); }
.info-open:hover, .minute-day:hover { color: var(--text); }
#kline, #q-chart { width: 100%; height: 360px; display: block; }
.detail #q-chart { height: 360px; }
.k-tip { min-height: 20px; padding: 0 8px 8px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
/* 资金、复盘页 */
.flow-page { display: flex; flex-direction: column; min-height: 0; height: 100%; padding: 12px 16px; overflow: hidden; }
.flow-nav {
  display: flex;
  flex: none;
  gap: 0;
  margin: 0 0 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.flow-nav::-webkit-scrollbar { display: none; }
.flow-nav button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 0 16px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
.flow-nav button { font-size: 16px; }
.flow-nav button.on { color: var(--text); border-bottom-color: var(--gold); font-weight: 680; }
.flow-solo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.flow-solo h2 { margin: 0; }
.flow-solo .sub { margin: 4px 0 8px; }
.flow-solo .sub i { font-style: normal; margin-right: 10px; }
.flow-solo svg { width: 100%; flex: 1 1 auto; min-height: 280px; display: block; }
.flow-solo #market-flow,
.flow-solo #holder-chart { height: auto; }
.flow-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.flow-boards button {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: inherit;
  text-align: left;
  padding: 16px;
}
.flow-boards small { display: block; color: var(--muted); font-size: 14px; }
.flow-boards b { display: block; margin-top: 6px; font-size: 32px; font-variant-numeric: tabular-nums; }
.flow-boards button:first-child b { color: var(--up); }
.flow-boards b.down { color: var(--down); }
.flow-extra {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 10px;
  flex: 0 0 auto;
}
.flow-card {
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 4px;
}
.flow-card h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: 0; color: var(--text); }
.flow-card .sub { margin: 2px 0 4px; font-size: 14px; }
.flow-card .sub i { font-style: normal; margin-right: 10px; }
.flow-card svg { width: 100%; height: 188px; display: block; }
#holder-chart { height: 312px; }
.flow-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.95fr); gap: 12px; min-height: 0; flex: 1; }
.flow-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.flow-members {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.flow-board.members { display: flex; flex-direction: column; overflow: hidden; }
.flow-board .flow-members {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.flow-board .flow-members-head { justify-content: flex-start; gap: 10px; }
.flow-members-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.flow-members-head b { font-size: 15px; font-weight: 680; }
.flow-members-head button { border: 0; background: transparent; color: var(--gold); min-height: 32px; padding: 0 4px; }
.flow-members-empty { margin: 0; padding: 14px 12px; color: var(--muted); }
.flow-members-scroll { flex: 1; min-height: 0; overflow: auto; }
.flow-page.hide-chart .flow-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.flow-page.hide-chart .flow-chart { display: none; }
.flow-page.hide-chart .flow-board { min-height: 0; }
.flow-chart { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.flow-chart svg { width: 100%; flex: 1 1 auto; min-height: 0; display: block; }
.flow-chart .k-tip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; padding: 2px 4px 0; }
.flow-legend {
  display: flex;
  flex: 0 0 auto;
  gap: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 2px 0;
  min-height: 28px;
}
.flow-legend[hidden] { display: none; }
.flow-legend::-webkit-scrollbar { display: none; }
.flow-legend span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.flow-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.flow-legend b { font-weight: 650; font-variant-numeric: tabular-nums; }
.flow-scrub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  max-width: 280px;
  min-width: 140px;
}
.flow-scrub.hidden { display: none; }
.flow-scrub input[type="range"] {
  flex: 1;
  width: 100%;
  height: 18px;
  accent-color: #e0b15a;
  cursor: pointer;
}
.flow-scrub span {
  min-width: 40px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.flow-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e0b15a;
  background: #2c2618;
  color: #f4efe6;
  border-radius: 999px;
  padding: 4px 12px 4px 10px;
  font-weight: 600;
}
.flow-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.flow-toggle:hover { color: var(--text); border-color: var(--gold); }
.flow-pin {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.flow-pin:hover, .flow-pin.on { color: var(--text); border-color: var(--gold); }
.flow-pin.on { color: #1a1408; background: var(--gold); }
.flow-solo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-solo-head .flow-pin { margin-left: auto; }
.flow-origin { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.flow-solo-head .flow-origin + .flow-pin { margin-left: 10px; }
.ico-play {
  width: 0;
  height: 0;
  border-left: 9px solid #e0b15a;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.ico-pause {
  width: 9px;
  height: 10px;
  background: linear-gradient(#e0b15a, #e0b15a) left / 3px 100% no-repeat, linear-gradient(#e0b15a, #e0b15a) right / 3px 100% no-repeat;
}
.flow-board {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  scrollbar-width: thin;
  scrollbar-color: #3a3834 transparent;
}
.flow-board::-webkit-scrollbar { width: 8px; height: 8px; }
.flow-board::-webkit-scrollbar-thumb { background: #3a3834; border-radius: 8px; }
.flow-board::-webkit-scrollbar-corner { background: transparent; }
.flow-board table:not(.board) { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.flow-board table:not(.board) th,
.flow-board table:not(.board) td { padding: 5px 8px; white-space: nowrap; text-align: right; border-bottom: 1px solid var(--line); background: #181b20; }
.flow-board table:not(.board) th { position: sticky; top: 0; z-index: 2; background: #1c1b19; color: var(--muted); font-weight: 500; }
.flow-board table:not(.board) th button { border: 0; background: transparent; color: inherit; font: inherit; padding: 0; cursor: pointer; white-space: nowrap; }
.flow-board table:not(.board) th button.on { color: var(--text); }
.flow-board table:not(.board) th.text,
.flow-board table:not(.board) td.name { text-align: left; }
.flow-board table:not(.board) th:first-child,
.flow-board table:not(.board) td.name { position: sticky; left: 0; }
.flow-board table:not(.board) td.name { z-index: 1; display: flex; align-items: center; gap: 6px; background: #181b20; }
.flow-board table:not(.board) th:first-child { z-index: 4; background: #1c1b19; }
.flow-board table:not(.board) td.name i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.flow-board tbody tr[data-flow-name] { cursor: pointer; }
.flow-board table:not(.board) tbody tr.on td,
.flow-board table:not(.board) tbody tr.on td.name { background: #243044; }
#flow-chart [data-flow-name] { cursor: pointer; }
.link { border: 0; background: transparent; color: var(--muted); padding: 0; }
.link:hover { color: var(--up); }
.row-actions { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.edit-op { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.edit-op-top { display: flex; gap: 10px; align-items: flex-end; }
.edit-op-top > label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
.edit-op-top input, .edit-op .pair-fields input { font-size: 14px; padding: 6px 8px; }
.edit-op .side-switch { flex: 1; min-width: 140px; }
.edit-op .pair-fields { gap: 8px; }
.edit-op .line-price { margin: 0; }

.day-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.jumps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.jump {
  text-align: left;
  background: var(--panel-2);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}
.stats { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 8px 0 14px; }
.stats > div { min-width: 92px; }
.stats small { display: block; color: var(--muted); font-size: 14px; margin-bottom: 2px; }
.stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
#float-total small { display: inline; font-size: 14px; }
.plain { width: 100%; border-collapse: collapse; }
.plain th, .plain td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.plain th:first-child, .plain td:first-child { text-align: left; }
.plain th { color: var(--muted); font-weight: 500; font-size: 14px; }
.plain td small, .plain b small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
#quote-slot { flex: 1; min-height: 0; overflow: auto; }
.quote { padding: 16px 18px 28px; }
.detail .quote { padding: 0; }
.quote-top { display: flex; align-items: center; gap: 12px; }
.quote-top h2 { flex: 1; min-width: 0; }
.quote-top h2 small, .quote-price span { font-size: 14px; font-weight: 500; margin-left: 8px; }
.quote-price b { font-size: 40px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.quote-hero { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; align-items: center; }
.quote-price em { font-style: normal; display: flex; gap: 8px; }
.quote-hero-stats, .info-grid { display: grid; gap: 4px 12px; }
.quote-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-hero-stats p, .info-grid p { display: flex; justify-content: space-between; gap: 6px; margin: 0; font-variant-numeric: tabular-nums; }
.quote-stage { display: flex; align-items: stretch; gap: 8px; height: 360px; }
.quote-stage,
.quote-stage * {
  -webkit-user-select: none;
  user-select: none;
}
body.chart-panning,
body.chart-panning * {
  -webkit-user-select: none;
  user-select: none;
}
.quote-stage .k-wrap { flex: 1; min-width: 0; height: 100%; }
.book-col { flex: 0 0 148px; align-self: flex-start; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; height: auto; }
.book-col[hidden] { display: none; }
.quote-info h3 { margin: 8px 0 6px; font-size: 14px; }
.info-grid { grid-template-columns: 1fr 1fr; }
.quote-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0; }
.quote-grid small, .depth small { display: block; color: var(--muted); font-size: 14px; }
.quote-grid b { font-size: 15px; font-weight: 600; }
.depth { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 8px; }
.depth p { display: flex; justify-content: space-between; margin: 2px 0; font-variant-numeric: tabular-nums; }
.quote-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.quote-tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; }
.quote-tabs button.on { color: var(--text); border-bottom: 2px solid var(--gold); }
.quote-tabs .info-open { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; }
.quote-tabs .minute-day { border: 1px solid var(--gold); border-radius: 999px; }
.overlay-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 8px;
  min-width: 0;
}
.overlay-label {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}
.overlay-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.overlay-preset {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 14px;
}
.overlay-preset.on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: var(--gold-dim);
}
.overlay-search { position: relative; min-width: 140px; flex: 1 1 140px; max-width: 220px; }
.overlay-search input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--text);
  font-size: 14px;
}
.overlay-hints {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.overlay-hints:empty { display: none; }
.overlay-hints button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: transparent;
  color: var(--text);
  padding: 7px 10px;
  font-size: 14px;
}
.overlay-hints button:last-child { border-bottom: 0; }
.overlay-hints button:hover { background: var(--panel-2); }
.overlay-hints small { color: var(--muted); }
.overlay-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.overlay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--oc, var(--line)) 45%, transparent);
  border-radius: 999px;
  padding: 2px 4px 2px 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
}
.overlay-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--oc);
}
.overlay-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
}
.zoom { margin-left: auto; display: flex; flex: none; gap: 4px; }
.quote-chart { min-width: 0; }
.k-wrap { min-width: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.filter-q, [data-filter-date] { background: var(--panel); width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button { border: 0; background: var(--panel); color: var(--muted); border-radius: 999px; padding: 4px 10px; }
.chips button.on { color: var(--text); background: #2c2618; }
.flow-counts { margin: 4px 0 12px; }
.flow-counts button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  min-height: 44px;
}
.flow-counts b.down { color: var(--down); }
.flow-counts button:first-child b { color: var(--up); }
.turnover { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.turnover small { display: block; color: var(--muted); font-size: 14px; }
.turnover b { font-size: 20px; font-variant-numeric: tabular-nums; }

.ladder-watch .book-head { padding: 8px 14px 0; }
.ladder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 8px;
}
.ladder-toolbar .turnover { gap: 8px 16px; }
.ladder-toolbar .turnover b { font-size: 22px; font-weight: 680; line-height: 1.1; }
.ladder-day {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.ladder-day .sub { margin: 0; white-space: nowrap; }
.ladder-day .filter-bar { padding: 0; }
.ladder-day [data-filter-date] { width: 148px; }

.ladder-scroll { padding: 0 10px 20px; overflow: auto; }
.ladder-empty { padding: 24px 8px; }
.ladder-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
  min-width: 0;
}
.ladder-bands {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ladder-summary {
  position: sticky;
  top: 4px;
  flex: 0 0 248px;
  width: 248px;
  max-height: calc(100% - 8px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 10px 12px;
}
.ladder-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ladder-summary-head strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ladder-summary-head span {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ladder-mainline {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
.ladder-mainline b { font-weight: 700; }
.ladder-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ladder-summary-table th,
.ladder-summary-table td {
  padding: 4px 2px;
  text-align: right;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.ladder-summary-table th:first-child,
.ladder-summary-table td:first-child {
  text-align: left;
  padding-left: 0;
}
.ladder-summary-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}
.ladder-summary-table tr.on td {
  color: var(--text);
  background: color-mix(in srgb, var(--gold-dim) 55%, transparent);
}
.ladder-summary-table .sector-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
}
.ladder-summary-toggle {
  display: block;
  margin-top: 8px;
  padding: 0;
  font-size: 14px;
}
.ladder-sum-row { cursor: default; }
.ladder-sum-row:hover td {
  background: color-mix(in srgb, var(--line) 55%, transparent);
}
.ladder-body.sector-focus .ladder-stock {
  opacity: 0.22;
  filter: grayscale(0.35);
}
.ladder-body.sector-focus .ladder-stock.is-focus {
  opacity: 1;
  filter: none;
  border-color: var(--sc, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sc, #e0b15a) 45%, transparent);
  background: #1c2026;
}
.ladder-body.sector-focus .ladder-band:not(:has(.ladder-stock.is-focus)) {
  opacity: 0.45;
}
.ladder-band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 10px;
}
.ladder-band[data-streak="1"] { background: #14161b; }
.ladder-band-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
  padding: 0 2px;
  min-width: 0;
}
.ladder-band-label {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--up);
}
.ladder-band-count {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ladder-sectors {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  flex: 1;
  min-width: 0;
}
.ladder-sector {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ladder-sector i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sc);
  flex-shrink: 0;
}
.ladder-band-stocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 5px;
}
.ladder-band:not([data-streak="1"]) .ladder-band-stocks {
  grid-template-columns: repeat(auto-fill, 168px);
}
.ladder-stock {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1px 8px;
  width: 100%;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--sc, var(--line)) 35%, transparent);
  border-left: 3px solid var(--sc, var(--line));
  background: var(--panel-2);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--text);
}
.ladder-stock:hover { border-color: var(--sc, var(--line)); background: #1c2026; }
.ladder-stock.on {
  border-color: rgba(224, 177, 90, 0.55);
  background: var(--gold-dim);
}
.ladder-stock-meta .sector-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: 1px;
}
.ladder-stock-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.ladder-stock-top b {
  font-size: 16px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ladder-stock-top span {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ladder-stock-meta {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ladder-stock-amt {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  justify-self: end;
}
.ladder-stock-facts {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: 3px;
  min-width: 148px;
  padding: 7px 9px;
  background: #161a20;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.ladder-stock-facts[hidden] { display: none; }
.ladder-stock-facts span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ladder-stock-facts small { color: var(--muted); }

@media (max-width: 1100px) {
  .curve-wrap { display: none; }
  .ladder-body { flex-direction: column; }
  .ladder-summary {
    position: static;
    flex-basis: auto;
    width: 100%;
    max-height: none;
  }
}
@media (max-width: 980px) {
  .curve-wrap { margin-left: 0; width: 100%; }
  .slip-layout, .trade { display: block; height: auto; }
  .trade .ticket { width: auto; min-width: 0; }
  .ticket { border-right: 0; border-bottom: 1px solid var(--line); }
  .side-quote { width: min(420px, 100%); }
  .buy-scroll { max-height: none; min-width: 0; }
  .detail { position: static; }
}

.flow-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.flow-date { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--text); font-size: 14px; white-space: nowrap; }
.flow-date select { width: auto; min-width: 148px; margin: 0; color: var(--text); background: var(--panel-2); padding: 4px 10px; min-height: 32px; }
/* ============================================================
   UX / responsive polish (2026-11)
   ============================================================ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 5, 7, 0.58);
  backdrop-filter: blur(2px);
}
.side-quote { z-index: 41; }
.watch:has(.ops-bar) .side-quote { bottom: 60px; }
.quote-close {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}
.quote-close:hover { color: var(--text); border-color: var(--gold); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 999px;
  background: #26221a;
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: color-mix(in srgb, var(--up) 65%, var(--line)); }

.scroll-shell,
.table-scroll { scrollbar-width: thin; }
.slip-layout > div { min-width: 0; }
.detail-back { display: none; margin: 0 0 10px; font-size: 14px; }

.qty-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.qty-quick span { color: var(--muted); font-size: 14px; }
.qty-chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 14px;
}
.qty-chip:hover { color: var(--text); border-color: var(--gold); }

.flow-loading { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--muted); }
.spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid rgba(224, 177, 90, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.flow-loading small { font-size: 14px; }
.retry-btn { padding: 5px 12px; }

.flow-chart svg,
.k-wrap svg { touch-action: pan-y; }
.side-quote .k-wrap svg { touch-action: none; }
.side-quote .k-wrap svg text { font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .curve-wrap { display: none; }
}

@media (min-width: 700px) and (max-width: 820px) {
  header { display: flex; flex-wrap: nowrap; gap: 4px 12px; align-items: center; padding: 10px 14px 8px; }
  .brand { font-size: 18px; }
  .capital { padding: 4px 10px; }
  .capital b, .meters b { font-size: 14px; }
  .capital small, .meters div small { font-size: 14px; }
  .meters { display: flex; flex: 1; flex-wrap: nowrap; gap: 4px 12px; min-width: 0; }
  .meters div { min-width: 0; }
  .meters b { font-size: 14px; }
  .meters small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 820px) {
  header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: calc(4px + env(safe-area-inset-top)) 12px 4px;
  }
  .brand { font-size: 18px; letter-spacing: 0; }
  .head-tools { margin-left: 4px; }
  #mode-entry, #page-full, #index-edit { min-height: 36px; height: 36px; }
  .account button { height: 36px; min-height: 36px; padding: 0 10px; }
  .review-nav button { min-height: 40px; padding: 0 11px; }
  .review-curve, .review-curve svg, #curve { height: 56px; }

  nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 0 6px;
  }
  nav.is-scrollable {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
  }
  nav::-webkit-scrollbar { display: none; }
  html, body { font-size: 17px; }
  nav button { flex: 0 0 auto; min-height: 44px; padding: 0 13px; font-size: 15px; }
  .who-main b { font-size: 18px; }
  .board th { font-size: 15px; }
  .index-chip small { font-size: 15px; }
  .index-chip b { font-size: 16px; }

  main { overscroll-behavior: contain; }
  main:has(.flow-page) { overflow: auto; }
  .page { padding: 14px 12px 40px; }
  .data-page { max-width: none; }
  .data-grid { grid-template-columns: 1fr; }
  .data-card { padding: 14px; }
  .file-pick { width: 100%; }
  .book-head { padding: 6px 12px 0; }
  .desk-head { padding: 6px 0 0; }
  .desk-top { display: block; }
  .groups-bar { margin: 0; padding: 0; width: 100%; max-width: 100%; min-width: 0; }
  .groups {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0;
    padding: 0 0 2px;
  }
  .groups.is-scrollable {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
  }
  .groups::-webkit-scrollbar { display: none; }
  .groups button { flex: 0 0 auto; min-height: 44px; }
  .groups-bar { padding-right: 4px; }
  .desk-sub { margin: 4px 0 0; padding: 0 12px; }
  .filter-q, .ops-bar button, .ops-bar select { min-height: 44px; }
  .cols label { min-height: 44px; }
  .desk-tools { margin-left: 0; }
  .desk-tools .desk-icon,
  .desk-tools .desk-filter { min-height: 44px; height: 44px; }
  .groups-bar .list-search { flex: 0 0 auto; min-width: 0; padding: 0; }
  .groups-bar .list-search.open { flex: 1 1 120px; }
  .groups-bar .list-search.open .filter-q { width: 100%; flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; }
  .desk-head .filter-q, #list-q { width: auto; flex: 1 1 auto; min-width: 0; }
  .desk-scroll-head {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 6;
    background: var(--bg);
    padding-top: 6px;
  }
  .buy-scroll.desk-shift .board thead th { transform: translate3d(0, var(--desk-shift), 0); }
  .buy-scroll .board thead th { z-index: 4; }
  .buy-scroll .board thead th.sticky { z-index: 5; }
  .desk-hint { order: 10; flex-basis: 100%; max-width: none; white-space: normal; font-size: 14px; }
  .manage-toggle { min-height: 38px; padding: 0 12px; }
  .uni-open, .uni-chips button, .uni-options button { min-height: 44px; }
  .uni-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
  .uni-row > span:first-child { grid-column: 1 / -1; }
  .manage {
    max-height: 52vh;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .manage form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 72px;
    gap: 8px;
    align-items: center;
  }
  .manage form input[name="name"] { grid-column: 1 / -1; width: 100%; }
  .manage form select { grid-column: 1 / 2; width: 100%; min-width: 0; }
  .manage form input[type="number"] { width: 100%; }
  .manage form button { grid-column: 1 / -1; min-height: 40px; }
  .manage-row { gap: 8px; }
  .manage .rule-edit { flex: 0 1 auto; }
  .cols { gap: 2px 10px; max-height: 42vh; overflow: auto; overscroll-behavior: contain; }
  .cols label { min-height: 44px; }
  .board th, .board td { padding: 8px 10px; }
  .ops-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .ops-bar #ops-count { align-self: center; }
  .ops-bar #ops-done { grid-column: 1 / -1; margin-left: 0; }
  .ops-bar #ops-del { grid-column: 2; grid-row: 1; }
  .ops-bar .ops-hint { grid-column: 1 / -1; }
  .ops-bar select { grid-column: 1 / -1; max-width: none; }
  .ops-bar #ops-add { grid-column: 1; }
  .ops-bar #ops-move { grid-column: 2; }
  .ops-bar select, .ops-bar button { min-height: 44px; }
  .row-quote { min-height: 36px; padding: 0 12px; }
  .board.picking td { padding-top: 12px; padding-bottom: 12px; }
  .board.picking td.pick, .board.picking th.pick { padding: 0; }
  .chips button { min-height: 34px; }
  .swatches { flex-wrap: wrap; gap: 8px; }
  .swatch { width: 24px; height: 24px; }

  .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .slip-table { min-width: 640px; }
  .plain { min-width: 680px; }
  .slip-layout { display: block; padding: 14px 12px 40px; }
  .detail { padding: 12px; }
  .detail-back { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }

  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .stats > div { min-width: 0; }
  .stats b { font-size: 18px; }

  .trade { display: flex; flex-direction: column; height: auto; }
  .trade .ticket {
    order: -1;
    width: auto;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 12px 18px;
  }
  .trade-main { order: 1; padding: 14px 12px 32px; overflow: visible; }
  .trade-main .table-scroll { max-width: 100%; }
  .ticket-head { margin-bottom: 10px; }

  .side-quote {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    border-left: 0;
    box-shadow: none;
    z-index: 60;
    overscroll-behavior: none;
  }
  .side-quote #quote-slot { overflow: hidden; }
  .side-quote .quote {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: calc(10px + env(safe-area-inset-top)) 14px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .side-quote .quote-head { padding: 0; gap: 8px; }
  .side-quote .quote-close {
    position: static;
    width: 36px;
    height: 36px;
  }
  .side-quote .quote-title h2 { font-size: 17px; }
  .side-quote .quote-title p { font-size: 13px; }
  .side-quote .quote-price b { font-size: 24px; }
  .side-quote .quote-price em,
  .side-quote .quote-price span,
  .side-quote .quote-head .sub,
  .side-quote .quote-after,
  .side-quote .quote-hero-stats p,
  .side-quote .quote-hero-stats small,
  .side-quote .quote-hero-stats b,
  .side-quote .q-legend,
  .side-quote .legend-minute,
  .side-quote .day-minute-head,
  .side-quote .book-col,
  .side-quote .book-col small,
  .side-quote .k-tip,
  .side-quote .info-cover-bar strong,
  .side-quote .info-cover-bar button,
  .side-quote .quote-grid small,
  .side-quote .quote-grid b,
  .side-quote .quote-tabs > button[data-period],
  .side-quote .more-wrap > button { font-size: 13px; }
  .side-quote .quote-hero {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 2px 10px;
    padding: 0;
  }
  .side-quote .quote-hero-stats { gap: 2px 4px; }
  .side-quote .quote-hero-stats p {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px;
  }
  .side-quote .quote-extra[open] { max-height: none; overflow: visible; }
  .side-quote .quote-stage { height: auto; min-height: 0; max-height: none; }
  .dossier-tabs button,
  .dossier h3, .dossier-text, .dossier-facts, .dossier-table { font-size: 13px; }
  .side-quote .book-col {
    flex: 0 0 auto;
    width: max-content;
    max-width: 42%;
    min-width: 0;
    padding: 0 0 0 4px;
  }
  .side-quote .book-col p { grid-template-columns: 32px auto auto; gap: 0 3px; }
  .side-quote .book-col p.book-stat { grid-template-columns: 32px auto; }
  .side-quote .book-col b,
  .side-quote .book-col span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .side-quote #q-chart { height: 0; }
  .side-quote .quote-tabs button { min-height: 40px; padding: 4px 8px; }
  .quote-close { width: 40px; height: 40px; font-size: 24px; }
  .quote-top { gap: 8px; }
  .quote-top h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .quote-top h2 small { font-size: 13px; margin-left: 4px; }
  .quote-top .primary { padding: 8px 12px; }
  .quote-tabs button { min-height: 40px; padding: 6px 8px; }
  .quote-tabs .zoom button,
  .zoom button,
  .col-zoom button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }
  .overlay-preset { min-height: 32px; }
  .overlay-search { max-width: none; flex: 1 1 160px; }

  .flow-page { height: auto; min-height: 100%; overflow: visible; padding: 12px; }
  .flow-extra { grid-template-columns: 1fr; }
  .flow-page .toolbar { flex-wrap: wrap; gap: 8px; }
  .flow-page .toolbar .sub { flex-basis: 100%; }
  .flow-toggle { min-height: 38px; }
  .flow-page .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .flow-page .chips button { flex: 0 0 auto; min-height: 38px; }
  .flow-body { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
  .flow-chart { flex: 0 0 auto; height: auto; }
  .flow-chart svg { flex: 0 0 auto; height: auto; min-height: 240px; }
  .flow-board { flex: 1 1 auto; min-height: 320px; max-height: 58vh; }
  .flow-page.hide-chart .flow-board { min-height: 320px; max-height: calc(100dvh - 210px); }
  .flow-solo #market-flow,
  .flow-solo #holder-chart { flex: none; }
  .flow-solo #market-flow { height: 52vh; min-height: 280px; }
  .flow-solo #holder-chart { height: 62vh; min-height: 360px; }

  .ladder-toolbar { flex-direction: column; align-items: stretch; gap: 6px; }
  .ladder-toolbar .turnover { gap: 6px 14px; }
  .ladder-day { margin-left: 0; width: 100%; justify-content: space-between; gap: 8px; }
  .ladder-day [data-filter-date] { width: auto; flex: 1; min-width: 0; }
  .ladder-scroll { padding: 0 10px 24px; }
  .ladder-body { flex-direction: column; }
  .ladder-summary { order: -1; position: static; width: 100%; max-height: none; }
  .ladder-band-stocks,
  .ladder-band:not([data-streak="1"]) .ladder-band-stocks {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  }

  .global-page { padding: 14px 12px 40px; }
  .global-page .toolbar { flex-wrap: wrap; gap: 4px 10px; }
  .global-cards { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 6px; }
  .global-card { padding: 7px 8px; }
  .global-card b { font-size: 17px; }
  .global-card small, .global-card span { font-size: 14px; }

  input, select, textarea { font-size: 16px; }
  .entry .pair-fields input, .entry .reason { font-size: 18px; }
  .capital input { width: 100px; font-size: 18px; }
}

/* tablet: keep the header on one line */
@media (min-width: 700px) and (max-width: 820px) {
  header { display: flex; flex-wrap: nowrap; gap: 4px 12px; align-items: center; padding: 10px 14px 8px; }
  .brand { font-size: 18px; }
  .capital { padding: 4px 10px; }
  .capital b, .meters b { font-size: 14px; }
  .capital small, .meters div small { font-size: 14px; }
  .meters { display: flex; flex: 1; flex-wrap: nowrap; gap: 4px 12px; min-width: 0; width: auto; }
  .meters div { min-width: 0; overflow: hidden; }
  .meters b { font-size: 14px; }
  .meters small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 380px) {
  .side-quote .quote-price b { font-size: 22px; }
  .side-quote .quote-hero-stats { gap: 1px 4px; }
  .side-quote .quote-hero-stats small { font-size: 12px; }
  .side-quote .quote-hero-stats b { font-size: 12px; }
  .side-quote .book-col { max-width: 44%; font-size: 12px; }
  .side-quote .overlay-label { display: none; }
}

body.sheet-open { overflow: hidden; }

.monitor-page { max-width: 820px; }
.monitor-page h2 { margin: 0 0 6px; font-size: 24px; }
.monitor-page .lead { max-width: 42em; }
.monitor-watch .book-head { padding-bottom: 8px; }
.monitor-note { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.monitor-toolbar { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.monitor-toolbar button:not(.primary) {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 4px;
}
.monitor-toolbar .primary { min-height: 36px; }
.monitor-template {
  margin: 12px 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  font: 14px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.monitor-sample-note { margin: 8px 14px 0; }
.monitor-sec { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.monitor-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.monitor-picks small { color: var(--muted); margin-right: 4px; }
#monitor-hints { max-height: 180px; overflow: auto; }
.monitor-pick-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--gold-dim);
}
#monitor-dialog > form { width: min(640px, 100%); }
.monitor-flags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.monitor-col-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.monitor-col-row span { color: var(--muted); flex: 0 0 auto; }
.monitor-col-row select { flex: 1; min-height: 40px; min-width: 0; }
.sheet .monitor-flags label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}
.monitor-flags input { width: 18px; height: 18px; margin: 0; }
.monitor-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin: 12px 0; }
.monitor-rules label { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.monitor-row { padding: 12px 14px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.monitor-row.is-off { opacity: 0.55; }
.monitor-row-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.monitor-row-top b { font-size: 17px; font-weight: 680; }
.monitor-row-top small { color: var(--muted); }
.monitor-row-top em { font-style: normal; color: var(--gold); font-size: 14px; }
.monitor-row-top em.muted { color: var(--muted); }
.monitor-row-top .monitor-live { margin-left: auto; font-weight: 700; }
.monitor-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.monitor-tags .lhb-tag { margin-left: 0; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.monitor-open { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); text-decoration: none; }
.monitor-foot { margin: 18px 14px 8px; }
.monitor-page .solid { min-height: 44px; }
#wecom-qr, #auth-qr { margin-top: 12px; }
#wecom-qr svg, #wecom-qr img, #auth-qr svg, #auth-qr img {
  display: block;
  background: #fff;
  border-radius: 12px;
  width: min(320px, 100%);
  max-width: 100%;
  height: auto;
}
#auth-scan .lead,
#auth-scan-msg,
#wecom-qr-msg,
.sheet .lead,
.sheet .muted {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}
#auth-wechat-go { justify-self: center; margin: 4px 0 8px; }
.stock-menu {
  position: fixed;
  z-index: 90;
  min-width: 148px;
  max-width: min(240px, calc(100vw - 16px));
  max-height: min(70vh, 420px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}
.stock-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
}
.stock-menu button:hover { background: var(--gold-dim); }
.stock-menu-sub {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.stock-menu-sub span { color: var(--muted); font-size: 14px; padding: 4px 10px 0; }
.buy-row,
.buy-row *,
.pick-stock,
.pick-stock * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html[data-mode="idle"] {
  color-scheme: dark;
  --bg: #16181c;
  --panel: #1c1f24;
  --panel-2: #14161a;
  --line: #2a2e34;
  --text: #b7bcc4;
  --muted: #8b939c;
  --gold: #7d8b99;
  --gold-dim: rgba(125, 139, 153, 0.16);
  --up: #f0d4cc;
  --down: #c9eadf;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
html[data-mode="idle"] .error { color: #a89890; }
html[data-mode="idle"] .flow-play {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}
html[data-mode="idle"] .flow-scrub input[type="range"] { accent-color: var(--gold); }
html[data-mode="idle"] .ico-play { border-left-color: var(--muted); }
html[data-mode="idle"] .ico-pause {
  background: linear-gradient(var(--muted), var(--muted)) left / 3px 100% no-repeat, linear-gradient(var(--muted), var(--muted)) right / 3px 100% no-repeat;
}
html[data-mode="idle"] .book-col .hot { background: rgba(240, 212, 204, 0.16); }
html[data-mode="idle"] .book-col .bid.hot { background: rgba(201, 234, 223, 0.16); }
html[data-mode="idle"] .ticket,
html[data-mode="idle"] .ops-bar,
html[data-mode="idle"] .ladder-band,
html[data-mode="idle"] .ladder-band[data-streak="1"],
html[data-mode="idle"] .ladder-summary,
html[data-mode="idle"] .ladder-stock-facts,
html[data-mode="idle"] .flow-board table:not(.board) th,
html[data-mode="idle"] .flow-board table:not(.board) td,
html[data-mode="idle"] .flow-board table:not(.board) td.name,
html[data-mode="idle"] .flow-board table:not(.board) th:first-child {
  background: var(--panel);
  color: var(--text);
}
html[data-mode="idle"] .flow-board table:not(.board) tbody tr.on td,
html[data-mode="idle"] .flow-board table:not(.board) tbody tr.on td.name { background: #22262c; }
html[data-mode="idle"] .ladder-stock,
html[data-mode="idle"] .board tbody tr:hover td,
html[data-mode="idle"] .board tbody tr.picked td,
html[data-mode="idle"] .q-float,
html[data-mode="idle"] .ladder-body.sector-focus .ladder-stock.is-focus {
  background: var(--panel-2);
  color: var(--text);
}
html[data-mode="bright"] {
  color-scheme: light;
  --bg: #f4f1ea;
  --panel: #fffcf7;
  --panel-2: #ebe6dc;
  --line: #ddd4c6;
  --text: #1c1915;
  --muted: #6d655b;
  --gold: #a9782c;
  --gold-dim: rgba(169, 120, 44, 0.16);
  --up: #d23b2e;
  --down: #0f8a5f;
  --shadow: 0 18px 40px rgba(60, 42, 16, 0.12);
}
html[data-mode="bright"] #mode-entry { color: var(--gold); background: var(--gold-dim); }
html[data-mode="bright"] .ticket,
html[data-mode="bright"] .ops-bar,
html[data-mode="bright"] .flow-board table:not(.board) th,
html[data-mode="bright"] .flow-board table:not(.board) td,
html[data-mode="bright"] .flow-board table:not(.board) td.name,
html[data-mode="bright"] .ladder-band[data-streak="1"],
html[data-mode="bright"] .ladder-stock-facts,
html[data-mode="bright"] .q-float {
  background: var(--panel);
  color: var(--text);
}
html[data-mode="bright"] .flow-board table:not(.board) th,
html[data-mode="bright"] .flow-board table:not(.board) th:first-child { background: #f6f1e6; }
html[data-mode="bright"] .flow-board table:not(.board) tbody tr.on td,
html[data-mode="bright"] .flow-board table:not(.board) tbody tr.on td.name { background: #e7eef6; }
html[data-mode="bright"] .board tbody tr:hover td,
html[data-mode="bright"] .ladder-stock:hover,
html[data-mode="bright"] .ladder-body.sector-focus .ladder-stock.is-focus { background: #efeae1; }
html[data-mode="bright"] .board tbody tr.picked td,
html[data-mode="bright"] .chips button.on { background: #f3e6cc; color: var(--text); }
html[data-mode="bright"] .buy-scroll::-webkit-scrollbar-thumb,
html[data-mode="bright"] .table-scroll::-webkit-scrollbar-thumb,
html[data-mode="bright"] .flow-board::-webkit-scrollbar-thumb { background: #c9bfb0; }
html[data-mode="bright"] .buy-scroll::-webkit-scrollbar-track,
html[data-mode="bright"] .table-scroll::-webkit-scrollbar-track { background: #efeae2; }
html[data-mode="bright"] .flow-board { scrollbar-color: #c9bfb0 transparent; }
html[data-mode="bright"] .flow-play {
  background: #f6ead2;
  color: var(--text);
  border-color: var(--gold);
}
html[data-mode="bright"] .ico-play { border-left-color: var(--gold); }
html[data-mode="bright"] .ico-pause {
  background: linear-gradient(var(--gold), var(--gold)) left / 3px 100% no-repeat, linear-gradient(var(--gold), var(--gold)) right / 3px 100% no-repeat;
}
html[data-mode="bright"] .toast { background: #fff8ec; color: var(--text); }
html[data-mode="bright"] .side-quote { box-shadow: -12px 0 32px rgba(60, 42, 16, 0.08); }
#auth-qr { display: grid; justify-content: center; }
#auth-name-row { display: grid; gap: 8px; margin-top: 8px; }
#auth-scan .lead { margin-top: 0; }
.monitor-live { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .monitor-flags { grid-template-columns: 1fr 1fr; }
  .monitor-rules { grid-template-columns: 1fr 1fr; }
  .monitor-page .solid { min-height: 44px; }
}
@media (max-width: 820px) {
  .sheet { align-items: end; padding: 0; }
  .sheet > form, .sheet > div {
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .sheet .gate-actions { display: grid; width: 100%; }
  .sheet .gate-actions button { width: 100%; min-height: 44px; }
}

@media (max-width: 1680px) {
  header { flex-wrap: wrap; row-gap: 0; }
  .index-bar { order: 1; flex: 1 1 0; min-width: 0; }
  .head-tools { order: 2; flex: 0 0 auto; }
  .market-turn {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    padding: 0 0 4px;
    border-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .market-turn::-webkit-scrollbar { display: none; }
}

#admin-dialog > div { max-height: min(86vh, 760px); overflow: auto; }
.source-health { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.source-head h3 { margin: 0; font-size: 16px; }
#source-check { min-height: 32px; }
.source-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-row b { display: block; font-weight: 650; }
.source-row small, .source-state small { display: block; color: var(--muted); font-size: 12px; }
.source-state { text-align: right; white-space: nowrap; }
.source-ok { color: var(--down); }
.source-bad { color: var(--up); }
