  /* ============= 基础设定 ============= */
  :root {
    --bg-base: #0a0c10;
    --bg-elevated: #11141a;
    --bg-card: #161a22;
    --bg-line: #1f242f;
    --bg-row: #1a1f29;

    --text-primary: #f5f1e8;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-dim: #4b5563;

    --up-primary: #e63946;
    --up-soft: #b82938;
    --up-glow: rgba(230, 57, 70, 0.35);
    --up-fade: rgba(230, 57, 70, 0.08);
    --up-row: rgba(230, 57, 70, 0.05);

    --down-primary: #10b981;
    --down-soft: #047857;
    --down-glow: rgba(16, 185, 129, 0.35);
    --down-fade: rgba(16, 185, 129, 0.08);
    --down-row: rgba(16, 185, 129, 0.05);

    --gold-primary: #d4af37;
    --gold-soft: #b8941f;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --gold-fade: rgba(212, 175, 55, 0.08);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Noto Serif SC', serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(230, 57, 70, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* ============= 主容器 ============= */
  .container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 28px 32px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  /* ============= 顶部品牌条 ============= */
  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bg-line);
  }

  .brand-left {
    display: flex;
    align-items: baseline;
    gap: 14px;
  }

  .brand-mark {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--gold-primary);
    text-transform: uppercase;
    padding: 3px 9px;
    border: 1px solid var(--gold-primary);
    position: relative;
  }

  .brand-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.05em;
  }

  .brand-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--up-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--up-glow);
    animation: pulse 2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  /* ============= 主网格 ============= */
  .main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    flex: 1;
    min-height: 0;
  }

  /* ============= 左侧：输入面板 ============= */
  .input-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .panel-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, #f5f1e8 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .panel-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 16px;
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    margin-top: 4px;
  }

  /* 输入卡片 */
  .input-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    padding: 24px 24px 20px;
    position: relative;
    overflow: hidden;
  }

  .input-card::before,
  .input-card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gold-primary);
  }

  .input-card::before {
    top: 0; left: 0;
    border-right: none; border-bottom: none;
  }

  .input-card::after {
    bottom: 0; right: 0;
    border-left: none; border-top: none;
  }

  .input-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .input-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .currency-symbol {
    font-family: 'Cormorant Garamond', serif;
    font-size: 29px;
    font-weight: 500;
    color: var(--gold-primary);
    line-height: 1;
  }

  .price-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 40px;
    font-weight: 300;
    color: var(--text-primary);
    width: 100%;
    padding: 4px 0;
    letter-spacing: -0.02em;
    caret-color: var(--gold-primary);
  }

  .price-input::placeholder { color: var(--text-dim); font-weight: 300; }
  .price-input:focus { color: var(--gold-primary); }

  /* 目标价输入 */
  .target-input-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
  }

  .target-price-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 33px;
    font-weight: 400;
    color: var(--gold-primary);
    width: 100%;
    padding: 4px 0;
    letter-spacing: -0.02em;
    caret-color: var(--gold-primary);
    text-shadow: 0 0 24px var(--gold-glow);
  }

  .target-price-input::placeholder { color: var(--text-dim); font-weight: 300; }

  .input-hint {
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 2.1;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  .input-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--bg-line);
    border: 1px solid var(--bg-line);
    border-radius: 2px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    vertical-align: middle;
    margin: 0 2px;
  }

  /* 快速填充 */
  .quick-fill {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 14px;
  }

  .quick-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    padding: 6px 0;
    background: transparent;
    border: 1px solid var(--bg-line);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    text-align: center;
  }

  .quick-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
  }

  /* 基准价显示 */
  .baseline-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
  }

  .baseline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(
      90deg,
      #03bfff 0%,
      #30cc5a 7.69%,
      #2fb152 15.38%,
      #2f9e4f 23.08%,
      #32844e 30.77%,
      #3d5451 38.46%,
      #2f323d 46.15%,
      #644553 53.85%,
      #8b444e 61.54%,
      #bf4045 69.23%,
      #df3a3d 76.92%,
      #f63538 84.62%,
      #a947ff 100%
    );
  }

  .baseline-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  .baseline-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 400;
    color: var(--gold-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 24px var(--gold-glow);
  }

  .baseline-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--bg-line);
  }

  .stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 500;
  }

  .stat-value.up { color: var(--up-primary); }
  .stat-value.down { color: var(--down-primary); }

  /* 目标价滑块：中轴为基准股价，左侧负轴 / 右侧正轴 */
  .target-slider-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-line);
  }

  .target-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }

  .target-slider-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
  }

  .target-slider-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
  }

  .target-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 20px;
    background: transparent;
    cursor: pointer;
  }

  .target-slider:focus { outline: none; }

  .target-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
      to right,
      var(--down-primary) 0%,
      var(--down-soft) 30%,
      #2f323d 50%,
      var(--up-soft) 70%,
      var(--up-primary) 100%
    );
  }

  .target-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 8px var(--gold-glow);
    transition: box-shadow 0.2s ease;
  }

  .target-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 12px var(--gold-glow);
  }

  .target-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
      to right,
      var(--down-primary) 0%,
      var(--down-soft) 30%,
      #2f323d 50%,
      var(--up-soft) 70%,
      var(--up-primary) 100%
    );
  }

  .target-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 8px var(--gold-glow);
  }

  .target-slider-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  .target-slider-base {
    color: var(--gold-primary);
  }

  /* 持仓卡 */
  .position-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
  }

  .position-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(
      90deg,
      #03bfff 0%,
      #30cc5a 7.69%,
      #2fb152 15.38%,
      #2f9e4f 23.08%,
      #32844e 30.77%,
      #3d5451 38.46%,
      #2f323d 46.15%,
      #644553 53.85%,
      #8b444e 61.54%,
      #bf4045 69.23%,
      #df3a3d 76.92%,
      #f63538 84.62%,
      #a947ff 100%
    );
  }

  .shares-input-wrapper {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .shares-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 29px;
    font-weight: 400;
    color: var(--text-primary);
    width: 100%;
    padding: 4px 0;
    letter-spacing: -0.02em;
    caret-color: var(--gold-primary);
  }

  .shares-input::placeholder { color: var(--text-dim); font-weight: 300; }
  .shares-input:focus { color: var(--gold-primary); }

  .shares-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  .shares-quick-fill {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 12px;
  }

  .position-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--bg-line);
  }

  /* 提示卡 */
  .tip-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    padding: 16px 20px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    letter-spacing: 0.02em;
  }

  .tip-card strong {
    color: var(--gold-primary);
    font-weight: 600;
  }

  .tip-card .tip-key {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
  }

  /* ============= 右侧：档位面板 ============= */
  .ladder-panel {
    background: var(--bg-card);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .ladder-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--bg-line);
  }

  .ladder-topbar-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.1em;
  }

  .ladder-topbar-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  /* 档位表横向滚动容器：整表随内容加宽后，超出面板宽度时在此容器内横向滚动 */
  .ladder-scroll {
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-line) transparent;
  }
  .ladder-scroll::-webkit-scrollbar { height: 8px; }
  .ladder-scroll::-webkit-scrollbar-track { background: transparent; }
  .ladder-scroll::-webkit-scrollbar-thumb { background: var(--bg-line); border-radius: 4px; }
  .ladder-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

  /* 共享网格：表头与所有档位行共用同一套列轨道；
     min-width: max-content 使整表随内容自动加宽（数字变长时各列不再互相挤压，而是整表加宽+横向滚动） */
  .ladder-grid {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 0.85fr 0.95fr 1fr 0.6fr 0.6fr;
    width: 100%;
    min-width: max-content;
  }

  /* 表头 */
  .ladder-thead {
    display: grid;
    grid-template-columns: repeat(8, minmax(min-content, 1fr));
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    padding: 10px 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--bg-line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .ladder-thead > div { text-align: right; }
  .ladder-thead > div:first-child { text-align: left; }

  /* 行 */
  .ladder-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(min-content, 1fr));
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--bg-line);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
  }

  .ladder-row:last-child { border-bottom: none; }

  .ladder-row:hover {
    background: rgba(255, 255, 255, 0.02);
  }

  /* 卖方行（上涨） */
  .ladder-row.up {
    background: var(--up-row);
  }
  .ladder-row.up:hover {
    background: rgba(230, 57, 70, 0.1);
  }

  /* 买方行（下跌） */
  .ladder-row.down {
    background: var(--down-row);
  }
  .ladder-row.down:hover {
    background: rgba(16, 185, 129, 0.1);
  }

  /* 基准行 */
  .ladder-row.base {
    background: var(--gold-fade);
    border-top: 1px solid var(--gold-primary);
    border-bottom: 1px solid var(--gold-primary);
    padding: 12px 0;
  }
  .ladder-row.base:hover {
    background: rgba(212, 175, 55, 0.12);
  }

  /* 关键位（50%） */
  .ladder-row.key { font-weight: 600; }
  .ladder-row.key .col-price {
    text-shadow: 0 0 16px var(--gold-glow);
  }

  /* 列样式 */
  /* 数字列禁止换行：价格/金额大数字保持单行，过长时由整表加宽 + 横向滚动承载 */
  .col-rank, .col-pct, .col-price, .col-delta, .col-recovery, .col-pnl, .col-mv {
    white-space: nowrap;
  }

  /* 首列/末列外侧留白：内边距放在单元格上，行背景才能铺满整行宽度 */
  .ladder-thead > div:first-child, .ladder-row .col-rank { padding-left: 24px; }
  .ladder-thead > div:last-child, .ladder-row .col-recovery { padding-right: 24px; }

  .col-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  .col-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 500;
    text-align: right;
    letter-spacing: 0.02em;
  }

  .ladder-row.up .col-pct { color: var(--up-primary); }
  .ladder-row.down .col-pct { color: var(--down-primary); }
  .ladder-row.base .col-pct { color: var(--gold-primary); }
  .ladder-row.key .col-pct {
    color: var(--gold-primary);
    font-size: 19px;
  }

  .col-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 23px;
    font-weight: 400;
    text-align: right;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
  }

  .ladder-row.up:hover .col-price { color: var(--up-primary); }
  .ladder-row.down:hover .col-price { color: var(--down-primary); }
  .ladder-row.base .col-price {
    color: var(--gold-primary);
    font-weight: 500;
    font-size: 24px;
  }
  .ladder-row.key .col-price {
    color: var(--gold-primary);
    font-size: 24px;
    font-weight: 600;
  }

  .col-delta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-muted);
    text-align: right;
  }

  .ladder-row.up .col-delta { color: var(--up-primary); opacity: 0.8; }
  .ladder-row.down .col-delta { color: var(--down-primary); opacity: 0.8; }
  .ladder-row.base .col-delta { color: var(--gold-primary); }

  /* 回本%列：显示从该档回到基准所需的涨/跌幅 */
  .col-recovery {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
  }
  .ladder-row.up .col-recovery {
    color: var(--gold-primary);
    font-weight: 600;
    text-shadow: 0 0 10px var(--gold-fade);
  }
  .ladder-row.down .col-recovery {
    color: var(--gold-primary);
    font-weight: 600;
    text-shadow: 0 0 10px var(--gold-fade);
  }
  .ladder-row.base .col-recovery {
    color: var(--text-dim);
    font-weight: 400;
  }
  .ladder-row.key .col-recovery {
    color: var(--gold-primary);
    font-size: 16px;
    font-weight: 700;
  }

  /* 盈亏列：基于当前持仓股数 = (该档价 - 基准价) × 股数 */
  .col-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
  }
  .ladder-row.up .col-pnl {
    color: var(--up-primary);
    opacity: 0.95;
  }
  .ladder-row.down .col-pnl {
    color: var(--down-primary);
    opacity: 0.95;
  }
  .ladder-row.base .col-pnl {
    color: var(--text-dim);
    font-weight: 400;
  }
  .ladder-row.key .col-pnl {
    color: var(--gold-primary);
    font-weight: 700;
    text-shadow: 0 0 10px var(--gold-fade);
  }

  /* 市值列：基于当前持仓股数 = 该档价 × 股数 */
  .col-mv {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
  }
  .ladder-row.up .col-mv {
    color: var(--up-primary);
    opacity: 0.95;
  }
  .ladder-row.down .col-mv {
    color: var(--down-primary);
    opacity: 0.95;
  }
  .ladder-row.base .col-mv {
    color: var(--gold-primary);
    font-weight: 600;
  }
  .ladder-row.key .col-mv {
    color: var(--gold-primary);
    font-weight: 700;
    text-shadow: 0 0 10px var(--gold-fade);
  }

  .col-bar {
    display: flex;
    justify-content: flex-end;
  }

  .bar-track {
    width: 60px;
    height: 4px;
    background: var(--bg-line);
    position: relative;
    overflow: hidden;
  }

  .bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    transition: width 0.4s ease;
  }

  .ladder-row.up .bar-fill { background: var(--up-primary); right: 0; }
  .ladder-row.down .bar-fill { background: var(--down-primary); right: 0; }
  .ladder-row.base .bar-fill { background: var(--gold-primary); right: 0; }
  .ladder-row.key .bar-fill { background: var(--gold-primary); }

  /* KEY 徽章 */
  .key-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--gold-primary);
    padding: 1px 4px;
    border: 1px solid var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
    margin-left: 6px;
    vertical-align: middle;
  }

  /* 数字翻转 */
  .num-flip {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }

  .num-flip.flip {
    opacity: 0.3;
    transform: translateY(-3px);
  }

  /* Toast */
  .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 10px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px var(--gold-glow);
  }

  .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* 右下角浮动操作组 */
  .fab-group {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 95;
  }

  .fab-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--gold-primary);
    border-radius: 4px;
    color: var(--gold-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .fab-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 16px var(--gold-glow);
  }

  /* 返回顶部按钮：滚动超过一屏才浮现 */
  .fab-btn.back-top {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.3s ease;
  }

  .fab-btn.back-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* 入场动画 */
  @keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .input-panel > * {
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .input-panel > *:nth-child(2) { animation-delay: 0.08s; }
  .input-panel > *:nth-child(3) { animation-delay: 0.16s; }
  .input-panel > *:nth-child(4) { animation-delay: 0.24s; }
  .input-panel > *:nth-child(5) { animation-delay: 0.32s; }
  .input-panel > *:nth-child(6) { animation-delay: 0.40s; }

  .ladder-row {
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .ladder-row:nth-child(2) { animation-delay: 0.05s; }
  .ladder-row:nth-child(3) { animation-delay: 0.10s; }
  .ladder-row:nth-child(4) { animation-delay: 0.15s; }
  .ladder-row:nth-child(5) { animation-delay: 0.20s; }
  .ladder-row:nth-child(6) { animation-delay: 0.25s; }
  .ladder-row:nth-child(7) { animation-delay: 0.30s; }
  .ladder-row:nth-child(8) { animation-delay: 0.35s; }
  .ladder-row:nth-child(9) { animation-delay: 0.40s; }
  .ladder-row:nth-child(10) { animation-delay: 0.45s; }
  .ladder-row:nth-child(11) { animation-delay: 0.50s; }
  .ladder-row:nth-child(12) { animation-delay: 0.55s; }
  .ladder-row:nth-child(13) { animation-delay: 0.60s; }
  .ladder-row:nth-child(14) { animation-delay: 0.65s; }
  .ladder-row:nth-child(15) { animation-delay: 0.70s; }
  .ladder-row:nth-child(16) { animation-delay: 0.75s; }
  .ladder-row:nth-child(17) { animation-delay: 0.80s; }
  .ladder-row:nth-child(18) { animation-delay: 0.85s; }
  .ladder-row:nth-child(19) { animation-delay: 0.90s; }
  .ladder-row:nth-child(20) { animation-delay: 0.95s; }
  .ladder-row:nth-child(21) { animation-delay: 1.00s; }
  .ladder-row:nth-child(22) { animation-delay: 1.05s; }

  /* 输入框辉光 */
  @keyframes caretGlow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 24px var(--gold-glow); }
  }

  .price-input:focus { animation: caretGlow 2.5s ease-in-out infinite; }

  /* 响应式 */
  @media (max-width: 1100px) {
    .main-grid {
      grid-template-columns: 1fr;
    }
    .container { padding: 20px 16px; }
    .price-input { font-size: 33px; }
    .ladder-grid {
      grid-template-columns: 50px 0.95fr 0.95fr 0.8fr 0.9fr 0.95fr 0.5fr 0.55fr;
    }
    .ladder-thead > div:first-child, .ladder-row .col-rank { padding-left: 16px; }
    .ladder-thead > div:last-child, .ladder-row .col-recovery { padding-right: 16px; }
    .col-price { font-size: 18px; }
  }

  /* 移动端档位表：独立横向滚动容器，保留全量 8 列（与行情软件一致）。
     overflow-y: hidden 让容器只承担横向滚动，竖向手势上抛给页面；
     不再设置 touch-action，方向锁定交给浏览器原生行为 */
  @media (max-width: 900px) {
    .ladder-scroll {
      scrollbar-width: none;
      overflow-y: hidden;
    }
    .ladder-scroll::-webkit-scrollbar { display: none; }
    .ladder-grid {
      min-width: 640px;
      grid-template-columns: 50px 1.1fr 1.3fr 1fr 1.15fr 1.2fr 1.1fr 1.3fr;
    }
  }

  @media (max-width: 600px) {
    .panel-title { font-size: 20px; }
    .price-input { font-size: 29px; }

    /* 顶部品牌条 */
    .brand { margin-bottom: 14px; padding-bottom: 10px; }
    .brand-mark { font-size: 12px; padding: 2px 6px; }
    .brand-title { font-size: 15px; }
    .brand-meta { font-size: 10px; letter-spacing: 0.1em; }
    .brand-left { gap: 8px; }

    /* 输入面板：压缩留白、隐藏桌面快捷键提示、加大触控按钮 */
    .input-card { padding: 18px 16px 16px; }
    .baseline-card, .position-card { padding: 14px 16px; }
    .tip-card { padding: 14px 16px; font-size: 14px; }
    .input-hint { display: none; }
    .quick-btn { padding: 10px 0; font-size: 15px; }
    .target-price-input { font-size: 28px; }
    .target-slider { height: 28px; }
    .shares-input { font-size: 25px; }
    .ladder-topbar-sub { display: none; }
  }

  /* ============= 交易心法语录 ============= */
  .mantra-block {
    margin-top: 32px;
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    padding: 28px 28px 26px;
    position: relative;
    overflow: hidden;
  }

  .mantra-block::before,
  .mantra-block::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gold-primary);
  }

  .mantra-block::before {
    top: 0; left: 0;
    border-right: none; border-bottom: none;
  }

  .mantra-block::after {
    bottom: 0; right: 0;
    border-left: none; border-top: none;
  }

  .mantra-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-line);
    padding-bottom: 14px;
    margin-bottom: 22px;
  }

  .mantra-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.08em;
  }

  .mantra-title em {
    font-style: normal;
    color: var(--gold-primary);
  }

  .mantra-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
  }

  .mantra-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold-primary);
    margin: 18px 0 10px;
  }

  .mantra-group-title::before {
    content: '';
    width: 4px;
    height: 14px;
    background: var(--gold-primary);
    flex-shrink: 0;
  }

  .mantra-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-line);
  }

  .mantra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
  }

  .mantra-card {
    background: var(--bg-row);
    border: 1px solid var(--bg-line);
    border-radius: 4px;
    padding: 16px 18px;
    transition: all 0.2s ease;
  }

  .mantra-card:hover {
    border-color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
  }

  .mantra-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--gold-primary);
    margin-bottom: 8px;
  }

  .mantra-card p {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
  }

  .mantra-card p strong {
    color: var(--text-primary);
    font-weight: 600;
  }

  .mantra-quotes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mantra-quote {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    padding: 12px 16px;
    border-left: 2px solid var(--gold-primary);
    background: rgba(212, 175, 55, 0.03);
  }

  .mantra-quote::before {
    content: '“';
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: var(--gold-primary);
    line-height: 1;
    flex-shrink: 0;
  }

  .mantra-quote em {
    font-style: normal;
    color: var(--gold-primary);
  }

  .mantra-quote .quote-text {
    min-width: 0;
  }

  .mantra-quote span.author {
    margin-left: auto;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  /* ============= 顶部导航 Tab ============= */
  .nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
  }

  .nav-tab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    border: 1px solid var(--bg-line);
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
  }

  .nav-tab:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
  }

  .nav-tab.active {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.08);
  }

  @media (max-width: 700px) {
    /* 移动端导航：换行成第二行紧凑双 tab，仍可一键切换两个页面 */
    .brand { flex-wrap: wrap; gap: 8px 0; }
    .nav-tabs {
      display: flex;
      order: 3;
      width: 100%;
      margin: 6px 0 0;
      gap: 8px;
    }
    .nav-tab {
      flex: 1;
      justify-content: center;
      padding: 9px 8px;
      font-size: 12px;
      letter-spacing: 0.08em;
    }
  }

  /* ============= 交易心法移动端适配 ============= */
  /* 心法基础样式在文件后段声明，响应式覆盖须放在其后再声明才生效 */
  @media (max-width: 900px) {
    .mantra-grid { grid-template-columns: 1fr 1fr; }
    .mantra-quotes { grid-template-columns: 1fr; }
  }

  @media (max-width: 600px) {
    .mantra-block { padding: 20px 14px; }
    .mantra-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 16px; }
    .mantra-grid { grid-template-columns: 1fr; }
    .mantra-quotes { grid-template-columns: 1fr; }
    .mantra-card p { font-size: 14px; }
  }
