:root {
  --bg: #000000;
  --bg-soft: #090909;
  --panel: #111111;
  --panel-2: #181818;
  --line: rgba(234, 231, 212, 0.14);
  --text: #f4f0df;
  --muted: #a7a28e;
  --green: #25d695;
  --red: #ff5d63;
  --gold: #f2b84b;
  --cyan: #7de6f2;
  --ink: #0c0d0a;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  /* 责签：MiniMax-M3 / 2026-06-10 19:55:00 */
  /* 零基础注释：禁止选中/复制/下载 — 防爬防偷；用户复制按钮 / 拖拽等需要单独 opt-in */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* 表单输入框 / 聊天框等需要恢复可输入 */
input, textarea, [contenteditable="true"], .allow-select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 屏蔽图片右键下载（带 .protect-img 的图片右键无效） */
img.protect-img {
  -webkit-user-drag: none;
  pointer-events: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: #000;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* 管理员锁定：首页黑金背景美工动效已定稿。除非管理员明文要求修改，否则禁止改动 .hero-canvas 与 .home-shell::before 背景层。 */
.hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #000;
  opacity: 1;
  pointer-events: none;
}

.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.02) 46%, rgba(0, 0, 0, 0.58) 100%),
    radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.78), transparent 56%);
  pointer-events: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  background: transparent;
  backdrop-filter: none;
}

.trade-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 6, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(242, 184, 75, 0.55);
  border-radius: 8px;
  background: linear-gradient(135deg, #f2b84b, #25d695);
  color: #080806;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.nav-links > a,
.nav-item > button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 24px 0;
}

.ankh-nav-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.15);
  margin: 0 8px;
  vertical-align: middle;
}

.home-shell {
  --ankh-logo-row-height: 80px;
  --ankh-logo-title-gap: 50px;
}

.home-shell .site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  align-items: flex-start;
  padding: 0 40px;
  min-height: 0;
  height: var(--ankh-logo-row-height);
  border-bottom-color: transparent;
}

.ankh-wordmark {
  display: block;
  width: fit-content;
  height: auto;
  min-width: 0;
  padding: 0;
  color: transparent;
  background: linear-gradient(180deg, #ffe7a3 0%, #f2b84b 46%, #a86a17 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: inherit;
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(242, 184, 75, 0.22), 0 0 52px rgba(242, 184, 75, 0.08);
}

.home-shell .nav-links {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.home-shell .nav-links > a,
.home-shell .nav-item > button {
  position: relative;
  padding: 10px 0;
  color: rgba(244, 240, 223, 0.78);
  text-transform: uppercase;
  letter-spacing: 0;
  transition: color 180ms ease;
}

.home-shell .nav-links > a::after,
.home-shell .nav-item > button::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: 4px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(242, 184, 75, 0.16), rgba(255, 255, 255, 0.04));
  opacity: 0;
  filter: blur(8px);
  transform: scaleX(0.92);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.home-shell .nav-links > a:hover,
.home-shell .nav-item:hover > button,
.home-shell .nav-item:focus-within > button {
  color: var(--gold);
}

.home-shell .nav-links > a:hover::after,
.home-shell .nav-item:hover > button::after,
.home-shell .nav-item:focus-within > button::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-links > a:hover,
.nav-item:hover > button,
.nav-item:focus-within > button {
  color: var(--text);
}

.nav-item {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 46px;
  left: -20px;
  display: grid;
  width: 340px;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 13, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 160ms ease;
}

.mega-menu.wide {
  width: 430px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu a {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.045);
}

.mega-menu a:hover {
  background: rgba(37, 214, 149, 0.12);
}

.mega-menu b {
  color: var(--text);
}

.mega-menu span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.nav-cta,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.nav-cta,
.primary-action {
  background: var(--gold);
  color: var(--ink);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(244, 240, 223, 0.06);
}

.hero-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  gap: min(6vw, 64px);
  align-items: start;
  min-height: calc(100vh - 72px);
  padding: 120px 6vw 72px;
}

.home-shell .hero-screen {
  min-height: 100vh;
  padding-top: calc(var(--ankh-logo-row-height) + var(--ankh-logo-title-gap));
}

.hero-copy {
  max-width: 860px;
  padding-top: 0;
}

.eyebrow,
.section-heading p,
.section-kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
}

.ankh-title {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: clamp(48px, 8.2vw, 120px);
  line-height: 0.94;
  letter-spacing: 0;
}

/* 管理员锁定：四行 ANKH 主标题位置必须稳定，只允许光感变化，不允许再加上下漂移动画。 */
.ankh-title span {
  display: block;
  width: fit-content;
  align-items: baseline;
  gap: 0;
  padding: 0 0 0.08em;
  margin-bottom: -0.08em;
  line-height: 1;
  color: transparent;
  background:
    linear-gradient(
      100deg,
      rgba(255, 244, 199, 0) 0%,
      rgba(255, 244, 199, 0) 39%,
      rgba(255, 244, 199, 0.98) 48%,
      rgba(255, 211, 103, 0.62) 55%,
      rgba(255, 244, 199, 0) 68%,
      rgba(255, 244, 199, 0) 100%
    ),
    linear-gradient(
      180deg,
      #ffe7a3 0%,
      #f2b84b 46%,
      #a86a17 100%
    );
  background-size: var(--title-sweep-size, 220%) 100%, 100% 100%;
  background-position: var(--title-sweep-x, 145%) 0, 0 0;
  background-clip: text;
  -webkit-background-clip: text;
  background-blend-mode: screen, normal;
  overflow: visible;
  text-shadow: 0 0 26px rgba(242, 184, 75, 0.15), 0 0 56px rgba(242, 184, 75, 0.06);
  animation: ankhGlow 8s ease-in-out infinite;
}

.ankh-title b {
  display: inline-block;
  margin-right: 0;
  font-size: 1.08em;
  animation: ankhLetter 9s ease-in-out infinite;
}

.hero-subtitle {
  margin: 18px 0 0;
  max-width: 760px;
  color: #dad4bd;
  font-size: clamp(18px, 2.1vw, 28px);
  line-height: 1.45;
}

.executive-subtitle {
  max-width: 920px;
  color: rgba(232, 226, 206, 0.82);
}

.subtitle-line {
  display: block;
}

.subtitle-modules {
  margin-bottom: 6px;
  color: rgba(255, 219, 129, 0.92);
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions a {
  min-width: 148px;
}

.market-strip,
.index-panel,
.book-area,
.order-panel,
.chart-area {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 20, 14, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.market-strip {
  padding: 21px;
}

.market-cluster {
  display: grid;
  grid-template-columns: minmax(116px, 0.32fr) minmax(340px, 1fr);
  gap: 12px;
  align-self: start;
}

.profit-ladder {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid rgba(242, 184, 75, 0.14);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.66);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.ladder-title {
  margin-bottom: 8px;
  color: rgba(255, 219, 129, 0.88);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ladder-rows {
  display: grid;
  gap: 6px;
}

.ladder-row {
  display: grid;
  gap: 2px;
  min-height: 54px;
  border-top: 1px solid rgba(242, 184, 75, 0.1);
  padding-top: 7px;
}

.ladder-row b {
  overflow: hidden;
  color: rgba(244, 240, 223, 0.88);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ladder-row span {
  color: #75f0a4;
  font-size: 12px;
  font-weight: 900;
}

.sovereign-strip {
  background: rgba(5, 5, 5, 0.64);
  border-color: rgba(242, 184, 75, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 18px 60px rgba(0, 0, 0, 0.45);
  align-self: start;
}

.strip-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 18px;
}

.strip-title strong {
  color: var(--gold);
}

.ticker-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  min-height: 75px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: #ddd8c2;
  font-size: 21px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.ticker-row:hover,
.ticker-row:focus-visible {
  color: #fff7d7;
  background: rgba(242, 184, 75, 0.08);
  outline: none;
  transform: translateX(-2px);
}

.ticker-row b {
  font-size: 1.08em;
}

.ticker-row span,
.up-text {
  color: var(--green);
}

.ticker-row.down span,
.down-text {
  color: var(--red);
}

.ticker-row.ank span {
  color: var(--gold);
}

.business-band,
.split-band,
.module-stack {
  padding: 92px 6vw;
  background: rgba(0, 0, 0, 0.96);
  border-top: 1px solid var(--line);
}

.business-band.muted {
  background: rgba(8, 8, 8, 0.98);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2,
.split-band h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.feature-grid,
.flow-grid,
.stack-list {
  display: grid;
  gap: 14px;
}

.feature-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid article,
.stack-list article {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.feature-grid span {
  color: var(--gold);
  font-weight: 900;
}

.feature-grid h3,
.stack-list h3 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.feature-grid p,
.stack-list p,
.split-band p {
  color: var(--muted);
  line-height: 1.65;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 56px;
  align-items: center;
}

.platform-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 6vw 88px;
  background: #000;
}

.platform-map article {
  min-height: 250px;
  padding: 24px;
  border: 1px solid rgba(242, 184, 75, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

.platform-map span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.platform-map h2 {
  margin: 18px 0 12px;
  font-size: 24px;
  line-height: 1.1;
}

.platform-map p {
  color: var(--muted);
  line-height: 1.65;
}

.index-panel {
  padding: 22px;
}

.index-price {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}

.index-price span {
  color: var(--muted);
}

.index-price strong {
  color: var(--gold);
  font-size: 42px;
}

.pressure-line {
  display: grid;
  grid-template-columns: 96px 1fr 48px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
}

.pressure-line i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.pressure-line.sell i {
  background: var(--red);
}

.flow-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.flow-grid article {
  display: grid;
  gap: 16px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 8, 6, 0.56);
}

.flow-grid b {
  color: var(--gold);
  font-size: 28px;
}

.flow-grid span {
  line-height: 1.45;
}

.stack-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack-list.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-list.compact article {
  min-height: 150px;
}

.badge-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.badge-wall span {
  display: grid;
  min-height: 88px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(242, 184, 75, 0.18), rgba(37, 214, 149, 0.12));
  color: var(--text);
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 6vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #000;
}

.site-footer a {
  color: var(--gold);
  font-weight: 800;
}

@keyframes ankhGlow {
  0%, 100% {
    text-shadow: 0 0 22px rgba(242, 184, 75, 0.12), 0 0 48px rgba(242, 184, 75, 0.05);
  }
  50% {
    text-shadow: 0 0 30px rgba(242, 184, 75, 0.22), 0 0 66px rgba(242, 184, 75, 0.08);
  }
}

@keyframes ankhLetter {
  0%, 100% {
    text-shadow: 0 0 24px rgba(242, 184, 75, 0.12);
  }
  50% {
    text-shadow: 0 0 36px rgba(242, 184, 75, 0.32);
  }
}

.trade-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(246, 199, 90, 0.08), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(255, 92, 138, 0.07), transparent 28%),
    #020302;
}

.trade-topbar {
  min-height: 50px;
  padding: 7px 10px 0;
  gap: 0;
  border-bottom-color: rgba(246, 199, 90, 0.1);
  background: rgba(2, 3, 4, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 18px 54px rgba(0, 0, 0, 0.42);
}

.compact-brand {
  display: none;
}

.symbol-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.symbol-select select,
.order-panel input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0a;
  color: var(--text);
}

.symbol-select select {
  height: 38px;
  padding: 0 12px;
}

.market-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(102px, 1fr));
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.top-metric {
  display: none;
}

.market-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(244, 240, 223, 0.065);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(244, 240, 223, 0.045), rgba(244, 240, 223, 0.018));
  color: var(--text);
  text-align: left;
  padding: 0 10px;
}

.market-chip strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.market-chip.active {
  border-color: rgba(246, 199, 90, 0.64);
  background: linear-gradient(180deg, rgba(246, 199, 90, 0.18), rgba(117, 240, 164, 0.055));
  box-shadow: 0 0 18px rgba(246, 199, 90, 0.08) inset;
}

.ank-chip {
  border-color: rgba(37, 214, 149, 0.36);
}

.chart-area {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.chart-toolbar {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.panel-head span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.time-tabs {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.chart-time-tabs {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  padding: 4px;
  border: 1px solid rgba(246, 199, 90, 0.16);
  border-radius: 8px;
  background: rgba(5, 7, 8, 0.76);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

.chart-zoom-controls {
  display: flex;
  gap: 3px;
  margin-right: 8px;
}

.chart-zoom-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(244, 240, 223, 0.035);
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  display: grid;
  place-items: center;
  transition: all 140ms ease;
  padding: 0;
  line-height: 1;
}

.chart-zoom-controls button:hover {
  color: var(--gold);
  border-color: rgba(242, 184, 75, 0.3);
  background: rgba(242, 184, 75, 0.08);
}

.time-tabs button {
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
}

.time-tabs button.active {
  color: var(--ink);
  border-color: rgba(255, 240, 138, 0.76);
  background: linear-gradient(135deg, #fff08a, #f6c75a 48%, #75f0a4);
  box-shadow: 0 0 18px rgba(117, 240, 164, 0.18);
}

.kline-canvas {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-bottom: 1px solid rgba(246, 199, 90, 0.12);
  cursor: crosshair;
}

.price-axis-slider {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  z-index: 8;
  width: 16px;
  min-height: 120px;
  border-left: 1px solid rgba(156, 207, 192, 0.28);
  background: rgba(12, 16, 17, 0.7);
  cursor: ns-resize;
  touch-action: none;
}

.price-axis-slider:focus-visible {
  outline: 1px solid #9ccfc0;
  outline-offset: -1px;
}

.price-axis-handle {
  position: absolute;
  left: 3px;
  top: var(--price-axis-handle-top, 50%);
  width: 9px;
  height: var(--price-axis-handle-height, 42px);
  border: 1px solid rgba(255, 240, 138, 0.68);
  border-radius: 3px;
  background: #2f6f61;
  transform: translateY(-50%);
  pointer-events: none;
}

.chart-pair-overlay {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(246, 199, 90, 0.12);
  border-radius: 8px;
  background: rgba(4, 6, 7, 0.62);
  backdrop-filter: blur(12px);
}

.chart-pair-overlay h1 {
  margin: 0;
  font-size: 18px;
}

.chart-pair-overlay strong {
  color: #fff08a;
  font-size: 19px;
  text-shadow: 0 0 18px rgba(246, 199, 90, 0.24);
}

.chart-pair-overlay span {
  font-size: 12px;
}

.trade-ticket {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 0;
  border-top: 1px solid rgba(246, 199, 90, 0.12);
  border-radius: 0;
  background: #000;
}

/* 中文注释：旧 ticket-grid 四列已废弃；底条改 ticket-primary-row + ticket-controls */
.ticket-grid {
  display: contents;
  grid-column: auto;
}

.leverage-select {
  font-weight: 900;
  color: #fff08a;
  text-align: center;
}

.margin-preview {
  grid-column: auto;
  grid-row: auto;
  display: flex;
  width: 100%;
  justify-self: stretch;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-height: 18px;
  color: rgba(244, 240, 223, 0.68);
  font-size: 12px;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}

.trade-mode-status {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(246, 199, 90, 0.72);
  border-radius: 8px;
  background: #f6c75a;
  color: #10110d;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.trade-mode-status.real { background: #ffe879; border-color: #fff3a8; color: #07120b; }

.margin-preview strong { color: #fff08a; }
.margin-preview .danger { color: #ff8aa8; }
.margin-preview .danger-link {
  min-height: 17px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #ff8aa8;
  padding: 0;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.amount-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  height: 42px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 223, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.9);
}

.amount-input-shell > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 40px;
  padding: 0 8px;
  background: rgba(246, 199, 90, 0.11);
  color: rgba(255, 240, 138, 0.82);
  font-size: 11px;
  font-weight: 900;
}

.amount-input-shell .ticket-input {
  height: 40px;
  border: 0;
  border-radius: 0;
}
.position-metric { display: block; margin-top: 2px; color: rgba(244, 240, 223, 0.56); font-size: 9px; line-height: 1.25; }

.ticket-input {
  height: 44px;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(244, 240, 223, 0.13);
  border-radius: 8px;
  background: rgba(12, 14, 14, 0.92);
  color: var(--text);
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.amount-presets button,
.ticket-actions button {
  min-height: 44px;
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 240, 223, 0.062), rgba(244, 240, 223, 0.026));
  color: var(--text);
}

.amount-presets button {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  min-width: 0;
  padding: 3px 4px;
  line-height: 1.05;
}

.amount-presets button strong {
  color: #fff08a;
  font-size: 11px;
}

.amount-presets button span {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-actions {
  display: grid;
  grid-template-columns: minmax(84px, 1fr) minmax(84px, 1fr) minmax(104px, 1.05fr) minmax(116px, 1.16fr);
  gap: 6px;
}

.ticket-actions button {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
}

.position-summary {
  grid-column: 1;
  justify-self: stretch;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid rgba(246, 199, 90, 0.2);
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.035);
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  line-height: 1.15;
}

.position-summary > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-open-hint {
  color: rgba(255, 240, 138, 0.68);
  font-size: 9px;
  font-weight: 700;
}

.position-summary.long {
  color: #75f0a4;
  border-color: rgba(117, 240, 164, 0.3);
}

.position-summary.short {
  color: #ff7aa2;
  border-color: rgba(255, 92, 138, 0.3);
}

.ticket-actions .buy {
  border-color: rgba(117, 240, 164, 0.5);
  background: linear-gradient(135deg, rgba(255, 240, 138, 0.2), rgba(117, 240, 164, 0.18));
  color: #dcffd2;
}

.ticket-actions .sell {
  border-color: rgba(255, 92, 138, 0.5);
  background: linear-gradient(135deg, rgba(255, 154, 184, 0.18), rgba(255, 72, 102, 0.14));
  color: #ffd4df;
}

.ticket-actions .close {
  border-color: rgba(246, 199, 90, 0.5);
  background: rgba(246, 199, 90, 0.13);
  color: #fff08a;
}

.ticket-actions .close-all {
  border-color: rgba(255, 154, 184, 0.4);
  background: rgba(255, 92, 138, 0.1);
  color: #ffb4c8;
}

.ticket-actions .buy:hover {
  background: linear-gradient(135deg, rgba(255, 240, 138, 0.28), rgba(117, 240, 164, 0.24));
}

.ticket-actions .sell:hover {
  background: linear-gradient(135deg, rgba(255, 154, 184, 0.28), rgba(255, 72, 102, 0.22));
}

.ticket-actions .close:hover,
.ticket-actions .close-all:hover {
  background: rgba(246, 199, 90, 0.2);
}

.trade-toast-canvas {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
}

.position-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: block;
  background: rgba(0, 0, 0, 0.58);
}

.position-modal[hidden] {
  display: none;
}

.contract-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.contract-modal[hidden] { display: none; }

.contract-window {
  width: 65vw;
  height: 75vh;
  min-width: min(680px, calc(100vw - 24px));
  min-height: min(480px, calc(100vh - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(246, 199, 90, 0.34);
  border-radius: 8px;
  background: #070806;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.76);
}

.contract-window > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(246, 199, 90, 0.18);
}

.contract-window > header > div { display: grid; gap: 3px; }
.contract-window > header strong { color: #fff08a; font-size: 16px; }
.contract-window > header span { color: rgba(244, 240, 223, 0.52); font-size: 10px; }
.contract-window > header button { width: 34px; height: 34px; border: 1px solid rgba(244, 240, 223, 0.14); border-radius: 6px; background: transparent; color: var(--text); font-size: 20px; }
.contract-window > header button:disabled { opacity: 0.32; cursor: not-allowed; }

.contract-scroll {
  overflow: auto;
  padding: 18px 22px 28px;
  color: rgba(244, 240, 223, 0.82);
  line-height: 1.72;
  scrollbar-gutter: stable;
}

.contract-section { padding: 0 0 18px; border-bottom: 1px solid rgba(244, 240, 223, 0.08); }
.contract-section + .contract-section { padding-top: 18px; }
.contract-section h2 { margin: 0 0 8px; color: #fff08a; font-size: 14px; letter-spacing: 0; }
.contract-section p { margin: 0; font-size: 12px; }

.contract-window > footer {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(246, 199, 90, 0.18);
  background: rgba(246, 199, 90, 0.035);
}

.contract-requirements { display: flex; justify-content: space-between; gap: 12px; color: rgba(244, 240, 223, 0.62); font-size: 11px; }
.contract-requirements .satisfied { color: #75f0a4; }
.contract-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: 12px; line-height: 1.45; }
.contract-consent input { margin-top: 3px; accent-color: #f6c75a; }
.contract-recovery-saved { padding: 10px 12px; border: 1px solid rgba(117, 240, 164, 0.26); border-radius: 6px; background: rgba(117, 240, 164, 0.06); }
.contract-recovery-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.contract-recovery-actions[hidden] { display: none; }
.contract-recovery-actions .contract-accept { width: 100%; padding: 7px 10px; }
.contract-accept { min-height: 38px; border: 1px solid rgba(246, 199, 90, 0.42); border-radius: 6px; background: #f6c75a; color: #10110d; font-weight: 900; }
.contract-accept:disabled { opacity: 0.38; cursor: not-allowed; }
.contract-status { min-height: 16px; margin: 0; color: #ffb4c8; font-size: 11px; }

.simulation-funds-modal {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.74);
}

.simulation-funds-modal[hidden] { display: none; }

.simulation-funds-window {
  width: min(520px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(246, 199, 90, 0.32);
  border-radius: 8px;
  background: #080907;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.66);
}

.simulation-funds-window header { display: flex; align-items: center; justify-content: space-between; }
.simulation-funds-window header strong { color: #fff08a; }
.simulation-funds-window header button { width: 32px; height: 32px; border: 1px solid rgba(244, 240, 223, 0.14); border-radius: 6px; background: transparent; color: var(--text); font-size: 20px; }
.simulation-funds-window label { color: rgba(244, 240, 223, 0.76); font-size: 12px; }
.simulation-funds-window input { height: 42px; border: 1px solid rgba(246, 199, 90, 0.24); border-radius: 6px; background: #000; color: var(--text); padding: 0 12px; }
.simulation-funds-window > p { margin: 0; color: #ffcf79; font-size: 12px; line-height: 1.55; }
.simulation-funds-projection { display: grid; gap: 6px; }
.simulation-funds-projection span { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 32px; border-bottom: 1px solid rgba(244, 240, 223, 0.1); }
.simulation-funds-projection small { color: rgba(244, 240, 223, 0.64); }
.simulation-funds-projection strong { color: #fff08a; font-variant-numeric: tabular-nums; }
.simulation-funds-window > button { min-height: 40px; border: 1px solid rgba(246, 199, 90, 0.5); border-radius: 6px; background: #f6c75a; color: #10110d; font-weight: 900; }
.simulation-funds-window > button:disabled { opacity: 0.4; cursor: not-allowed; }
#simulationFundsStatus { min-height: 16px; color: #ffb4c8; }

/* 中文注释：注册后永久双轨选型弹窗，遮罩不可点空白关闭，避免跳过选型。 */
.mode-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.82);
}

.mode-choice-modal[hidden] { display: none; }

.mode-choice-window {
  width: min(560px, calc(100vw - 24px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(246, 199, 90, 0.38);
  border-radius: 8px;
  background: #080907;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
}

.mode-choice-window header strong { color: #fff08a; font-size: 18px; }
.mode-choice-window > p { margin: 0; color: rgba(244, 240, 223, 0.82); font-size: 13px; line-height: 1.55; }
.mode-choice-actions { display: grid; gap: 10px; }
.mode-choice-actions button {
  min-height: 44px;
  border-radius: 6px;
  font-weight: 800;
  padding: 0 14px;
}
#selectSimulationMode {
  border: 1px solid rgba(37, 214, 149, 0.5);
  background: linear-gradient(180deg, #1f8f63, #156b4a);
  color: #f4f0df;
}
#selectRealMode {
  border: 1px solid rgba(246, 199, 90, 0.5);
  background: #f6c75a;
  color: #10110d;
}
#selectRealMode:disabled,
#selectSimulationMode:disabled { opacity: 0.42; cursor: not-allowed; }
.mode-choice-hint { color: #ffcf79 !important; font-size: 12px !important; }

/* 中文注释：底条模式状态可点；说明窗 + 底部入金钮 */
.trade-shell .ticket-primary-row > .trade-mode-status,
.trade-mode-status {
  cursor: pointer !important;
  user-select: none !important;
}
.mode-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 286;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.78);
}
.mode-rules-modal[hidden] { display: none; }
.mode-rules-window {
  width: min(440px, calc(100vw - 24px));
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 10px;
  background: #050606;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  color: #f5f4e8;
  overflow: hidden;
}
.mode-rules-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mode-rules-window header strong {
  color: #fff08a;
  font-size: 17px;
}
.mode-rules-window header button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(244, 240, 223, 0.16);
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.05);
  color: #f5f4e8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.mode-rules-body {
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}
.mode-rules-current {
  margin: 0 0 10px;
  color: #fff08a;
  font-size: 14px;
  font-weight: 800;
}
.mode-rules-list {
  margin: 0;
  padding-left: 1.15em;
  color: rgba(244, 240, 223, 0.86);
  font-size: 13px;
  line-height: 1.55;
}
.mode-rules-list li { margin: 0 0 8px; }
.mode-rules-footer {
  display: flex;
  justify-content: stretch;
}
.mode-rules-footer .wallet-primary,
#modeRulesDeposit {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(246, 199, 90, 0.55);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffe27a, #f6c75a);
  color: #10110d;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}
#modeRulesDeposit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#modeChoiceStatus { min-height: 16px; color: #ffb4c8; font-size: 12px; }

@media (max-width: 720px) {
  .contract-window { width: calc(100vw - 16px); height: calc(100vh - 16px); min-width: 0; min-height: 0; }
  .contract-scroll { padding: 14px 14px 24px; }
  .contract-window > footer { padding: 10px 12px; }
  .contract-requirements { flex-direction: column; gap: 3px; }
  .contract-recovery-actions { grid-template-columns: minmax(0, 1fr); }
  .mode-choice-window { width: calc(100vw - 16px); }
}

/* === 20260726 最后覆盖：底栏无条件单行、相邻控件固定 5px，绝不扩成第二行 === */
.trade-shell .trade-ticket {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
.trade-shell .ticket-primary-row,
.trade-shell .ticket-primary-row.ticket-row-main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  height: 48px !important;
  min-height: 48px !important;
  overflow: visible !important;
  white-space: nowrap !important;
}
.trade-shell .ticket-primary-row > *,
.trade-shell .ticket-primary-row > .position-cluster,
.trade-shell .ticket-primary-row > .ticket-actions,
.trade-shell .ticket-primary-row > .amount-presets,
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
}
.trade-shell .ticket-primary-row > .position-cluster,
.trade-shell .ticket-primary-row > .ticket-actions,
.trade-shell .ticket-primary-row > .amount-presets {
  display: flex !important;
  flex-direction: row !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button {
  flex: 0 0 132px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 48px !important;
}
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  display: block !important;
  width: max-content !important;
  max-width: none !important;
  height: 48px !important;
  white-space: nowrap !important;
}

/* === 20260726 底栏绝对单行终态：所有控件固定相邻 5px，任何视口/缩放均禁止换第二行 === */
.trade-shell .ticket-primary-row,
.trade-shell .ticket-primary-row.ticket-row-main {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  height: 48px !important;
  min-height: 48px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
}
.trade-shell .ticket-primary-row > * {
  flex: 0 0 auto !important;
  margin: 0 !important;
}
.trade-shell .ticket-primary-row > .position-cluster {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 5px !important;
  width: max-content !important;
}
.trade-shell .ticket-primary-row > .ticket-actions {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 0 !important;
}
.trade-shell .ticket-primary-row > .amount-presets {
  display: flex !important;
  flex-flow: row nowrap !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button {
  flex: 0 0 132px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
}
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  flex: 0 0 auto !important;
  width: max-content !important;
  height: 48px !important;
  white-space: nowrap !important;
}

.position-window {
  position: absolute;
  width: min(780px, calc(100vw - 16px));
  height: min(520px, calc(100vh - 16px));
  min-width: min(560px, calc(100vw - 16px));
  min-height: min(300px, calc(100vh - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 8px;
  background: rgba(8, 9, 6, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.position-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
  cursor: move;
  user-select: none;
}

.position-window header button,
.position-window header select {
  cursor: pointer;
}

.position-tabs {
  display: flex;
  gap: 6px;
}

.position-tabs button,
.position-modal-close {
  min-height: 34px;
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.04);
  color: var(--muted);
  padding: 0 12px;
}

.position-tabs button.active {
  background: rgba(246, 199, 90, 0.16);
  color: #fff08a;
}

.position-modal-close {
  width: 34px;
  padding: 0;
  color: var(--text);
  font-size: 20px;
}

.position-table {
  display: grid;
  gap: 1px;
  max-height: 440px;
  overflow: auto;
  padding: 10px;
}

.position-table > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  background: rgba(244, 240, 223, 0.035);
  color: rgba(244, 240, 223, 0.82);
  font-size: 13px;
}

.position-history-table > div {
  grid-template-columns: 1.1fr 0.8fr 0.8fr 0.8fr 0.9fr 1fr 0.9fr 0.9fr;
}

.position-table > div.table-head {
  color: #fff08a;
  font-weight: 900;
}

.position-table > div.positive span:last-child {
  color: #75f0a4;
}

.position-table > div.negative span:last-child {
  color: #ff7aa2;
}

.lot-close-button {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 92, 138, 0.42);
  border-radius: 6px;
  background: rgba(255, 92, 138, 0.08);
  color: #ff9ab8;
  font-size: 18px;
  line-height: 1;
}

.lot-close-button:hover {
  background: rgba(255, 92, 138, 0.18);
  color: #fff;
}

.empty-record {
  margin: 0;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.trade-context-menu {
  position: fixed;
  z-index: 200;
  display: grid;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 8px;
  background: rgba(12, 13, 9, 0.96);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.45);
}

.trade-context-menu[hidden] {
  display: none;
}

.trade-context-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
}

.trade-context-menu button:hover {
  background: rgba(242, 184, 75, 0.12);
  color: var(--gold);
}

/* 中文注释：主图指标菜单与参数窗，沿用盘面右键菜单/模态的黑金风格，不引入新视觉体系 */
.indicator-menu {
  z-index: 210;
  min-width: 140px;
}

.indicator-menu button[data-active="1"] {
  color: var(--gold);
  background: rgba(242, 184, 75, 0.1);
}

.indicator-param-modal {
  position: fixed;
  inset: 0;
  z-index: 290;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.78);
}

.indicator-param-modal[hidden] {
  display: none;
}

.indicator-param-window {
  width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 8px;
  background: #050606;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  color: #f5f4e8;
}

.indicator-param-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
}

.indicator-param-window header strong {
  color: #fff08a;
  font-size: 14px;
}

#closeIndicatorParam {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 20px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.045);
  color: #f5f4e8;
}

.indicator-param-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.indicator-param-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(244, 240, 223, 0.86);
  font-size: 13px;
  cursor: pointer;
}

.indicator-param-fields {
  display: grid;
  gap: 8px;
}

.indicator-param-fields label {
  display: grid;
  gap: 4px;
  color: rgba(244, 240, 223, 0.64);
  font-size: 12px;
}

.indicator-param-fields input {
  min-height: 38px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.045);
  color: #f5f4e8;
  padding: 0 11px;
}

.indicator-param-fields input:focus {
  border-color: rgba(255, 240, 138, 0.65);
  outline: 2px solid rgba(242, 184, 75, 0.12);
}

.indicator-param-hint {
  margin: 0;
  color: rgba(244, 240, 223, 0.52);
  font-size: 12px;
  line-height: 1.45;
}

.indicator-param-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.indicator-param-footer button {
  min-height: 36px;
  min-width: 72px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.045);
  color: #f5f4e8;
  padding: 0 12px;
  cursor: pointer;
}

.indicator-param-apply {
  border-color: rgba(255, 240, 138, 0.7) !important;
  background: linear-gradient(135deg, #fff08a, #f6c75a 54%, #75f0a4) !important;
  color: #080908 !important;
  font-weight: 900;
}

/* 交易页二次定稿：页面纯黑、品种进主图下拉、成交量/多空条融合进主图，不再保留顶部品种条占高。 */
.trade-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.trade-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #000;
}

.trade-rail {
  display: grid;
  grid-auto-rows: 42px;
  align-content: start;
  gap: 6px;
  padding: 8px 6px;
  border-right: 1px solid rgba(246, 199, 90, 0.12);
  background: #000;
}

.trade-rail a,
.trade-rail button {
  display: grid;
  min-width: 0;
  place-items: center;
  border: 1px solid rgba(244, 240, 223, 0.08);
  border-radius: 7px;
  background: rgba(244, 240, 223, 0.035);
  color: rgba(244, 240, 223, 0.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-rail a:hover,
.trade-rail button:hover,
.trade-rail .active {
  color: #0a0701;
  border-color: rgba(255, 240, 138, 0.7);
  background: linear-gradient(135deg, #fff08a, #f6c75a 52%, #75f0a4);
}

.chart-area {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.kline-canvas {
  display: block;
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #000;
  cursor: crosshair;
  touch-action: none;
}

.chart-pair-overlay {
  top: 8px;
  left: 10px;
  z-index: 6;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.chart-pair-overlay strong {
  order: 0;
  min-width: 92px;
  color: #fff08a;
  font-size: 19px;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(246, 199, 90, 0.34);
}

.chart-pair-overlay select {
  order: 1;
  height: 31px;
  min-width: 132px;
  border: 1px solid rgba(246, 199, 90, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #f5f4e8;
  padding: 0 9px;
  font-weight: 900;
  outline: none;
}

.chart-pair-overlay h1 {
  order: 2;
  margin: 0;
  color: rgba(244, 240, 223, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.chart-pair-overlay span {
  order: 3;
  font-size: 12px;
  font-weight: 800;
}

.chart-time-tabs {
  /* 中文注释：默认 absolute 定位作废，改由 .chart-top-bar 内 static 排布，避免只露出 M1 */
  position: static;
  top: auto;
  right: auto;
  gap: 3px;
  padding: 2px;
  border-color: rgba(246, 199, 90, 0.12);
  background: rgba(0, 0, 0, 0.68);
  box-shadow: none;
}

/*
 * 中文注释：顶栏三块都要完整可见，禁止被 chart-area overflow 裁切。
 * 金额条与报价条：两个独立块，不融合；金额条在左、报价条紧挨其右（4px 缝）。
 * 周期 M1–W1：整组固定在右侧完整显示。
 */
.chart-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

.chart-top-bar > .wallet-strip,
.chart-top-bar > .chart-pair-overlay,
.chart-top-bar > .chart-time-tabs {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  pointer-events: auto;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
}

/* 中文注释：金额条独立块；与报价条仅相邻，不共用边框/背景 */
.chart-top-bar > .wallet-strip {
  order: 1;
  margin: 0 0 0 0 !important;
  z-index: 31;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  border: 1px solid rgba(246, 199, 90, 0.16) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, 0.86) !important;
  white-space: nowrap !important;
}

/* 中文注释：报价条独立块，紧挨金额条右缘 */
.chart-top-bar > .chart-pair-overlay {
  order: 2;
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 4px !important;
  padding: 2px 6px;
  border: 1px solid rgba(246, 199, 90, 0.14);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

/* 中文注释：周期条完整显示 M1–W1，推到最右侧，绝不裁切 */
.chart-top-bar > .chart-time-tabs {
  order: 3;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 3px;
  margin-left: auto !important;
  margin-right: 0 !important;
  padding: 2px;
  border: 1px solid rgba(246, 199, 90, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.78);
  white-space: nowrap;
  overflow: visible !important;
}

.chart-top-bar > .chart-time-tabs > button {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 auto !important;
  min-width: 34px;
  height: 25px;
  padding: 0 7px;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 兼容旧类名 */
.chart-top-right-row {
  position: static;
  display: contents;
}

/* 中文注释：H/V ± 独立第二行，右上完整可见 */
.chart-zoom-controls {
  position: absolute;
  top: 40px;
  right: 10px;
  z-index: 28;
  margin-right: 0;
  padding: 3px;
  border: 1px solid rgba(246, 199, 90, 0.14);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 3px;
  visibility: visible !important;
  opacity: 1 !important;
}

.chart-zoom-controls button {
  width: 32px;
  font-size: 11px;
}

.time-tabs button {
  height: 25px;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 12px;
}

.trade-ticket {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 0;
  border-top: 1px solid rgba(246, 199, 90, 0.12);
  background: #000;
}

/* 中文注释：四钮(各250) + 手数杠杆买卖比例 同一主行，只留这一行省高度 */
.ticket-primary-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.position-cluster {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, max-content));
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.position-summary,
.quant-diy-button,
.xpic-prediction-button,
.trade-mode-status {
  width: auto;
  min-width: 100px;
  max-width: 220px;
  min-height: 42px;
  box-sizing: border-box;
}
/* 中文注释：左侧栏 72px 后下单条必须整组落在视口内，禁止横向负偏移 */
.trade-shell .ticket-primary-row,
.trade-shell .ticket-row-main {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
.trade-shell .position-cluster {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: repeat(3, minmax(96px, max-content)) !important;
}

.position-summary {
  border-color: rgba(246, 199, 90, 0.18);
  background: rgba(244, 240, 223, 0.025);
  padding: 4px 8px;
  font-size: 11px;
  text-align: center;
  white-space: normal;
  display: grid;
  place-content: center;
  gap: 2px;
}

.quant-diy-button,
.xpic-prediction-button {
  border: 1px solid rgba(117, 240, 164, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(117, 240, 164, 0.16), rgba(246, 199, 90, 0.1));
  color: #dcffd2;
  font-size: 12px;
  font-weight: 900;
}

.xpic-prediction-button { border-color: rgba(246, 199, 90, 0.42); color: #fff08a; background: rgba(246, 199, 90, 0.1); }
.position-open-hint { font-size: 9px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }

.trade-mode-status {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(246, 199, 90, 0.72);
  border-radius: 8px;
  background: #f6c75a;
  color: #10110d;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  grid-column: auto;
  grid-row: auto;
  width: 250px;
  justify-self: auto;
}

.trade-mode-status.real { background: #ffe879; border-color: #fff3a8; color: #07120b; }

/* 中文注释：手数/杠杆/买卖/比例 紧跟四钮同一主行，不再用旧 ticket-grid 四列错位 */
.ticket-controls {
  display: grid;
  grid-template-columns: 110px 88px minmax(280px, 1.4fr) minmax(200px, 1fr);
  gap: 7px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-grid {
  grid-column: auto;
  display: contents;
}

.margin-preview {
  grid-column: auto;
  grid-row: auto;
  display: flex;
  width: 100%;
  justify-self: stretch;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-height: 18px;
  color: rgba(244, 240, 223, 0.68);
  font-size: 12px;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
}

/* 中文注释：金额条在顶栏内与报价条并排，宽度随内容，右缘紧贴报价条 */
.wallet-strip {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-height: 30px;
  padding: 3px 5px 3px 9px;
  border: 1px solid rgba(246, 199, 90, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.86);
  color: rgba(244, 240, 223, 0.64);
  font-size: 11px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.xpic-prediction-modal { position: fixed; inset: 0; z-index: 285; display: grid; place-items: center; padding: 12px; background: rgba(0, 0, 0, 0.8); }
.xpic-prediction-modal[hidden] { display: none; }
.xpic-prediction-window { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; border: 1px solid rgba(246, 199, 90, 0.34); border-radius: 8px; background: #050606; color: var(--text); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.76); }
.xpic-prediction-window header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid rgba(246, 199, 90, 0.14); }
.xpic-prediction-window header strong { color: #fff08a; }
.xpic-prediction-window header button { width: 32px; height: 32px; border: 1px solid rgba(244, 240, 223, 0.14); border-radius: 6px; background: transparent; color: var(--text); font-size: 20px; }
.xpic-prediction-state, .xpic-prediction-status { margin: 0; padding: 14px; color: rgba(244, 240, 223, 0.68); }
#xpicPredictionForm { display: grid; gap: 9px; padding: 13px; }
.xpic-prediction-question { margin: 0; color: #f5f4e8; font-weight: 850; line-height: 1.45; }
.xpic-prediction-meta { display: flex; justify-content: space-between; gap: 12px; color: #ffcf79; font-size: 12px; }
.xpic-prediction-window label { color: rgba(244, 240, 223, 0.64); font-size: 12px; }
.xpic-prediction-window input, .xpic-prediction-window select { min-height: 40px; border: 1px solid rgba(244, 240, 223, 0.14); border-radius: 6px; background: #000; color: var(--text); padding: 0 11px; }
.xpic-prediction-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xpic-prediction-outcomes button { min-height: 48px; border: 1px solid rgba(244, 240, 223, 0.14); border-radius: 6px; background: rgba(244, 240, 223, 0.04); color: var(--text); }
.xpic-prediction-outcomes button.active { border-color: #fff08a; background: rgba(246, 199, 90, 0.15); color: #fff08a; }
.xpic-prediction-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.xpic-prediction-preview span { display: grid; gap: 3px; min-width: 0; padding: 8px; border: 1px solid rgba(244, 240, 223, 0.1); border-radius: 6px; }
.xpic-prediction-preview small { color: rgba(244, 240, 223, 0.58); }
.xpic-prediction-preview strong { color: #fff08a; overflow-wrap: anywhere; }
#submitXpicPrediction { min-height: 42px; border: 1px solid rgba(246, 199, 90, 0.54); border-radius: 6px; background: #f6c75a; color: #10110d; font-weight: 950; }
#submitXpicPrediction:disabled { opacity: 0.4; cursor: not-allowed; }

.ticket-grid {
  grid-column: auto;
  display: contents;
}

.ticket-controls {
  display: grid;
  grid-template-columns: 110px 88px minmax(280px, 1.4fr) minmax(200px, 1fr);
  gap: 7px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-input {
  height: 42px;
  border-color: rgba(244, 240, 223, 0.11);
  background: rgba(0, 0, 0, 0.9);
}

.ticket-actions {
  grid-template-columns: minmax(78px, 1fr) minmax(78px, 1fr) minmax(98px, 1.05fr) minmax(112px, 1.12fr);
}

.amount-presets button,
.ticket-actions button {
  min-height: 42px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 240, 223, 0.055), rgba(244, 240, 223, 0.018));
}

.ticket-actions .buy {
  border-color: rgba(117, 240, 164, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 240, 138, 0.2), rgba(117, 240, 164, 0.28)),
    linear-gradient(135deg, #263a23, #2c6d47);
  color: #e8ffdc;
  box-shadow: 0 0 0 1px rgba(255, 240, 138, 0.08) inset, 0 10px 26px rgba(117, 240, 164, 0.12);
}

.ticket-actions .sell {
  border-color: rgba(255, 92, 138, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 154, 184, 0.24), rgba(255, 72, 102, 0.28)),
    linear-gradient(135deg, #42182a, #7d2144);
  color: #ffe1ea;
  box-shadow: 0 0 0 1px rgba(255, 154, 184, 0.1) inset, 0 10px 26px rgba(255, 92, 138, 0.12);
}

.ticket-actions .close,
.ticket-actions .close-all {
  background: linear-gradient(180deg, rgba(246, 199, 90, 0.14), rgba(246, 199, 90, 0.045));
}

.position-window {
  width: min(1020px, calc(100vw - 16px));
  height: min(620px, calc(100vh - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.position-window header {
  gap: 8px;
}

.position-stats-line {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  color: rgba(244, 240, 223, 0.7);
  font-size: 11px;
}

.position-stats-line span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(244, 240, 223, 0.08);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.035);
  padding: 0 7px;
  white-space: nowrap;
}

.position-stats-line.positive span:first-child {
  color: #75f0a4;
}

.position-stats-line.negative span:first-child {
  color: #ff7aa2;
}

.position-header-actions {
  display: flex;
  gap: 6px;
}

.position-header-actions button {
  min-height: 32px;
  border: 1px solid rgba(246, 199, 90, 0.22);
  border-radius: 6px;
  background: rgba(246, 199, 90, 0.08);
  color: #fff08a;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.position-table > div {
  grid-template-columns: 0.72fr 0.5fr 0.72fr 0.9fr 0.9fr 0.82fr 0.78fr 0.46fr;
}

.position-history-table > div {
  grid-template-columns: 1.35fr 0.58fr 0.58fr 0.58fr 0.72fr 0.82fr 0.72fr 0.78fr;
}

.quant-modal,
.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
}

.quant-modal[hidden],
.payment-modal[hidden] {
  display: none;
}

.quant-window,
.payment-window {
  width: min(920px, calc(100vw - 32px));
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.payment-window {
  width: min(440px, calc(100vw - 32px));
}

.quant-window header,
.payment-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
}

.quant-window header strong,
.payment-window header strong {
  color: #fff08a;
}

.quant-window select,
.quant-window textarea,
.quant-window button,
.payment-window button {
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 7px;
  background: rgba(244, 240, 223, 0.045);
  color: var(--text);
}

.quant-window select {
  height: 34px;
  margin-left: auto;
  padding: 0 10px;
}

.quant-window header button,
.payment-window header button {
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.quant-chat-log {
  display: grid;
  gap: 8px;
  height: 260px;
  overflow: auto;
  padding: 12px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.1);
}

.quant-chat-log p {
  margin: 0;
  max-width: 78%;
  border: 1px solid rgba(244, 240, 223, 0.09);
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.04);
  padding: 10px;
  color: rgba(244, 240, 223, 0.78);
  line-height: 1.45;
}

.quant-chat-log p.user {
  justify-self: end;
  border-color: rgba(117, 240, 164, 0.22);
  color: #dcffd2;
}

.quant-window textarea {
  display: block;
  width: calc(100% - 24px);
  margin: 12px;
  resize: vertical;
  padding: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.quant-actions,
.payment-provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
}

.quant-actions button,
.payment-provider-list button {
  min-height: 38px;
  padding: 0 12px;
  font-weight: 900;
}

.quant-sim-state,
.payment-window p {
  margin: 0;
  padding: 0 12px 14px;
  color: rgba(244, 240, 223, 0.62);
  font-size: 13px;
}

/* 中文注释：金额条改由 .chart-top-bar 承载，禁止 absolute 拉回最左 */
.wallet-strip {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-height: 30px;
  padding: 3px 5px 3px 9px;
  border: 1px solid rgba(246, 199, 90, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.86);
  color: rgba(244, 240, 223, 0.64);
  font-size: 11px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.wallet-strip strong { color: #f5f4e8; font-size: 12px; }
.wallet-strip .wallet-mode { color: #f2b84b; }
.wallet-strip .wallet-mode.unlocked { color: #25d695; }
.wallet-strip button {
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 5px;
  background: rgba(244, 240, 223, 0.05);
  color: #f5f4e8;
  font-size: 11px;
}
.wallet-strip button:hover { border-color: rgba(242, 184, 75, 0.42); color: #fff08a; }
.wallet-strip .wallet-account {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-color: rgba(242, 184, 75, 0.34);
  color: #fff08a;
}
.wallet-strip .wallet-account.signed-in { border-color: rgba(37, 214, 149, 0.36); color: #75f0a4; }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.78);
}
.auth-modal[hidden] { display: none; }
.auth-window {
  width: min(420px, calc(100vw - 24px));
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 8px;
  background: #050606;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  color: #f5f4e8;
}
.auth-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
}
.auth-window header strong { color: #fff08a; font-size: 14px; }
.auth-window button,
.auth-window input {
  min-height: 38px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.045);
  color: #f5f4e8;
  padding: 0 11px;
}
#closeAuth { width: 34px; min-height: 34px; padding: 0; font-size: 20px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 12px 12px 0; }
.auth-tabs button.active,
.auth-primary {
  border-color: rgba(255, 240, 138, 0.7) !important;
  background: linear-gradient(135deg, #fff08a, #f6c75a 54%, #75f0a4) !important;
  color: #080908 !important;
  font-weight: 900;
}
#authForm { display: grid; gap: 7px; padding: 12px; }
#authForm label { color: rgba(244, 240, 223, 0.64); font-size: 12px; }
#authForm input:focus { border-color: rgba(255, 240, 138, 0.65); outline: 2px solid rgba(242, 184, 75, 0.12); }
#authSubmit { margin-top: 5px; }
/* 中文注释：邮箱登录仅接收用户自有邮箱，页面不生成或分配站内邮箱。 */
.auth-email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}
.auth-email-row input { width: 100%; min-width: 0; }
.auth-secondary.auth-inline {
  margin: 0;
  white-space: nowrap;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
#authEmailLogin,
#authRestoreKey,
#authDownloadKey {
  margin: 0;
  width: 100%;
  font-weight: 700;
}
#authSignedIn #authDownloadKey { margin: 0 12px 8px; width: calc(100% - 24px); }
#authSignedIn #authLogout { margin-top: 0; }
.auth-rule { margin: 0; padding: 0 12px 12px; color: rgba(244, 240, 223, 0.58); font-size: 12px; line-height: 1.55; }
.auth-current { margin: 0; padding: 16px 12px 8px; color: rgba(244, 240, 223, 0.72); }
.auth-current strong { display: block; margin-top: 5px; color: #75f0a4; overflow-wrap: anywhere; }
.auth-secondary { margin: 0 12px 12px; }
.auth-status { min-height: 18px; margin: 0; padding: 0 12px 12px; color: rgba(244, 240, 223, 0.68); font-size: 12px; }
.auth-status.error { color: #ff8e92; }
.auth-status.success { color: #75f0a4; }
.auth-status.pending { color: #fff08a; }

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
}
.wallet-modal[hidden] { display: none; }
.wallet-window {
  width: min(620px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid rgba(242, 184, 75, 0.24);
  border-radius: 8px;
  background: #050606;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
}
.wallet-window header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
  background: #050606;
}
.wallet-tabs { display: flex; gap: 4px; }
.wallet-window button,
.wallet-window input,
.wallet-window select {
  min-height: 34px;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 6px;
  background: rgba(244, 240, 223, 0.045);
  color: #f5f4e8;
  padding: 0 10px;
}
.wallet-tabs button.active,
.wallet-window .wallet-primary {
  border-color: rgba(255, 240, 138, 0.7);
  background: linear-gradient(135deg, #fff08a, #f6c75a 54%, #75f0a4);
  color: #080908;
  font-weight: 900;
}
#closeWalletModal { width: 34px; padding: 0; font-size: 20px; }
.wallet-window > section { display: grid; gap: 10px; padding: 14px; }
.wallet-window > section[hidden] { display: none; }
.wallet-form-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 10px; }
.wallet-form-row label { color: rgba(244, 240, 223, 0.62); font-size: 12px; }
.wallet-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(37, 214, 149, 0.22);
  border-radius: 7px;
  background: rgba(37, 214, 149, 0.05);
}
.wallet-result[hidden] { display: none; }
.wallet-result code { grid-column: 1 / -1; color: #75f0a4; overflow-wrap: anywhere; }
.wallet-result span { color: rgba(244, 240, 223, 0.68); font-size: 12px; }
.wallet-notice { min-height: 18px; margin: 0; color: rgba(244, 240, 223, 0.68); font-size: 12px; }
.withdrawal-rows { display: grid; gap: 6px; }
.withdrawal-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 240, 223, 0.09);
  border-radius: 6px;
  color: rgba(244, 240, 223, 0.7);
  font-size: 12px;
}
.withdrawal-row strong { color: #f5f4e8; }
.withdrawal-row code { color: #75f0a4; }

@media (max-width: 720px) {
  .chart-top-bar {
    left: 8px;
    right: 8px;
    max-width: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }
  .wallet-strip { flex-wrap: wrap; white-space: normal; }
  .wallet-strip .wallet-account { max-width: 130px; }
  .chart-top-bar > .chart-pair-overlay { margin-left: 0 !important; }
  .chart-top-bar > .chart-time-tabs { margin-left: 0 !important; }
  .chart-zoom-controls { top: 96px; right: 8px; }
  .ticket-primary-row { flex-wrap: wrap; }
  .position-cluster { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .position-summary,
  .quant-diy-button,
  .xpic-prediction-button,
  .trade-mode-status { width: 100%; min-width: 0; max-width: none; }
  .wallet-form-row { grid-template-columns: 1fr; gap: 5px; }
  .wallet-address-row input { font-size: 12px; }
  .withdrawal-row { grid-template-columns: 1fr auto; }
  .withdrawal-row code { grid-column: 1 / -1; }
}

.bdg-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(11, 14, 10, 0.96), #000 52%),
    radial-gradient(circle at 18% 0%, rgba(37, 214, 149, 0.14), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(242, 184, 75, 0.12), transparent 30%);
}

.bdg-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 4, 0.9);
  backdrop-filter: blur(18px);
}

.bdg-topbar .ankh-wordmark {
  font-size: 52px;
}

.bdg-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.bdg-nav a,
.bdg-card-actions a,
.bdg-card-actions button,
.bdg-actions button,
.bdg-market-head button,
.bdg-panel button {
  min-height: 38px;
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 7px;
  background: rgba(244, 240, 223, 0.06);
  color: var(--text);
  font-weight: 800;
}

.bdg-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: rgba(244, 240, 223, 0.72);
}

.bdg-nav a.active,
.bdg-nav a:hover,
.bdg-card-actions a:hover,
.bdg-card-actions button:hover,
.bdg-actions button:hover,
.bdg-market-head button:hover,
.bdg-panel button:hover {
  border-color: rgba(37, 214, 149, 0.42);
  color: #dcffd2;
}

.bdg-layout {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.bdg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: end;
  padding: 26px 0 22px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.16);
}

.bdg-hero h1 {
  max-width: 940px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.bdg-hero p {
  max-width: 920px;
  margin: 0;
  color: rgba(244, 240, 223, 0.72);
  line-height: 1.75;
}

.bdg-policy-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bdg-policy-strip span {
  min-height: 54px;
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.045);
  padding: 13px;
  color: rgba(244, 240, 223, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.bdg-console {
  display: grid;
  grid-template-columns: minmax(290px, 0.95fr) minmax(360px, 1.15fr) minmax(290px, 0.9fr);
  gap: 16px;
  margin-top: 22px;
}

.bdg-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 8px;
  background: rgba(10, 12, 9, 0.78);
  padding: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.bdg-panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}

.bdg-panel-head p,
.bdg-market-head p {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bdg-panel-head h2,
.bdg-market-head h2 {
  margin: 0;
  color: #fff7cc;
  font-size: 22px;
  letter-spacing: 0;
}

.bdg-panel label {
  display: grid;
  gap: 7px;
  color: rgba(244, 240, 223, 0.7);
  font-size: 13px;
  font-weight: 700;
}

.bdg-panel input,
.bdg-panel textarea {
  width: 100%;
  border: 1px solid rgba(244, 240, 223, 0.13);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.52);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.bdg-panel textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.bdg-panel input:focus,
.bdg-panel textarea:focus {
  border-color: rgba(37, 214, 149, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 214, 149, 0.1);
}

.bdg-form-grid,
.bdg-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bdg-panel button,
.bdg-market-head button {
  padding: 0 14px;
  background: linear-gradient(135deg, rgba(242, 184, 75, 0.24), rgba(37, 214, 149, 0.12));
}

.bdg-active-trade {
  display: grid;
  gap: 8px;
  min-height: 162px;
  border: 1px solid rgba(244, 240, 223, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
  color: rgba(244, 240, 223, 0.7);
  line-height: 1.6;
}

.bdg-trade-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(244, 240, 223, 0.08);
  padding-bottom: 7px;
}

.bdg-trade-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bdg-trade-row span {
  color: rgba(244, 240, 223, 0.56);
}

.bdg-trade-row b {
  color: #dcffd2;
  text-align: right;
  overflow-wrap: anywhere;
}

.bdg-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bdg-actions button,
.bdg-card-actions button,
.bdg-card-actions a {
  padding: 0 12px;
}

.bdg-market-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-top: 30px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(242, 184, 75, 0.14);
}

.bdg-listings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.bdg-card,
.bdg-empty {
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 8px;
  background: rgba(11, 13, 10, 0.86);
  overflow: hidden;
}

.bdg-card-preview {
  border-style: dashed;
  opacity: 0.82;
}

.bdg-card-media {
  display: grid;
  align-content: space-between;
  min-height: 132px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(242, 184, 75, 0.24), rgba(37, 214, 149, 0.18)),
    radial-gradient(circle at 88% 18%, rgba(125, 230, 242, 0.14), transparent 36%),
    #090a07;
}

.bdg-card-media span {
  width: fit-content;
  border: 1px solid rgba(244, 240, 223, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  padding: 5px 9px;
  color: #fff7cc;
  font-size: 12px;
  font-weight: 900;
}

.bdg-card-media strong {
  font-size: 34px;
  line-height: 1;
  color: #fff7cc;
  overflow-wrap: anywhere;
}

.bdg-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.bdg-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.bdg-card-title h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.bdg-card-title b {
  color: var(--gold);
  text-align: right;
  overflow-wrap: anywhere;
}

.bdg-card-body p {
  min-height: 48px;
  margin: 0;
  color: rgba(244, 240, 223, 0.66);
  line-height: 1.5;
}

.bdg-card-body dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.bdg-card-body dl div {
  min-width: 0;
  border: 1px solid rgba(244, 240, 223, 0.08);
  border-radius: 7px;
  background: rgba(244, 240, 223, 0.035);
  padding: 9px;
}

.bdg-card-body dt {
  color: rgba(244, 240, 223, 0.48);
  font-size: 12px;
}

.bdg-card-body dd {
  margin: 4px 0 0;
  color: rgba(244, 240, 223, 0.86);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bdg-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bdg-card-actions a,
.bdg-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bdg-card-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bdg-empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: rgba(244, 240, 223, 0.66);
}

.bdg-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(520px, calc(100vw - 36px));
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 8px;
  background: rgba(8, 9, 7, 0.94);
  padding: 12px 14px;
  color: rgba(244, 240, 223, 0.84);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.bdg-notice:empty {
  display: none;
}

.bdg-notice[data-mode="ok"] {
  border-color: rgba(37, 214, 149, 0.38);
  color: #dcffd2;
}

.bdg-notice[data-mode="warn"] {
  border-color: rgba(242, 184, 75, 0.42);
  color: #fff7cc;
}

.bdg-notice[data-mode="error"] {
  border-color: rgba(255, 93, 99, 0.46);
  color: #ffd4d4;
}

.partner-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 7%, rgba(242, 184, 75, 0.18), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(117, 240, 164, 0.13), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(125, 230, 242, 0.09), transparent 34%),
    #030302;
  color: var(--text);
}

.partner-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 16%, black, transparent 72%);
}

.partner-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(242, 184, 75, 0.16);
  background: rgba(3, 3, 2, 0.78);
  backdrop-filter: blur(20px);
}

.partner-brand {
  display: grid;
  gap: 2px;
}

.partner-brand span {
  color: transparent;
  background: linear-gradient(180deg, #fff4c7, #f2b84b 50%, #8d5a19);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 34px;
  font-weight: 950;
  line-height: 0.92;
}

.partner-brand b {
  color: rgba(244, 240, 223, 0.56);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.partner-nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.partner-nav nav a,
.partner-actions a,
.partner-footer a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 999px;
  background: rgba(244, 240, 223, 0.045);
  color: rgba(244, 240, 223, 0.78);
  padding: 0 15px;
  font-weight: 900;
}

.partner-nav nav a:hover,
.partner-actions a:first-child,
.partner-footer a:hover {
  border-color: rgba(255, 240, 138, 0.58);
  background: linear-gradient(135deg, rgba(255, 240, 138, 0.92), rgba(242, 184, 75, 0.88), rgba(117, 240, 164, 0.82));
  color: #0a0701;
}

.partner-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(330px, 0.72fr);
  gap: min(6vw, 72px);
  align-items: center;
  width: min(1500px, calc(100% - 9vw));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 70px 0 54px;
}

.partner-kicker,
.partner-section-head p {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.partner-hero h1 {
  max-width: 980px;
  margin: 18px 0;
  color: transparent;
  background: linear-gradient(180deg, #fff7d7 0%, #f3dc9c 42%, #f2b84b 72%, #8d5a19 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(44px, 7.5vw, 110px);
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.partner-lead,
.partner-section.split p,
.script-panel p {
  max-width: 880px;
  color: rgba(244, 240, 223, 0.72);
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.78;
}

.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.partner-orbit {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(242, 184, 75, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 240, 138, 0.18), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(117, 240, 164, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 42px rgba(242, 184, 75, 0.018), 0 38px 100px rgba(0, 0, 0, 0.4);
}

.orbit-core {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border: 1px solid rgba(255, 240, 138, 0.62);
  border-radius: 50%;
  background: linear-gradient(135deg, #fff08a, #f2b84b, #75f0a4);
  color: #090701;
  font-size: 25px;
  font-weight: 950;
  line-height: 0.9;
  text-align: center;
}

.partner-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  min-width: 78px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(244, 240, 223, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: rgba(244, 240, 223, 0.86);
  font-weight: 950;
  transform: rotate(calc(var(--i) * 60deg)) translate(172px) rotate(calc(var(--i) * -60deg)) translate(-50%, -50%);
}

.partner-metrics,
.partner-section,
.partner-footer {
  width: min(1500px, calc(100% - 9vw));
  margin: 0 auto;
}

.partner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 70px;
}

.partner-metrics article,
.partner-model-card,
.rail-map article,
.settlement-card,
.script-panel {
  border: 1px solid rgba(244, 240, 223, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(244, 240, 223, 0.07), rgba(244, 240, 223, 0.025)),
    rgba(0, 0, 0, 0.44);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.partner-metrics article {
  display: grid;
  gap: 10px;
  min-height: 144px;
  padding: 20px;
}

.partner-metrics b {
  color: var(--gold);
  font-size: 42px;
  line-height: 1;
}

.partner-metrics span,
.partner-model-card p,
.partner-model-card li,
.rail-map p,
.settlement-card dd {
  color: rgba(244, 240, 223, 0.68);
  line-height: 1.62;
}

.partner-section {
  padding: 76px 0;
  border-top: 1px solid rgba(242, 184, 75, 0.12);
}

.partner-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.partner-section-head h2,
.partner-section.split h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(30px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.partner-model-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.91fr 0.91fr;
  gap: 14px;
}

.partner-apply-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid rgba(255, 240, 138, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 240, 138, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(244, 240, 223, 0.065), rgba(244, 240, 223, 0.022)),
    rgba(0, 0, 0, 0.52);
  padding: 22px;
  box-shadow: 0 26px 88px rgba(0, 0, 0, 0.32);
}

.partner-apply-form label {
  display: grid;
  gap: 8px;
  color: rgba(244, 240, 223, 0.7);
  font-size: 13px;
  font-weight: 900;
}

.partner-apply-form label.wide {
  grid-column: 1 / -1;
}

.partner-apply-form input,
.partner-apply-form select,
.partner-apply-form textarea {
  width: 100%;
  border: 1px solid rgba(244, 240, 223, 0.13);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.56);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

.partner-apply-form textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.partner-apply-form input:focus,
.partner-apply-form select:focus,
.partner-apply-form textarea:focus {
  border-color: rgba(117, 240, 164, 0.46);
  box-shadow: 0 0 0 3px rgba(117, 240, 164, 0.1);
}

.partner-apply-form button {
  grid-column: 1 / -1;
  min-height: 52px;
  border: 1px solid rgba(255, 240, 138, 0.58);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff08a, #f2b84b 52%, #75f0a4);
  color: #0a0701;
  font-size: 16px;
  font-weight: 950;
}

.partner-submit-result {
  margin-top: 14px;
  border: 1px solid rgba(117, 240, 164, 0.18);
  border-radius: 18px;
  background: rgba(117, 240, 164, 0.055);
  color: rgba(244, 240, 223, 0.78);
  padding: 18px;
  line-height: 1.62;
}

.partner-submit-result:empty {
  display: none;
}

.partner-submit-result[data-mode="error"] {
  border-color: rgba(255, 93, 99, 0.36);
  background: rgba(255, 93, 99, 0.08);
  color: #ffd4d4;
}

.partner-submit-result h3 {
  margin: 0 0 12px;
  color: #fff08a;
}

.partner-submit-result dl {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.partner-submit-result dl div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(244, 240, 223, 0.09);
  padding-top: 8px;
}

.partner-submit-result dt {
  color: rgba(244, 240, 223, 0.56);
}

.partner-submit-result dd {
  margin: 0;
  color: #dcffd2;
  overflow-wrap: anywhere;
}

.partner-model-card {
  display: grid;
  align-content: start;
  min-height: 430px;
  padding: 28px;
  overflow: hidden;
}

.partner-model-card.primary {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 240, 138, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(242, 184, 75, 0.12), rgba(117, 240, 164, 0.045)),
    rgba(0, 0, 0, 0.48);
}

.partner-model-card span {
  width: fit-content;
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 999px;
  background: rgba(242, 184, 75, 0.08);
  color: #fff08a;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 950;
}

.partner-model-card h3,
.rail-map h3 {
  margin: 26px 0 12px;
  color: #fff7d7;
  font-size: 28px;
}

.partner-model-card ul {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding-left: 18px;
}

.rail-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rail-map article {
  min-height: 260px;
  padding: 26px;
}

.rail-map b {
  color: transparent;
  background: linear-gradient(180deg, #fff08a, #f2b84b);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 52px;
  line-height: 1;
}

.partner-section.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
}

.settlement-card,
.script-panel {
  padding: 26px;
}

.settlement-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.settlement-card div {
  border: 1px solid rgba(244, 240, 223, 0.09);
  border-radius: 14px;
  background: rgba(244, 240, 223, 0.035);
  padding: 16px;
}

.settlement-card dt {
  color: #fff08a;
  font-weight: 950;
}

.settlement-card dd {
  margin: 8px 0 0;
}

.script-panel p {
  margin: 0;
  max-width: none;
}

.partner-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 46px;
  border-top: 1px solid rgba(242, 184, 75, 0.12);
  color: rgba(244, 240, 223, 0.58);
}

@media (max-width: 1180px) {
  .feature-grid.four,
  .flow-grid,
  .stack-list.compact,
  .platform-map,
  .bdg-listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bdg-hero,
  .bdg-console {
    grid-template-columns: 1fr;
  }

  .chart-toolbar {
    display: none;
  }

  .time-tabs {
    justify-content: flex-start;
  }

  .ticket-grid {
    grid-template-columns: minmax(88px, 0.42fr) minmax(76px, 0.32fr) minmax(360px, 1.46fr) minmax(250px, 1.05fr);
  }
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    flex-wrap: wrap;
    padding: 14px 18px 0;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .mega-menu {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 104px;
    width: auto;
  }

  .mega-menu.wide {
    width: auto;
    grid-template-columns: 1fr;
  }

  .hero-screen,
  .split-band {
    grid-template-columns: 1fr;
  }

  .market-cluster {
    grid-template-columns: 1fr;
  }

  .profit-ladder {
    order: 2;
  }

  .hero-screen {
    min-height: auto;
    padding-top: 128px;
  }

  .home-shell .site-nav {
    height: auto;
    min-height: var(--ankh-logo-row-height);
  }

  .home-shell .hero-screen {
    padding-top: calc(var(--ankh-logo-row-height) + var(--ankh-logo-title-gap));
  }

  .home-shell .nav-links {
    justify-content: flex-start;
  }

  .subtitle-modules {
    white-space: normal;
  }

  .market-strip {
    padding: 16px;
  }

  .ticker-row {
    min-height: 58px;
    font-size: 16px;
  }

  .feature-grid.four,
  .feature-grid.three,
  .flow-grid,
  .stack-list,
  .stack-list.compact {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .site-footer {
    display: grid;
  }

  .platform-map {
    grid-template-columns: 1fr;
  }

  .trade-shell {
    overflow: auto;
  }

  .trade-layout {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .chart-area {
    min-height: 480px;
    height: 100vh;
  }

  .kline-canvas {
    min-height: 180px;
  }

  .trade-ticket {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 4px 6px;
  }

  .ticket-primary-row {
    flex-wrap: wrap;
  }

  .position-cluster {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ticket-controls {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .ticket-actions,
  .amount-presets {
    grid-column: 1 / -1;
  }

  .xpic-prediction-preview { grid-template-columns: 1fr; }

  .position-summary,
  .quant-diy-button,
  .xpic-prediction-button,
  .trade-mode-status {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .margin-preview {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .amount-presets,
  .ticket-actions {
    grid-column: 1 / -1;
  }

  .ticket-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-pair-overlay {
    right: 8px;
    flex-wrap: wrap;
  }

  .chart-time-tabs {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex-wrap: wrap;
  }

  .position-table > div,
  .position-history-table > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
    padding: 8px 10px;
  }

  .bdg-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 18px;
  }

  .bdg-topbar .ankh-wordmark {
    font-size: 42px;
  }

  .bdg-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .bdg-layout {
    width: min(100% - 28px, 760px);
    padding-top: 20px;
  }

  .bdg-policy-strip,
  .bdg-form-grid,
  .bdg-session-grid,
  .bdg-actions,
  .bdg-listings,
  .bdg-card-body dl,
  .bdg-card-actions {
    grid-template-columns: 1fr;
  }

  .partner-nav,
  .partner-section-head,
  .partner-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .partner-hero,
  .partner-section.split,
  .partner-model-grid,
  .rail-map,
  .partner-metrics {
    grid-template-columns: 1fr;
  }

  .partner-hero {
    min-height: auto;
    padding-top: 44px;
  }

  .partner-orbit {
    width: min(420px, 82vw);
    margin: 0 auto;
  }

  .partner-orbit span {
    transform: rotate(calc(var(--i) * 60deg)) translate(min(34vw, 140px)) rotate(calc(var(--i) * -60deg)) translate(-50%, -50%);
  }

  .bdg-market-head {
    align-items: start;
    flex-direction: column;
  }

  .bdg-hero h1 {
    font-size: 32px;
  }
}

/* === TICKET_PRIMARY_ROW_FINAL_V1 === */
/* 中文注释：左四钮按文字自适应宽度（约100起），不强制250，避免底条溢出；与手数杠杆买卖仍同一水平行 */
.trade-shell .trade-ticket {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-top: 1px solid rgba(246, 199, 90, 0.12) !important;
  background: #000 !important;
  grid-template-columns: none !important;
  overflow: hidden !important;
}

.trade-shell .ticket-primary-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 中文注释：四钮等分语义保留，但宽度=文字内容；min 约100，不抢右侧手数杠杆空间 */
.trade-shell .ticket-primary-row > .ticket-quad,
.trade-shell .ticket-primary-row > .position-summary,
.trade-shell .ticket-primary-row > .quant-diy-button,
.trade-shell .ticket-primary-row > .xpic-prediction-button,
.trade-shell .ticket-primary-row > .trade-mode-status {
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 100px !important;
  max-width: max-content !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
  white-space: nowrap !important;
}

.trade-shell .ticket-primary-row > .position-summary {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  border: 1px solid rgba(246, 199, 90, 0.28) !important;
  border-radius: 10px !important;
  background: rgba(244, 240, 223, 0.03) !important;
  text-align: center !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
}

.trade-shell .ticket-primary-row > .position-summary .position-open-hint {
  white-space: nowrap !important;
  font-size: 9px !important;
}

.trade-shell .ticket-primary-row > .quant-diy-button,
.trade-shell .ticket-primary-row > .xpic-prediction-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.trade-shell .ticket-primary-row > .trade-mode-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(246, 199, 90, 0.72) !important;
  border-radius: 10px !important;
  background: #f6c75a !important;
  color: #10110d !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.trade-shell .ticket-primary-row > .trade-mode-status.real {
  background: #ffe879 !important;
}

.trade-shell .ticket-primary-row > .amount-input-shell {
  flex: 0 0 110px !important;
  width: 110px !important;
  min-width: 96px !important;
  max-width: 120px !important;
  height: 48px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  border: 1px solid rgba(244, 240, 223, 0.14) !important;
  border-radius: 10px !important;
  background: #050505 !important;
  overflow: hidden !important;
}

.trade-shell .ticket-primary-row > .amount-input-shell > span {
  display: grid !important;
  place-items: center !important;
  height: 100% !important;
  border-right: 1px solid rgba(244, 240, 223, 0.1) !important;
  color: rgba(244, 240, 223, 0.62) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.trade-shell .ticket-primary-row > .amount-input-shell > input {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: transparent !important;
  color: #f5f4e8 !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  outline: none !important;
}

.trade-shell .ticket-primary-row > .leverage-select {
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 80px !important;
  max-width: 100px !important;
  height: 48px !important;
  border: 1px solid rgba(246, 199, 90, 0.28) !important;
  border-radius: 10px !important;
  background: #050505 !important;
  color: #fff08a !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

.trade-shell .ticket-primary-row > .ticket-actions {
  flex: 1 1 260px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-width: 0 !important;
  height: 48px !important;
}

.trade-shell .ticket-primary-row > .ticket-actions > button {
  min-height: 48px !important;
  height: 48px !important;
  min-width: 0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.trade-shell .ticket-primary-row > .amount-presets {
  flex: 0 1 220px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-width: 0 !important;
  max-width: 260px !important;
  height: 48px !important;
}

.trade-shell .ticket-primary-row > .amount-presets > button {
  min-height: 48px !important;
  height: 48px !important;
  min-width: 0 !important;
  border-radius: 10px !important;
  padding: 2px 2px !important;
  overflow: hidden !important;
}

.trade-shell .trade-ticket > .margin-preview {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
  gap: 6px 14px !important;
  min-height: 18px !important;
  margin: 0 !important;
  overflow: hidden !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

@media (max-width: 1280px) {
  .trade-shell .ticket-primary-row {
    flex-wrap: wrap !important;
    height: auto !important;
    max-height: none !important;
  }
  .trade-shell .ticket-primary-row > .ticket-quad,
  .trade-shell .ticket-primary-row > .position-summary,
  .trade-shell .ticket-primary-row > .quant-diy-button,
  .trade-shell .ticket-primary-row > .xpic-prediction-button,
  .trade-shell .ticket-primary-row > .trade-mode-status {
    min-width: 100px !important;
    max-width: none !important;
  }
  .trade-shell .ticket-primary-row > .amount-input-shell,
  .trade-shell .ticket-primary-row > .leverage-select,
  .trade-shell .ticket-primary-row > .ticket-actions,
  .trade-shell .ticket-primary-row > .amount-presets {
    flex: 1 1 auto !important;
    min-width: 96px !important;
    max-width: none !important;
  }
}

/* === UI_FINAL_CONTENT_FIT_AND_POS55 === */
/* 持仓窗 55% */
.trade-shell .position-window {
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(6px) !important;
}

/* 顶栏：金额条与报价条独立且紧挨；周期完整可见 */
.trade-shell .chart-area { overflow: visible !important; }
.trade-shell .chart-top-bar {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  right: 8px !important;
  z-index: 80 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  overflow: visible !important;
  pointer-events: none !important;
}
.trade-shell .chart-top-bar > .wallet-strip,
.trade-shell .chart-top-bar > .chart-pair-overlay,
.trade-shell .chart-top-bar > .chart-time-tabs {
  position: static !important;
  pointer-events: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}
.trade-shell .chart-top-bar > .wallet-strip {
  order: 1 !important;
  margin: 0 !important;
  gap: 6px !important;
  width: max-content !important;
  padding: 5px !important;
  border: 1px solid rgba(246, 199, 90, 0.22) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, 0.88) !important;
  font-size: 11px !important;
}
.trade-shell .chart-top-bar > .wallet-strip button {
  height: auto !important;
  min-height: 0 !important;
  padding: 5px !important;
  line-height: 1.1 !important;
}
.trade-shell .chart-top-bar > .chart-pair-overlay {
  order: 2 !important;
  margin: 0 0 0 4px !important;
  gap: 8px !important;
  padding: 5px !important;
  border: 1px solid rgba(246, 199, 90, 0.22) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, 0.78) !important;
}
.trade-shell .chart-top-bar > .chart-time-tabs {
  order: 3 !important;
  margin: 0 0 0 10px !important;
  gap: 3px !important;
  padding: 3px !important;
  border: 1px solid rgba(246, 199, 90, 0.18) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, 0.82) !important;
}
.trade-shell .chart-top-bar > .chart-time-tabs > button {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  min-width: 32px !important;
  height: auto !important;
  padding: 5px 7px !important;
  line-height: 1.1 !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.trade-shell .chart-zoom-controls {
  position: absolute !important;
  top: 46px !important;
  right: 10px !important;
  z-index: 79 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 底条：文字宽；上下左右各 5 像素 */
.trade-shell .trade-ticket {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 6px 8px !important;
  min-height: 0 !important;
  overflow: visible !important;
}
/* 中文注释：底条首行水平居中同行——控件+四比例矩形钮+右侧两行功能说明；第二行保证金居中 */
.trade-shell .ticket-primary-row,
.trade-shell .ticket-row-main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.trade-shell .ticket-primary-row > .ticket-quad,
.trade-shell .ticket-primary-row > .position-summary,
.trade-shell .ticket-primary-row > .quant-diy-button,
.trade-shell .ticket-primary-row > .xpic-prediction-button,
.trade-shell .ticket-primary-row > .trade-mode-status,
.trade-shell .ticket-primary-row > .leverage-select,
.trade-shell .ticket-primary-row > .ticket-actions > button {
  flex: 0 0 auto !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 5px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.trade-shell .ticket-primary-row > .position-summary {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  padding: 5px !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell {
  flex: 0 0 auto !important;
  width: max-content !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-grid !important;
  grid-template-columns: max-content max-content !important;
  align-items: center !important;
  padding: 0 !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell > span {
  height: auto !important;
  padding: 5px !important;
  line-height: 1.15 !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell > input {
  width: 3.2em !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 5px !important;
  line-height: 1.15 !important;
}
.trade-shell .ticket-primary-row > .ticket-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  width: max-content !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  grid-template-columns: none !important;
}
/* 中文注释：四比例钮与首行同行；每钮矩形内黄字一行、白字一行，水平居中 */
.trade-shell .ticket-primary-row > .amount-presets,
.trade-shell .amount-presets {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 6px !important;
  width: max-content !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  grid-template-columns: none !important;
  margin: 0 !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button,
.trade-shell .amount-presets > button {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  width: max-content !important;
  min-width: 5.2em !important;
  height: auto !important;
  min-height: 2.6em !important;
  padding: 6px 10px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  box-sizing: border-box !important;
  text-align: center !important;
  grid-template-rows: none !important;
  grid-template-columns: none !important;
}
.trade-shell .amount-presets > button strong {
  display: block !important;
  order: 1 !important;
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #fff08a !important;
  text-align: center !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
.trade-shell .amount-presets > button .preset-white-line {
  display: flex !important;
  order: 2 !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: 100% !important;
  text-align: center !important;
  white-space: nowrap !important;
}
.trade-shell .amount-presets > button .preset-white-line span,
.trade-shell .amount-presets > button span[data-preset-entry],
.trade-shell .amount-presets > button span[data-preset-lots] {
  display: inline !important;
  font-size: 10px !important;
  color: rgba(245, 244, 232, 0.94) !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  text-align: center !important;
}
/* 中文注释：首行右侧永固两行功能说明 */
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  flex: 0 0 auto !important;
  margin-left: 4px !important;
  padding: 4px 8px !important;
  border: 1px solid rgba(246, 199, 90, 0.22) !important;
  border-radius: 8px !important;
  background: rgba(244, 240, 223, 0.04) !important;
  color: rgba(245, 244, 232, 0.78) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
.trade-shell .ticket-primary-row > .chart-gesture-hint > span {
  display: block !important;
  text-align: left !important;
}
.trade-shell .margin-preview {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* 中文注释：手机视口下单条不得横向负偏移/纵向出屏；侧栏改顶栏三钮 */
@media (max-width: 720px) {
  .trade-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  .trade-rail {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 1fr !important;
    grid-auto-rows: 40px !important;
    gap: 4px !important;
    padding: 6px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(246, 199, 90, 0.12) !important;
  }
  .trade-rail a,
  .trade-rail button {
    font-size: 12px !important;
  }
  .chart-area {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .trade-shell .trade-ticket,
  .trade-ticket {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .trade-shell .ticket-primary-row,
  .trade-shell .ticket-row-main,
  .ticket-primary-row {
    flex-wrap: wrap !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    gap: 6px !important;
  }
  .trade-shell .position-cluster,
  .position-cluster {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    left: 0 !important;
    transform: none !important;
  }
  .position-summary,
  .quant-diy-button,
  .xpic-prediction-button,
  .trade-mode-status {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .kline-canvas {
    min-height: 160px !important;
    flex: 1 1 auto !important;
  }
}

/* 中文注释：手机顶栏钱包条必须可点，不压到视口外 */
@media (max-width: 720px) {
  .trade-shell .chart-top-bar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }
  .trade-shell .wallet-strip {
    flex-wrap: wrap !important;
    max-width: 100% !important;
    gap: 4px !important;
  }
  .trade-shell .wallet-strip button {
    font-size: 11px !important;
  }
}


/* ========== 2026-07-24 顶栏水平居中（不铺满、保持块尺寸）+ 底条首行紧挨 ========== */
/* 中文注释：三块 UI 作为一组在顶栏水平居中，块本身尺寸不变，禁止 space-between 拉开 */
.trade-shell .chart-top-bar {
  justify-content: center !important;
  gap: 6px !important;
}
.trade-shell .chart-top-bar > .wallet-strip {
  order: 1 !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  gap: 4px !important;
}
.trade-shell .chart-top-bar > .wallet-strip button,
.trade-shell .chart-top-bar > .wallet-strip .wallet-account {
  height: auto !important;
  min-height: 0 !important;
  padding: 3px 6px !important;
  line-height: 1.15 !important;
  font-size: 11px !important;
  width: auto !important;
  max-width: none !important;
}
.trade-shell .chart-top-bar > .chart-pair-overlay {
  order: 2 !important;
  margin: 0 0 0 4px !important;
}
.trade-shell .chart-top-bar > .chart-time-tabs {
  order: 3 !important;
  margin: 0 0 0 4px !important; /* 去掉 auto 右推，与前两块成一组 */
}

/* 中文注释：底条第一行——前三个按钮贴字号收窄，与后续控件 gap 统一 6px，整行居中不铺满 */
.trade-shell .ticket-primary-row.ticket-row-main,
.trade-shell .ticket-primary-row {
  justify-content: center !important;
  gap: 6px !important;
  width: max-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: auto !important;
}
.trade-shell .ticket-primary-row > .position-summary,
.trade-shell .ticket-primary-row > .quant-diy-button,
.trade-shell .ticket-primary-row > .xpic-prediction-button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 4px 8px !important;
  line-height: 1.15 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}
.trade-shell .ticket-primary-row > .trade-mode-status,
.trade-shell .ticket-primary-row > .amount-input-shell,
.trade-shell .ticket-primary-row > .leverage-select,
.trade-shell .ticket-primary-row > .ticket-actions {
  flex: 0 0 auto !important;
  margin-left: 0 !important;
}
.trade-shell .ticket-primary-row > .position-summary .position-open-hint {
  font-size: 10px !important;
  line-height: 1.1 !important;
}



/* 2026-07-24 唯一通栏竖导航（恢复）+ 指标行对齐 + 缩放字 + 登录互斥 */
.trade-shell .trade-layout {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}
.trade-shell .trade-rail,
.trade-shell.no-inner-rail .trade-rail {
  display: grid !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  overflow: visible !important;
  pointer-events: auto !important;
  grid-auto-rows: minmax(56px, auto);
  align-content: start;
  gap: 8px;
  padding: 10px 6px;
  border-right: 1px solid rgba(246, 199, 90, 0.14);
  background: linear-gradient(180deg, #0a0906 0%, #000 40%);
  z-index: 40;
}
.trade-shell .trade-rail a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px;
  border: 1px solid rgba(244, 240, 223, 0.1);
  border-radius: 10px;
  background: rgba(244, 240, 223, 0.04);
  color: rgba(244, 240, 223, 0.72);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 10px;
  font-weight: 800;
  text-transform: none;
}
.trade-shell .trade-rail a .rail-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: inherit;
}
.trade-shell .trade-rail a .rail-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.trade-shell .trade-rail a:hover,
.trade-shell .trade-rail a.active {
  color: #0a0701 !important;
  border-color: rgba(255, 240, 138, 0.75) !important;
  background: linear-gradient(135deg, #fff08a, #f6c75a 52%, #75f0a4) !important;
  box-shadow: 0 0 18px rgba(246, 199, 90, 0.28);
}
.trade-shell .chart-zoom-controls {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px !important;
  right: 0 !important;
  left: auto !important;
  width: auto !important;
  max-width: calc(100% - 12px) !important;
  margin-left: auto !important;
  padding-right: 10px !important;
  box-sizing: border-box !important;
}
.trade-shell .chart-zoom-controls #openIndicatorMenu {
  order: -1;
  margin-right: auto;
}
.trade-shell .chart-top-bar {
  padding-right: 10px !important;
  box-sizing: border-box !important;
}
.price-axis-zoom-label {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: rgba(246, 199, 90, 0.92);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
  z-index: 2;
}
.auth-tabs {
  display: none !important;
}


/* xap-ticket-fluid-20260724c：顶条贴顶 + 底条流体防叠 */
.trade-shell .chart-top-bar {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 4px 8px !important;
  box-sizing: border-box !important;
  flex-wrap: wrap !important;
  gap: 4px 6px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.trade-shell .chart-top-bar > * { min-width: 0 !important; }
.trade-shell .ticket-primary-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px 6px !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.trade-shell .ticket-primary-row > * {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
.trade-shell .ticket-primary-row .ticket-quad,
.trade-shell .ticket-primary-row .trade-mode-status,
.trade-shell .ticket-primary-row .amount-input-shell,
.trade-shell .ticket-primary-row .leverage-select {
  font-size: clamp(10px, 1.05vw, 13px) !important;
  padding: clamp(3px, 0.5vw, 7px) clamp(5px, 0.7vw, 10px) !important;
  white-space: nowrap !important;
}
.trade-shell .position-cluster {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  max-width: 100% !important;
}
.trade-shell .amount-presets {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
}
.trade-shell .trade-layout {
  grid-template-columns: clamp(56px, 7.5vw, 72px) minmax(0, 1fr) !important;
}
.trade-shell .trade-rail {
  width: clamp(56px, 7.5vw, 72px) !important;
  min-width: clamp(56px, 7.5vw, 72px) !important;
}
.trade-shell .kline-canvas {
  /* 中文注释：画布从顶开始，顶条叠在画布上，禁止为顶条预留空白下移 */
  margin-top: 0 !important;
}


/* xap-rail-fullheight-20260724：最左导航通栏全高 */
.trade-shell .trade-layout {
  grid-template-columns: 72px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 100vh !important;
}
.trade-shell .trade-rail {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  min-height: 100vh !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  align-self: stretch !important;
  justify-content: flex-start !important;
  padding: 10px 6px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
}
.trade-shell .trade-rail a {
  flex: 0 0 auto !important;
  min-height: 56px !important;
}
.trade-shell .chart-area {
  height: 100vh !important;
  min-height: 100vh !important;
}
.trade-shell .chart-top-bar {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

/* === 20260724 preset L-yellow R-white-2lines + amount fixed width + chart fill === */
.trade-shell .ticket-primary-row > .amount-presets,
.trade-shell .amount-presets {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: max-content !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button,
.trade-shell .amount-presets > button {
  display: grid !important;
  grid-template-columns: max-content max-content !important;
  grid-template-rows: auto auto !important;
  column-gap: 8px !important;
  row-gap: 1px !important;
  align-items: center !important;
  justify-content: start !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 6px 10px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
.trade-shell .amount-presets > button strong {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  justify-self: start !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  color: #fff08a !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  text-align: left !important;
}
.trade-shell .amount-presets > button .preset-white-line {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 1px !important;
  width: max-content !important;
  white-space: nowrap !important;
}
.trade-shell .amount-presets > button .preset-white-line span,
.trade-shell .amount-presets > button span[data-preset-entry],
.trade-shell .amount-presets > button span[data-preset-lots] {
  display: block !important;
  font-size: 10px !important;
  color: rgba(245, 244, 232, 0.95) !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
/* 手数输入固定宽，数值变化不挤布局 */
.trade-shell .ticket-primary-row > .amount-input-shell {
  flex: 0 0 auto !important;
  width: 7.6em !important;
  min-width: 7.6em !important;
  max-width: 7.6em !important;
  display: inline-grid !important;
  grid-template-columns: max-content 1fr !important;
  overflow: hidden !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell > input {
  width: 4.4em !important;
  min-width: 4.4em !important;
  max-width: 4.4em !important;
  box-sizing: border-box !important;
  font-variant-numeric: tabular-nums !important;
}
.trade-shell .ticket-primary-row > .leverage-select {
  width: 4.2em !important;
  min-width: 4.2em !important;
  max-width: 4.2em !important;
  flex: 0 0 auto !important;
}
/* 图区贴满，右侧价格轴外空隙收掉 */
.trade-shell .chart-area,
.trade-shell .chart-stage,
.trade-shell .kline-wrap {
  padding: 0 !important;
  margin: 0 !important;
}
.trade-shell .kline-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.trade-shell .price-axis-slider {
  right: 0 !important;
  margin: 0 !important;
}


/* === 20260724 四边贴合 + 固定交易控件终态 === */
/* 盘面外盒四边零缝：上贴顶栏、下贴下单条、左贴导航、右贴纵向窄条。 */
.trade-shell,
.trade-shell .trade-layout,
.trade-shell .chart-area {
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}
.trade-shell .trade-layout {
  height: 100dvh !important;
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
.trade-shell .chart-area {
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
.trade-shell .kline-canvas {
  display: block !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.trade-shell .chart-top-bar {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
}
.trade-shell .trade-ticket {
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}
.trade-shell .price-axis-slider {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 底条用全宽稳定轨道，动态金额/手数只在格内变化，不再改变整组位置。 */
.trade-shell .ticket-primary-row,
.trade-shell .ticket-primary-row.ticket-row-main {
  display: grid !important;
  grid-template-columns: max-content 88px 112px 64px minmax(240px, 1fr) repeat(4, 132px) max-content !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
}
.trade-shell .position-cluster {
  display: grid !important;
  grid-template-columns: repeat(3, max-content) !important;
  gap: 4px !important;
  width: max-content !important;
  min-width: 0 !important;
}
.trade-shell .position-cluster > button {
  width: max-content !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 4px 8px !important;
  white-space: nowrap !important;
}
.trade-shell .ticket-primary-row > .trade-mode-status {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  height: 48px !important;
  padding: 0 6px !important;
  overflow: hidden !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  flex: none !important;
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  height: 48px !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.trade-shell .ticket-primary-row > .amount-input-shell > input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 4px !important;
  font-variant-numeric: tabular-nums !important;
}
.trade-shell .ticket-primary-row > .leverage-select {
  flex: none !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 48px !important;
  padding: 0 4px !important;
}
.trade-shell .ticket-primary-row > .ticket-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(54px, 1fr)) !important;
  gap: 4px !important;
  min-width: 240px !important;
  width: auto !important;
  height: 48px !important;
}
.trade-shell .ticket-primary-row > .amount-presets {
  display: contents !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button {
  display: grid !important;
  grid-template-columns: 3.4em minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  column-gap: 6px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 48px !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
}
.trade-shell .amount-presets > button strong {
  grid-column: 1 !important;
  grid-row: 1 !important;
  color: #fff08a !important;
  font-variant-numeric: tabular-nums !important;
  text-align: left !important;
}
.trade-shell .amount-presets > button .preset-white-line {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-rows: 1fr 1fr !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
.trade-shell .amount-presets > button .preset-white-line span {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(245, 244, 232, 0.95) !important;
  font-size: 10px !important;
  font-variant-numeric: tabular-nums !important;
}
.trade-shell .chart-gesture-hint {
  width: max-content !important;
  min-width: 0 !important;
  height: 48px !important;
  overflow: hidden !important;
}

@media (max-width: 720px) {
  .trade-shell .trade-layout {
    height: 100dvh !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 54px minmax(0, 1fr) !important;
  }
  .trade-shell .trade-rail {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-rows: 54px !important;
    gap: 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    position: static !important;
    overflow: hidden !important;
  }
  .trade-shell .trade-rail a {
    min-width: 0 !important;
    min-height: 54px !important;
    height: 54px !important;
    padding: 3px 1px !important;
  }
  .trade-shell .trade-rail .rail-label {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .trade-shell .chart-area {
    height: calc(100dvh - 54px) !important;
    min-height: 0 !important;
  }
  .trade-shell .kline-canvas {
    min-height: 160px !important;
  }
  .trade-shell .ticket-primary-row,
  .trade-shell .ticket-primary-row.ticket-row-main {
    grid-template-columns: max-content 82px 108px 60px minmax(220px, 1fr) repeat(4, 126px) max-content !important;
    overflow-x: auto !important;
    scrollbar-gutter: stable !important;
  }
}

/* === 20260725 响应式业务控件终态：换行压缩，禁止用横滚隐藏 === */
.trade-shell .ticket-primary-row,
.trade-shell .ticket-primary-row.ticket-row-main {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 48px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
}
.trade-shell .ticket-primary-row > .amount-presets {
  display: flex !important;
  flex-flow: row wrap !important;
  flex: 1 1 420px !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  gap: 4px !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button {
  flex: 1 1 112px !important;
  width: auto !important;
  min-width: 112px !important;
  max-width: none !important;
}
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  flex: 0 1 auto !important;
  max-width: 100% !important;
}

@media (max-width: 720px) {
  .trade-shell .chart-top-bar {
    display: flex !important;
    flex-flow: row wrap !important;
    align-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .trade-shell .chart-top-bar > .wallet-strip,
  .trade-shell .chart-top-bar > .chart-pair-overlay,
  .trade-shell .chart-top-bar > .chart-time-tabs {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
  .trade-shell .chart-top-bar > .chart-time-tabs > button {
    flex: 1 1 32px !important;
    min-width: 30px !important;
    padding: 4px 3px !important;
  }
  .trade-shell .trade-ticket {
    padding: 4px !important;
    overflow-x: hidden !important;
  }
  .trade-shell .ticket-primary-row,
  .trade-shell .ticket-primary-row.ticket-row-main {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(42px, auto) !important;
    align-items: stretch !important;
    gap: 4px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .trade-shell .ticket-primary-row > .position-cluster {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .trade-shell .position-cluster > button {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 3px 4px !important;
    white-space: normal !important;
  }
  .trade-shell .ticket-primary-row > .trade-mode-status {
    grid-column: span 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
  }
  .trade-shell .ticket-primary-row > .amount-input-shell {
    grid-column: span 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
  }
  .trade-shell .ticket-primary-row > .leverage-select {
    grid-column: span 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
  }
  .trade-shell .ticket-primary-row > .ticket-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
  }
  .trade-shell .ticket-primary-row > .amount-presets {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .trade-shell .ticket-primary-row > .amount-presets > button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
  }
  .trade-shell .ticket-primary-row > .chart-gesture-hint {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 36px !important;
    white-space: normal !important;
  }
}

/* === 20260725 chart geometry closure === */
.trade-shell .chart-area {
  display: flex !important;
  flex-direction: column !important;
}
.trade-shell .chart-stage {
  position: relative !important;
  display: block !important;
  flex: 1 1 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 160px !important;
  overflow: hidden !important;
  background: #000 !important;
}
.trade-shell .price-axis-slider {
  box-sizing: border-box !important;
  width: 16px !important;
  height: 100% !important;
  min-height: 0 !important;
}

@media (max-width: 720px) {
  .trade-shell .chart-area {
    display: flex !important;
    overflow: hidden !important;
  }
  .trade-shell .chart-stage {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto minmax(160px, 1fr) !important;
    align-items: stretch !important;
  }
  .trade-shell .chart-top-bar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 20 !important;
    padding: 3px 20px 3px 3px !important;
    background: #000 !important;
  }
  .trade-shell .chart-top-bar > .wallet-strip,
  .trade-shell .chart-top-bar > .chart-pair-overlay,
  .trade-shell .chart-top-bar > .chart-time-tabs {
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .trade-shell .chart-top-bar > .wallet-strip {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    scrollbar-width: thin !important;
  }
  .trade-shell .chart-top-bar > .chart-pair-overlay {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    align-items: center !important;
  }
  .trade-shell .chart-top-bar > .chart-pair-overlay h1,
  .trade-shell .chart-top-bar > .chart-pair-overlay #change24h {
    display: none !important;
  }
  .trade-shell .chart-top-bar > .chart-pair-overlay select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .trade-shell .chart-top-bar > .chart-time-tabs {
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }
  .trade-shell .chart-zoom-controls {
    grid-column: 1 !important;
    grid-row: 2 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 19 !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 2px 20px 2px 3px !important;
    background: #000 !important;
  }
  .trade-shell .kline-canvas {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 160px !important;
  }
  .trade-shell .price-axis-slider {
    grid-column: 1 !important;
    grid-row: 3 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 18 !important;
    justify-self: end !important;
    align-self: stretch !important;
  }
  .trade-shell .trade-ticket {
    position: relative !important;
    z-index: 20 !important;
    max-height: min(42dvh, 320px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    background: #000 !important;
  }
}

/* === 20260726 EOF 绝对终态：底栏首行高度=文字上下各 5px，单行 5px 间隔，永不换行 === */
.trade-shell .trade-ticket {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
.trade-shell .ticket-primary-row,
.trade-shell .ticket-primary-row.ticket-row-main {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}
.trade-shell .ticket-primary-row > * {
  flex: 0 0 auto !important;
  margin: 0 !important;
  align-self: center !important;
  height: auto !important;
  min-height: 0 !important;
}
.trade-shell .ticket-primary-row > .position-cluster,
.trade-shell .ticket-primary-row > .ticket-actions,
.trade-shell .ticket-primary-row > .amount-presets {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
}
.trade-shell .ticket-primary-row button,
.trade-shell .ticket-primary-row .ticket-action,
.trade-shell .ticket-primary-row select,
.trade-shell .ticket-primary-row input,
.trade-shell .ticket-primary-row label,
.trade-shell .ticket-primary-row .chart-gesture-hint {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.trade-shell .ticket-primary-row > .amount-presets > button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.trade-shell .ticket-primary-row > .chart-gesture-hint {
  flex: 0 0 auto !important;
  display: block !important;
  width: max-content !important;
  max-width: none !important;
  white-space: nowrap !important;
}
