.mode-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding-right: 0;
}
.mode-tags .tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-height: 44px;
  padding: 4px 2px;
  line-height: 1.15;
}
.mode-tags .tag b { font-size: 14px; font-weight: 800; }
.mode-tags .tag span { font-size: 10px; font-weight: 600; letter-spacing: 0.01em; opacity: 0.82; }
html[data-m-axi="1"] .mode-tags .tag.on { color: #fff; }
html[data-m-axi="1"] .mode-tags .tag.on span { opacity: 1; }
html[data-m-axi="1"] .mode-tags .tag.on[data-mode="active"] { background: #dc2626; border-color: #dc2626; }
html[data-m-axi="1"] .mode-tags .tag.on[data-mode="balance"] { background: #f59e0b; border-color: #f59e0b; color: #1a1408; }
html[data-m-axi="1"] .mode-tags .tag.on[data-mode="steady"] { background: #2563eb; border-color: #2563eb; }
.sig-fresh {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px dashed #8a939f;
  color: var(--mist);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}
.sig-fresh time,
.sig-fresh strong { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.sig-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
}
.sig-meter {
  flex: 0 0 auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--brass-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.sig-meter[data-tone="active"] { border-color: #dc2626; }
.sig-meter[data-tone="balance"] { border-color: #f59e0b; }
.sig-meter[data-tone="steady"] { border-color: #2563eb; }
.sig-meter-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--brass); }
.sig-meter[data-tone="active"] .sig-meter-kicker { color: #fca5a5; }
.sig-meter[data-tone="balance"] .sig-meter-kicker { color: #fbbf24; }
.sig-meter[data-tone="steady"] .sig-meter-kicker { color: #93c5fd; }
.sig-meter b { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--ink); }
.sig-bar .ai-sort { flex: 1 1 168px; margin: 0; align-content: flex-start; }
.ai-sort {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.ai-sort button {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.ai-sort button[aria-pressed="true"] { background: var(--ink); color: var(--navy); border-color: var(--ink); }
.ai-sort button[data-side="long"][aria-pressed="true"] { background: var(--up); color: #052e16; border-color: var(--up); }
.ai-sort button[data-side="short"][aria-pressed="true"] { background: #dc2626; color: #fff; border-color: #dc2626; }
.ai-sort button[data-sort][aria-pressed="true"]::after,
.ai-sort button[data-hist][aria-pressed="true"]::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: 1px;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.ai-sort button[data-sort][data-dir="asc"]::after,
.ai-sort button[data-hist][data-dir="asc"]::after { border-top: 0; border-bottom: 5px solid currentColor; vertical-align: 2px; }
.ai-empty { margin: 8px 0 0; color: var(--mist); font-size: 13px; }
.ai-card {
  margin: 0 0 12px;
  padding: 14px;
  background: var(--plate);
  border: 1px solid var(--line);
  color: var(--ink);
}
.ai-card.long {
  background: linear-gradient(135deg, rgba(123, 255, 61, 0.16), rgba(0, 212, 255, 0.08));
  border-color: rgba(123, 255, 61, 0.42);
}
.ai-card.short {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 71, 87, 0.06));
  border-color: rgba(255, 107, 107, 0.46);
}
html[data-m-axi="1"] .ai-card.long .btn-primary {
  background: linear-gradient(90deg, #7bff3d, #4ade80);
  color: #111;
  border-color: transparent;
}
html[data-m-axi="1"] .ai-card.short .btn-primary {
  background: linear-gradient(90deg, #ff6b6b, #ff4757);
  color: #fff;
  border-color: transparent;
}
.ai-card .btn.is-dead,
html[data-m-axi="1"] .ai-card .btn.is-dead {
  background: #3a4150;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: not-allowed;
  opacity: 1;
}
.ai-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.ai-id { min-width: 0; flex: 1 1 auto; }
.ai-id-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-sym {
  flex: 0 0 auto;
  min-width: 78px;
  height: 40px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sym, #d8ff3d);
  color: #111;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 86% 100%, 0 100%);
}
.ai-meta { min-width: 0; flex: 1 1 auto; }
.ai-rr {
  display: inline-flex;
  align-items: center;
  height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--sym, #d8ff3d);
  background: var(--sym, #d8ff3d);
  color: #111;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ai-flags { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 40px; }
.ai-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 8px;
  border: 1px dashed var(--down);
  background: rgba(239, 68, 68, 0.08);
  color: var(--down);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.ai-order.long {
  border-color: var(--up);
  background: rgba(34, 197, 94, 0.08);
  color: var(--up);
}
.ai-order.short {
  border-color: var(--down);
  background: rgba(239, 68, 68, 0.08);
  color: var(--down);
}
.ai-time { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--mist); font-size: 12px; }
.ai-time svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ai-dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}
.ai-dir.long { color: var(--up); background: rgba(34, 197, 94, 0.12); border-color: var(--up); }
.ai-dir.short { color: var(--down); background: rgba(239, 68, 68, 0.12); border-color: var(--down); }
.ai-dir svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ai-card h3 {
  margin: 12px 0 6px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
}
.ai-face {
  margin-right: 6px;
  font-size: 15px;
  line-height: 1;
}
.ai-desc { margin: 0 0 12px; color: var(--mist); font-size: 13px; line-height: 1.55; }
.ai-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.ai-prices + .ai-conf { margin-top: 10px; }
.ai-prices div { min-width: 0; padding: 8px 4px; background: var(--plate-2); text-align: center; }
.ai-prices span {
  display: block;
  color: var(--mist);
  font-size: 11px;
}
.ai-prices .lab { font-weight: 700; color: var(--ink); }
.ai-prices svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ai-prices b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-prices b.up, .sheet .up { color: var(--up); }
.ai-prices b.down, .sheet .down { color: var(--down); }
.ai-conf { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 12px; color: var(--mist); font-size: 11px; }
.ai-bar { width: 56px; flex: none; height: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ai-bar i { display: block; height: 100%; background: var(--up); }
.ai-bar.short i { background: var(--down); }
.ai-conf b { font-family: var(--mono); font-size: 12px; }
.ai-conf b.long { color: var(--up); }
.ai-conf b.short { color: var(--down); }
.ai-ttl {
  flex: none;
  margin-left: auto;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ai-card .btn { width: 100%; }
.sheet-mask {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}
.dlg {
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121214;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.dlg-head, .dlg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}
.dlg-head { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dlg-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dlg-title h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.dlg-title p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.5); font-size: 12px; }
.dlg-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.dlg-mark.long { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.dlg-mark.short { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.dlg-mark svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.dlg-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
}
.dlg-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.dlg-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); }
.dlg-prices div { text-align: center; }
.dlg-prices span { display: block; margin-bottom: 4px; color: rgba(255, 255, 255, 0.4); font-size: 11px; }
.dlg-prices b { font-family: var(--mono); font-size: 14px; }
.dlg-prices .down { color: #f87171; }
.dlg-prices .up { color: #4ade80; }
.dlg-calc-lab { margin-bottom: 6px; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.dlg-calc p { margin: 0 0 4px; color: rgba(255, 255, 255, 0.72); font-size: 13px; line-height: 1.45; }
.dlg-calc b { color: #fff; font-family: var(--mono); }
.dlg-lot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  user-select: none;
}
.dlg-lot b { font-family: var(--mono); font-size: 22px; font-weight: 800; }
.dlg-lot span { color: rgba(255, 255, 255, 0.4); font-size: 13px; }
.dlg-risk { padding: 12px; border-radius: 16px; border: 1px solid rgba(234, 179, 8, 0.28); background: linear-gradient(90deg, rgba(234, 179, 8, 0.12), rgba(249, 115, 22, 0.1)); }
.dlg-risk b { display: block; margin-bottom: 4px; font-size: 13px; }
.dlg-risk p { margin: 0; color: rgba(255, 255, 255, 0.55); font-size: 12px; }
.dlg-risk .up, .dlg-risk .down { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dlg-risk .up { color: #4ade80; }
.dlg-risk .down { color: #f87171; }
.dlg-conf { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.dlg-conf i { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.dlg-conf em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #d8ff3d, #00d4ff); }
.dlg-wait { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 13px; line-height: 1.45; }
.dlg-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.dlg-done { border-color: rgba(123, 255, 61, 0.5); }
.ok-pop { padding: 32px 24px 36px; text-align: center; }
.ok-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  animation: ok-zoom 0.3s ease;
}
.ok-badge svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ok-pop h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.ok-pnl {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.ok-pnl.up { color: var(--up, #4ade80); }
.ok-pnl.down { color: var(--down, #f07178); }
.ok-line { margin: 0 0 16px; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.ok-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.ok-pill i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ade80;
  animation: ok-pulse 1.2s ease infinite;
}
.ok-note { margin: 12px 0 0; color: rgba(255, 255, 255, 0.45); font-size: 12px; line-height: 1.45; }
@keyframes ok-zoom {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes ok-pulse {
  50% { opacity: 0.35; }
}
.dlg-conf b { color: #d8ff3d; font-family: var(--mono); }
.dlg-actions { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.dlg-cancel, .dlg-ok {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}
.dlg-cancel { border: 1px solid rgba(255, 255, 255, 0.12); background: transparent; color: #fff; }
.dlg-ok { border: 0; color: #111; }
.live-on {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 22px;
  padding: 0 8px 0 7px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}
.live-on i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
}
.dlg-ok.long { background: linear-gradient(90deg, #7bff3d, #4ade80); }
.dlg-ok.short { background: linear-gradient(90deg, #ff6b6b, #ff4757); color: #fff; }
.sheet {
  width: 100%;
  padding: 16px 16px calc(16px + var(--safe-b));
  background: var(--plate);
  border-top: 2px solid var(--brand);
}
.sheet h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.03em; }
.sheet .lead { margin-bottom: 12px; }
.sheet-row { display: flex; justify-content: space-between; gap: 12px; min-height: 28px; font-size: 13px; }
.sheet-row span { color: var(--mist); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.sheet-grid div { padding: 8px; background: var(--plate-2); }
.sheet-grid span { display: block; color: var(--mist); font-size: 11px; }
.sheet-grid b { font-family: var(--mono); }
.acc-item { min-width: 0; }
.acc-item .meta em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast {
  position: absolute;
  z-index: 50;
  left: 16px;
  right: 16px;
  bottom: calc(var(--tab-h) + 12px);
}
.pos-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow: visible;
  padding-right: 0;
}
.pos-tags .tag { width: 100%; justify-content: center; }
.book-sum { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.book-sum-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.book-sum-row div { min-width: 0; padding: 8px 4px; background: var(--plate-2); text-align: center; }
.book-sum-row span { display: block; color: var(--mist); font-size: 11px; }
.book-sum-row b { display: block; margin-top: 4px; font-family: var(--mono); font-size: 13px; letter-spacing: -0.03em; }
.book-hint { margin: 0 0 10px; color: var(--mist); font-size: 12px; line-height: 1.45; }
.book-card { margin-bottom: 10px; }
.bind-error { margin: 0 0 8px; color: #fecaca; font-size: 13px; font-weight: 700; }
.hist-card .book-hd strong { margin-left: auto; font-family: var(--mono); }
.bind-error { margin: 0 0 8px; color: #fecaca; font-size: 13px; font-weight: 700; }
.hist-card .book-hd strong.wait { color: var(--mist); font-weight: 700; }
.book-hd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.book-hd strong { margin-left: auto; font-family: var(--mono); font-size: 16px; }
.book-side {
  flex: none;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}
.book-side.long { color: var(--up); background: rgba(34, 197, 94, 0.16); }
.book-side.short { color: var(--down); background: rgba(239, 68, 68, 0.16); }
.book-id { min-width: 0; display: flex; flex-direction: column; }
.book-id b, .book-sym { font-size: 16px; letter-spacing: -0.03em; }
.book-id span, .book-meta { color: var(--mist); font-size: 11px; }
.book-rr {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}
.book-hd strong { margin-left: 0; }
.book-lots { margin-left: auto; color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 800; }
.book-meta { margin: 8px 0 0; }
.book-px, .book-pips, .book-stops, .book-money, .book-gap-ends {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.book-stops, .book-money, .book-gap-ends { grid-template-columns: 1fr 1fr; }
.book-px div, .book-pips div, .book-stops div, .book-money div, .book-gap-ends div {
  min-width: 0;
  padding: 8px 4px;
  background: var(--plate-2);
  text-align: center;
}
.book-card.long .book-px div,
.book-card.long .book-pips div {
  border: 1px dashed color-mix(in srgb, var(--up) 50%, transparent);
  background: rgba(34, 197, 94, 0.08);
}
.book-card.short .book-px div,
.book-card.short .book-pips div {
  border: 1px dashed color-mix(in srgb, var(--down) 50%, transparent);
  background: rgba(239, 68, 68, 0.08);
}
.book-px b.held { font-size: 12px; letter-spacing: -0.04em; }
.book-px span, .book-pips span, .book-stops span, .book-money span, .book-gap-ends span, .book-sltp-hd span {
  display: block;
  color: var(--mist);
  font-size: 11px;
}
.book-px b, .book-pips b, .book-stops b, .book-money b, .book-gap-ends b, .book-sltp-hd b {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
}
.book-px small, .book-pips small, .book-gap-top small { margin-left: 2px; color: var(--mist); font-size: 11px; font-weight: 600; }
.book-sltp { margin-top: 10px; }
.book-sltp-hd { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: end; }
.book-sltp-hd em { color: var(--ink); font-size: 12px; font-style: normal; font-weight: 800; text-align: center; }
.book-sltp-hd div:last-child { text-align: right; }
.book-track {
  position: relative;
  height: 10px;
  margin-top: 8px;
  background: var(--plate-2);
  overflow: hidden;
}
.book-track i, .book-track b { position: absolute; top: 0; bottom: 0; }
.book-track .sl { left: 0; background: rgba(239, 68, 68, 0.28); }
.book-track .tp { background: rgba(34, 197, 94, 0.22); }
.book-track .fill { background: var(--up); }
.book-sltp.lose .fill { background: var(--down); }
.book-track b { width: 2px; background: #fff; }
.book-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.book-axis span { white-space: nowrap; }
.book-stops em { display: block; margin-top: 2px; color: var(--mist); font-style: normal; font-size: 11px; }
.book-stops .is-sl b { color: var(--down); }
.book-stops .is-tp b { color: var(--up); }
.book-gap { margin-top: 10px; }
.book-gap-top { display: flex; align-items: baseline; justify-content: space-between; color: var(--mist); font-size: 12px; }
.book-gap-top b { color: var(--ink); font-family: var(--mono); font-size: 20px; }
.book-track.thin { height: 6px; }
.book-track.thin .fill { left: 0; width: 100%; background: var(--brand); }
.book-card > .btn, .book-all { width: 100%; margin-top: 10px; }
.book-sum-row b.up, .book-hd strong.up, .book-money b.up, .book-px b.up, .book-pips .up, .book-sltp-hd b.up, .book-axis .up { color: var(--up); }
.book-sum-row b.down, .book-hd strong.down, .book-money b.down, .book-px b.down, .book-pips .down, .book-sltp-hd b.down, .book-axis .down { color: var(--down); }

.acc-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-bind { width: 100%; margin-top: 2px; }
.acc-actions { display: flex; flex-direction: column; gap: 8px; }
.acc-actions .btn { width: 100%; }
.notice-row b { color: var(--ink); font-weight: 700; }
.acc-rail-btn span { font-size: 11px; line-height: 1.15; text-align: center; }
.role-scroll { display: flex; flex-direction: column; gap: 10px; }
.role-poster { position: relative; height: 196px; overflow: hidden; border-radius: 16px; background: var(--plate); }
.role-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.role-poster-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.82) 100%); }
.role-poster-copy { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.role-poster-copy b { display: block; font-size: 18px; line-height: 1.25; }
.role-poster-copy small { display: block; margin-top: 2px; color: #f5f0f0; font-size: 13px; }
.run-log { display: flex; flex-direction: column; gap: 8px; }
.run-log time { color: var(--mist); font-size: 12px; }
.run-log b { display: block; margin-top: 4px; }
.run-log b.ok { color: var(--up); }
.run-log b.bad { color: var(--down); }
.run-log p { margin: 6px 0 0; font-size: 14px; }
.acct-gate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.acct-gate button {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--plate);
  color: var(--mist);
  font-weight: 700;
}
.acct-gate button.on { background: var(--brass); color: #1a1408; border-color: var(--brass); }
.acct-auth .login-panel {
  padding: 22px 16px 18px;
  border-radius: 16px;
  background: var(--plate);
  box-shadow: none;
}
.acct-auth .login-input,
.acct-auth .field .login-input input { background: var(--plate-2); }
.acct-auth .login-input:focus-within,
.acct-auth .field .login-input:focus-within input { background: var(--plate-2); }
.acct-auth .field .login-input input:-webkit-autofill { box-shadow: 0 0 0 1000px var(--plate-2) inset; }
.acct-auth .login h1 { font-size: 26px; }
.fund-card .acc-h { color: var(--ink); font-size: 14px; }
.fund-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 2px 0 4px; }
.fund-grid span { display: block; color: var(--mist); font-size: 12px; }
.fund-grid b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 22px; font-weight: 650; letter-spacing: -0.04em; }
.fund-card .acc-item { margin-top: 8px; padding-top: 12px; }
.who-card .sig-ava { border-radius: 50%; }
.who-card .lead { margin-top: 8px; line-height: 1.55; }
.who-card .meta em { display: inline-flex; align-items: center; gap: 4px; }
.who-card .meta svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.swap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--plate-2);
  color: var(--ink);
  text-align: left;
}
.swap-row.on { border-color: var(--brass); }
.swap-row .sig-ttl { min-width: 0; flex: 1; }
.swap-row b, .swap-row small { display: block; }
.swap-row small { color: var(--mist); font-size: 12px; }
.swap-row em { flex: none; color: var(--brass); font-style: normal; font-size: 12px; font-weight: 700; }
.role-entry {
  position: relative;
  display: block;
  width: 100%;
  height: 168px;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--plate);
  text-align: left;
  cursor: pointer;
}
.role-entry img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.role-entry-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 70%, rgba(0, 0, 0, 0.2) 100%);
}
.role-entry-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 16px;
  transform: translateY(-4px);
}
.role-entry-copy b { font-size: 22px; line-height: 1.25; }
.role-entry-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.role-entry-line small {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-entry-line i {
  flex: none;
  color: var(--brass);
  font-style: normal;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.role-entry:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.role-mask {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: rgba(0, 0, 0, 0.72);
}
.role-panel {
  width: 100%;
  max-height: 100%;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--plate);
  color: var(--ink);
}
.role-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.role-head i { display: block; color: var(--brass); font-style: normal; font-size: 12px; font-weight: 750; }
.role-head h2 { margin: 2px 0 0; font-size: 20px; }
.role-x {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--plate-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.role-portrait {
  display: block;
  width: 100%;
  height: 240px;
  margin-top: 10px;
  object-fit: cover;
  object-position: center 14%;
  border-radius: 16px;
  background: var(--navy);
}
.role-face { margin: 10px 0 0; color: var(--mist); font-size: 13px; }
.role-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.role-stats div { padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.role-stats span { display: block; color: var(--mist); font-size: 12px; }
.role-stats b { font-variant-numeric: tabular-nums; }
.role-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.role-pager > button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--plate-2);
  color: var(--ink);
}
.role-dots { display: flex; gap: 8px; }
.role-dot {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
}
.role-dot.on { background: var(--brass); border-color: var(--brass); }
.role-ok {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--brass);
  color: #1a1408;
  font-weight: 800;
}
.role-x:focus-visible, .role-pager > button:focus-visible, .role-dot:focus-visible, .role-ok:focus-visible, .role-panel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
html[data-m-axi="1"] .mast-logo,
html[data-m-axi="1"] .mast-logo img,
html[data-m-style="crimson-pulse"] .mast-logo,
html[data-m-style="crimson-pulse"] .mast-logo img,
html[data-m-axi="1"] .mast-mark,
html[data-m-style="crimson-pulse"] .mast-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
}
html[data-m-axi="1"] .mast-name,
html[data-m-style="crimson-pulse"] .mast-name {
  font-size: 19px;
  background-image: linear-gradient(90deg, #67e8f9 0%, #38bdf8 22%, #6366f1 48%, #22d3ee 74%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
html[data-m-axi="1"] .mast-name.is-aurora,
html[data-m-style="crimson-pulse"] .mast-name.is-aurora { background-image: linear-gradient(90deg, #4ade80 0%, #2dd4bf 34%, #38bdf8 68%, #818cf8 100%); }
html[data-m-axi="1"] .mast-name.is-dusk,
html[data-m-style="crimson-pulse"] .mast-name.is-dusk { background-image: linear-gradient(90deg, #fb7185 0%, #e879f9 36%, #818cf8 70%, #38bdf8 100%); }
html[data-m-axi="1"] .mast-name.is-ember,
html[data-m-style="crimson-pulse"] .mast-name.is-ember { background-image: linear-gradient(90deg, #fde68a 0%, #fb923c 38%, #ef4444 72%, #f43f5e 100%); }
html[data-m-axi="1"] .mast-name.is-rose,
html[data-m-style="crimson-pulse"] .mast-name.is-rose { background-image: linear-gradient(90deg, #fda4af 0%, #f472b6 34%, #c084fc 68%, #818cf8 100%); }
html[data-m-axi="1"] .mast-name.is-ocean,
html[data-m-style="crimson-pulse"] .mast-name.is-ocean { background-image: linear-gradient(90deg, #22d3ee 0%, #0ea5e9 36%, #2563eb 70%, #7c3aed 100%); }
html[data-m-axi="1"] .mast-name.is-citrus,
html[data-m-style="crimson-pulse"] .mast-name.is-citrus { background-image: linear-gradient(90deg, #bef264 0%, #facc15 36%, #fb923c 70%, #f97316 100%); }
html[data-m-axi="1"] .mast-name.is-ice,
html[data-m-style="crimson-pulse"] .mast-name.is-ice { background-image: linear-gradient(90deg, #e0f2fe 0%, #7dd3fc 34%, #60a5fa 68%, #a5b4fc 100%); }
html[data-m-axi="1"] .mast-name.is-neon,
html[data-m-style="crimson-pulse"] .mast-name.is-neon { background-image: linear-gradient(90deg, #f472b6 0%, #22d3ee 40%, #a3e635 74%, #4ade80 100%); }
html[data-m-axi="1"] .mast-slogan,
html[data-m-style="crimson-pulse"] .mast-slogan {
  font-size: 15px;
  color: #8d939c;
  border-left-color: rgba(141, 147, 156, 0.45);
  font-weight: 500;
}
html[data-m-style="scarlet-bronze"] .mast-slogan,
html[data-m-style="crimson-gold"] .mast-slogan,
html[data-m-style="garnet-amber"] .mast-slogan,
html[data-m-style="arctic-clean"] .mast-slogan,
html[data-m-style="tech-blue"] .mast-slogan,
html[data-m-style="system-clear"] .mast-slogan {
  color: #5c6570;
  border-left-color: rgba(92, 101, 112, 0.45);
}
html[data-m-style="scarlet-bronze"] #app,
html[data-m-style="crimson-gold"] #app,
html[data-m-style="garnet-amber"] #app,
html[data-m-style="arctic-clean"] #app,
html[data-m-style="tech-blue"] #app,
html[data-m-style="system-clear"] #app {
  background: var(--navy);
}
@media (max-height: 700px) {
  .role-entry { height: 140px; }
  .role-portrait { height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .role-entry, .role-panel, .role-ok, .role-pager > button { transition: none; }
}
.swap-row:disabled { opacity: 1; }
.bound-accounts .btn-ghost { display: flex; width: 100%; margin-top: 8px; }
