/* 自由回测（需求 67 乙，docs/70 §9）：选题页底部入口、用户菜单入口、说明 / 新建 / 列表 / 结果页、练习台的明牌标签。
   375 宽：所有页面都不横向滚动（成交表单独在自己的框里横向滚） */
.bt-entry { padding: 8px 10px; }
.bt-entry .bt-entry-card { min-width: 0; }
.userbox .ub-bt { font-size: 12px; color: var(--sh-link, #8fb7ff); text-decoration: none; white-space: nowrap; }
.userbox .ub-bt:hover { text-decoration: underline; }
.bt-tag { border-color: var(--sh-link, #8fb7ff); color: var(--sh-link, #8fb7ff); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; }

.bt-page { max-width: 980px; margin: 0 auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; width: 100%; }
.bt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bt-head h2 { margin: 0; font-size: 20px; }
.bt-badge { font-size: 11px; font-weight: 400; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--sh-link, #8fb7ff); color: var(--sh-link, #8fb7ff); vertical-align: middle; }
.bt-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bt-card h3 { margin: 0; font-size: 15px; }
.bt-lead { margin: 0; line-height: 1.6; }
.bt-notes { margin: 0; padding-left: 1.3em; line-height: 1.7; color: var(--muted); }
.bt-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 6px; background: var(--panel2); }
.bt-page .btn-link { display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; border-radius: 6px; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--panel2); }
.bt-page .btn-link.primary { background: var(--accent); border-color: var(--accent); color: var(--sh-on-fill, #fff); }
.bt-page .btn-link.disabled { opacity: .5; cursor: not-allowed; }
.bt-quota-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bt-quota { margin: 0; color: var(--muted); }

.bt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bt-item { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bt-item-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bt-sym { font-size: 16px; color: var(--text); }
.bt-item .bt-tag { font-size: 11px; padding: 0 7px; border-radius: 9px; border: 1px solid var(--up); color: var(--up); }
.bt-item .bt-tag.done { border-color: var(--muted); color: var(--muted); }
.bt-item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.bt-item-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-item-acts > * { min-height: 36px; }
.danger-text { color: var(--loss-fg); }
.bt-empty { margin: 6px 0; }

.bt-form { display: flex; flex-direction: column; gap: 12px; }
.bt-field { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.bt-field legend { padding: 0; margin-bottom: 4px; }
fieldset.bt-field { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
fieldset.bt-field legend { width: 100%; }
#bt-q { max-width: 260px; text-transform: uppercase; }
#bt-q::placeholder { text-transform: none; }
.bt-hits { list-style: none; margin: -6px 0 0; padding: 0; max-width: 420px; border: 1px solid var(--line); border-radius: 6px; max-height: 260px; overflow: auto; background: var(--panel2); }
.bt-hits li { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.bt-hits li:last-child { border-bottom: 0; }
.bt-hits li:hover, .bt-hits li:focus { background: var(--sh-tint-accent-soft, rgba(37, 99, 235, .18)); outline: none; }
.bt-picked { padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--panel2); overflow-wrap: anywhere; }
.bt-cash { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-cash-btn.on { border-color: var(--accent); background: var(--sh-tint-accent-strong, rgba(37, 99, 235, .22)); color: var(--sh-text-hi, #fff); }

.bt-res-title { font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.bt-isolate { margin: 0; color: var(--warn); font-size: 13px; }
.bt-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bt-stat { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.bt-stat .muted { font-size: 12px; }
.bt-stat b { font-size: 16px; }
.bt-stat b.pos, .bt-trades .pos { color: var(--gain-fg); }
.bt-stat b.neg, .bt-trades .neg { color: var(--loss-fg); }
.bt-eq { height: 280px; min-width: 0; }
.bt-flags { margin: 0; padding-left: 1.3em; line-height: 1.7; }
.bt-table-wrap { overflow-x: auto; max-width: 100%; }
.bt-trades { width: 100%; font-size: 13px; white-space: nowrap; }
.bt-trades th { text-align: left; color: var(--muted); font-weight: 400; }
.bt-res-acts { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
  .bt-page { padding: 8px; }
  .bt-head h2 { font-size: 18px; }
  #bt-q { max-width: none; }
  .bt-eq { height: 220px; }
  .bt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-tag { max-width: 22ch; }
  .userbox .ub-bt { font-size: 11px; }
}
