html,
body.tm-market-page {
    background: #fff !important;
    color: #222;
}
body.tm-market-page .tm-site-header,
body.tm-market-page .tm-market-main-tabs,
body.tm-market-page .tm-market-mobile-toolbar,
body.tm-market-page .tm-market-mobile-search,
body.tm-market-page .tm-home-summary,
body.tm-market-page .tm-market-side,
body.tm-market-page .customer-service,
body.tm-market-page #tm-global-footer-host {
    display: none !important;
}
body.tm-market-page .tm-market-stage {
    min-height: 100vh;
    padding: 4px 8px 64px;
    background: #fff;
}
body.tm-market-page .tm-market-stage::after { display: none; }
body.tm-market-page .tm-market-shell {
    width: 100%;
    max-width: 1100px;
    min-height: calc(100vh - 72px);
    margin: 0 auto;
    padding: 0 18px 20px;
    background: #fff;
}
.tm-market-title {
    height: 48px;
    margin: 0 -18px;
    border-bottom: 4px solid #f3f4f6;
    text-align: center;
    line-height: 44px;
    font-size: 16px;
    font-weight: 600;
}
body.tm-market-page .tm-market-layout {
    display: block;
    margin: 0;
}
body.tm-market-page .tm-market-main { display: block; }
body.tm-market-page .tm-market-board {
    display: block;
    background: #fff;
    border: 0;
    overflow: visible;
}
body.tm-market-page .tm-market-table-header,
body.tm-market-page .tm-market-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.65fr) 82px;
    column-gap: 12px;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
}
body.tm-market-page .tm-market-table-header {
    min-height: 46px;
    background: #fff;
    color: #888f99;
    font-size: 13px;
    font-weight: 400;
}
body.tm-market-page .tm-market-table-header > :nth-child(2) { text-align: right; }
body.tm-market-page .tm-market-table-header > :nth-child(3) { text-align: center; }
body.tm-market-page .tm-market-table-body { min-height: 0; }
body.tm-market-page .tm-market-table-row {
    min-height: 76px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf0f3;
    color: #252525;
    font-size: 14px;
}
body.tm-market-page .tm-market-table-row:hover {
    background: #f8fbfc;
    box-shadow: none;
}
body.tm-market-page .tm-market-name {
    min-width: 0;
    gap: 8px;
    align-items: center;
}
body.tm-market-page .tm-market-name img,
body.tm-market-page .tm-market-name .tm-market-symbol-badge {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
}
body.tm-market-page .tm-market-name-details { min-width: 0; }
body.tm-market-page .tm-market-name-main {
    color: #242424;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tm-market-page .tm-market-name-sub {
    display: block;
    margin-top: 6px;
    color: #90969d;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tm-market-page .tm-market-price {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    color: #e7473e;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
body.tm-market-page .tm-market-price.is-up { color: #1eb889; }
body.tm-market-page .tm-market-price small {
    color: #848b92;
    font-size: 12px;
    font-weight: 400;
}
body.tm-market-page .tm-market-price > span:not(.tm-market-change),
body.tm-market-page .tm-market-price > small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tm-market-page .tm-market-change {
    display: inline-flex;
    justify-self: stretch;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 0;
    padding: 0 2px;
    border-radius: 5px;
    background: #e7493f;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
body.tm-market-page .tm-market-change.is-up { background: #22b88c; }
body.tm-market-page .tm-market-change.is-unavailable { background: #a6adb6; }
body.tm-market-page .tm-market-empty { color: #818994; }
@media (max-width: 640px) {
    body.tm-market-page .tm-market-stage { padding: 4px 8px 64px; background: #fff; }
    body.tm-market-page .tm-market-shell { padding: 0 18px 20px; }
    body.tm-market-page .tm-market-table-header,
    body.tm-market-page .tm-market-table-row {
        grid-template-columns: minmax(0, 1fr) minmax(75px, 0.67fr) 82px;
        column-gap: 10px;
    }
}
@media (max-width: 380px) {
    body.tm-market-page .tm-market-shell { padding-left: 12px; padding-right: 12px; }
    .tm-market-title { margin-left: -12px; margin-right: -12px; }
    body.tm-market-page .tm-market-table-header,
    body.tm-market-page .tm-market-table-row {
        grid-template-columns: minmax(0, 1fr) minmax(72px, 0.67fr) 70px;
        column-gap: 6px;
    }
    body.tm-market-page .tm-market-change { font-size: 11px; }
    body.tm-market-page .tm-market-price { font-size: 13px; }
}

/* Market terminal: this stylesheet is loaded only by /index/index/market. */
html:root, body.tm-market-page, body.tm-market-page .tm-market-stage {
    background: #fff !important;
    color: #171b24;
}
body.tm-market-page .tm-mobile-bottom-bar { display: none !important; }
body.tm-market-page .tm-market-stage {
    min-height: 100vh;
    padding: 0 0 16px;
}
body.tm-market-page .tm-market-shell {
    max-width: none;
    padding: 0 14px;
    min-height: 0;
}
body.tm-market-page .tm-market-desktop-top {
    height: 43px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #edf0f6;
    white-space: nowrap;
}
.tm-market-desktop-logo {
    width: 90px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex: 0 0 90px;
}
.tm-market-desktop-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tm-market-brand { text-decoration: none; color: #111; }
.tm-market-brand > span { display: block; position: relative; color: #111; font-size: 19px; letter-spacing: -1.8px; line-height: 1; font-weight: 900; font-style: italic; }
.tm-market-brand > span::after { content: ""; position: absolute; left: 69%; top: 1px; width: 2px; height: 18px; transform: rotate(-29deg); background: #ec283e; }
.tm-market-brand small { display: block; font-size: 4px; font-style: normal; letter-spacing: 1.2px; text-align: center; margin-top: 2px; }
.tm-market-top-action, .tm-market-periods button {
    background: #fff;
    border: 0;
    color: #202431;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 7px;
}
.tm-market-top-action.is-active, .tm-market-periods button.is-active {
    background: #e5f0ff;
    color: #0666f7;
}
.tm-market-periods { display: flex; gap: 3px; align-items: center; }
.tm-market-top-spacer { flex: 1 1 auto; }
.tm-market-top-user { display: inline-flex; align-items: center; gap: 6px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: #3b4453; text-decoration: none; font-size: 14px; }
.tm-market-top-user > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-market-top-user .tm-market-top-avatar { flex: 0 0 22px; width: 22px; height: 22px; display: block; color: #0166fc; }
body.tm-market-page .tm-market-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr) 260px;
    gap: 7px;
    margin: 3px 0 0;
    height: min(620px, calc(100vh - 365px));
    min-height: 440px;
}
body.tm-market-page .tm-market-main, body.tm-market-page .tm-market-board,
.tm-market-workspace, .tm-market-chart-panel, .tm-market-order-side {
    min-width: 0;
    min-height: 0;
}
body.tm-market-page .tm-market-main { display: block; border: 1px solid #f0f1f5; border-radius: 10px; overflow: hidden; }
body.tm-market-page .tm-market-board { height: 100%; display: flex; flex-direction: column; }
.tm-market-desktop-filter { display: flex; gap: 8px; align-items: center; height: 49px; padding: 4px 8px; }
.tm-market-desktop-search {
    height: 32px; display: flex; align-items: center; gap: 5px; border-radius: 19px;
    padding: 0 10px; background: #f5f5f7; min-width: 0; flex: 1;
}
.tm-market-desktop-search span { font-size: 24px; color: #404b60; line-height: 1; }
.tm-market-desktop-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; }
.tm-market-desktop-filter select { width: 120px; height: 32px; color: #657182; border: 1px solid #e4e8f1; background: #fff; border-radius: 4px; font-size: 12px; }
body.tm-market-page .tm-market-table-body { min-height: 0; overflow-y: auto; flex: 1; scrollbar-width: thin; }
body.tm-market-page .tm-market-table-row {
    display: grid;
    grid-template-columns: minmax(87px, 1fr) minmax(63px, .75fr) 62px;
    gap: 3px;
    height: 53px;
    min-height: 53px;
    padding: 2px 8px;
    border-bottom: 1px solid #eef0f4;
    color: #222;
    border-radius: 0;
}
body.tm-market-page .tm-market-table-row:hover {
    background: #f5f9ff;
    box-shadow: none;
}
/* 选中品种底色加深（与 hover 浅色区分开） */
body.tm-market-page .tm-market-table-row.is-selected {
    background: #dce4f0;
    box-shadow: none;
}
body.tm-market-page .tm-market-name { gap: 5px; }
body.tm-market-page .tm-market-name-main { font-size: 12px; color: #202126; font-weight: 500; }
.tm-market-icon-wrap { width: 37px; height: 37px; position: relative; display: inline-block; flex: 0 0 37px; }
body.tm-market-page .tm-market-icon-wrap .tm-market-asset-icon,
body.tm-market-page .tm-market-icon-wrap .tm-market-symbol-badge {
    width: 24px; height: 24px; position: absolute; bottom: 1px; left: 1px;
    border-radius: 50%; object-fit: cover;
}
body.tm-market-page .tm-market-icon-wrap .tm-market-quote-flag {
    width: 23px; height: 23px; position: absolute; right: 0; top: 0;
    border-radius: 50%; object-fit: cover; z-index: 1;
}
body.tm-market-page .tm-market-price {
    display: contents;
    font-size: 12px; font-weight: 500; color: #f03b4c;
}
body.tm-market-page .tm-market-price.is-up { color: #0769f9; }
body.tm-market-page .tm-market-price > span:first-child {
    align-self: center; color: #f03b4c; font-size: 12px; white-space: nowrap;
    overflow: hidden; text-overflow: clip;
}
body.tm-market-page .tm-market-price.is-up > span:first-child { color: #0769f9; }
body.tm-market-page .tm-market-change {
    flex: none; min-width: 62px; max-width: 62px; height: 25px; align-self: center;
    background: #f23c4e; color: #fff !important; font-size: 10px; border-radius: 6px;
    white-space: nowrap; padding: 0;
}
body.tm-market-page .tm-market-change.is-up { background: #0966f9; }
/* 休市：灰色块 + 「休市」文案 */
body.tm-market-page .tm-market-change.is-closed { background: #a9b1bb; }
/* PC 宽屏不再显示迷你趋势（仅 ≤700px 移动端卡片保留） */
.tm-market-sparkline { display: none; height: 37px; width: 100%; overflow: hidden; }
.tm-market-sparkline svg { width: 100%; height: 100%; display: block; }
.tm-market-workspace, .tm-market-chart-panel { height: 100%; }
.tm-market-chart-panel { border: 1px solid #f0f1f5; border-radius: 10px; display: flex; flex-direction: column; padding: 8px 10px; }
.tm-market-chart-caption { flex: 0 0 40px; padding: 0 9px; font-size: 11px; }
.tm-market-chart-caption strong { display: block; color: #121820; font-size: 13px; }
.tm-market-chart-caption #tm-market-ohlc { color: #77808e; margin-top: 5px; }
.tm-market-chart-wrap { position: relative; flex: 1; min-height: 0; }
.tm-market-chart-wrap canvas { width: 100% !important; height: 100% !important; }
#tm-market-chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a2a9b3; font-size: 13px; pointer-events: none; }
#tm-market-chart-empty[hidden] { display: none; }
.tm-market-order-side { display: flex; flex-direction: column; gap: 12px; }
.tm-market-account { background: #0662ed; border-radius: 10px; color: #fff; height: 95px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.tm-market-account small { font-size: 12px; }
.tm-market-account span { font-size: 12px; opacity: .85; }
.tm-market-account strong { font-size: 24px; }
.tm-market-order-form { min-height: 0; background: #fff; border: 1px solid #f0f1f5; border-radius: 10px; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; }
.tm-market-order-form > strong { font-size: 13px; font-weight: 500; }
.tm-market-order-form > b { color: #0966f9; font-size: 18px; line-height: 1; }
.tm-market-order-form label { font-size: 12px; color: #222; margin-top: 2px; }
.tm-market-order-form input, .tm-market-order-form select, .tm-market-select-readonly {
    border: 1px solid #dce3ed; border-radius: 4px; height: 30px; width: 100%;
    padding: 0 8px; font: inherit; color: #414a57; font-size: 12px; background: #fff;
}
.tm-market-select-readonly { display: flex; align-items: center; }
.tm-market-kind-toggle { display: flex; gap: 8px; }
.tm-market-kind-toggle button { flex: 1; border: 1px solid #dce3ed; border-radius: 4px; height: 30px; font: inherit; font-size: 12px; color: #414a57; background: #fff; cursor: pointer; padding: 0 8px; }
.tm-market-kind-toggle button.is-active { border-color: #0769f9; color: #0769f9; background: #e6efff; }
.tm-market-pos-stats { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; color: #79818c; }
.tm-market-pos-stats[hidden], .tm-market-pos-cats[hidden] { display: none; }
.tm-market-pos-stats b { font-weight: 600; color: #171d26; margin-left: 2px; }
.tm-market-pos-stats span[hidden] { display: none; }
.tm-market-pos-cats { display: flex; align-items: center; gap: 4px; padding: 6px 0 2px; border-bottom: 1px solid #f0f1f5; }
.tm-market-pos-cats button { border: 0; background: none; font: inherit; font-size: 12px; color: #79818c; cursor: pointer; padding: 3px 10px; border-radius: 4px; }
.tm-market-pos-cats button:hover { color: #0769f9; }
.tm-market-pos-cats button.is-active { color: #0769f9; background: #e6efff; font-weight: 600; }
.tm-market-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 46px 0 34px; color: #b3b9c2; font-size: 13px; }
.tm-market-empty-state svg { width: 92px; height: 76px; }
.tm-market-order-metrics { display: flex; justify-content: space-between; gap: 5px; margin-top: 9px; font-size: 12px; }
/* 秒合约信息行：盈利率/预估手续费/账户余额（标签左、数值右） */
.tm-quick-info { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 9px; font-size: 12px; color: #79818c; }
.tm-quick-info strong { color: #171d26; font-weight: 600; font-variant-numeric: tabular-nums; }
.tm-market-order-buttons { display: flex; gap: 8px; margin-top: 5px; }
.tm-market-order-buttons button { flex: 1; border: 0; border-radius: 20px; height: 29px; color: #fff; background: #0769f9; cursor: pointer; }
.tm-market-order-buttons .tm-market-sell { background: #f03d4c; }
.tm-market-order-buttons button:disabled { opacity: .5; cursor: wait; }
.tm-market-order-feedback { margin: 0; min-height: 16px; font-size: 11px; color: #d83242; }
/* ===== 交易面板：合约/秒合约 选项卡 + 秒合约倒计时浮动条 ===== */
.tm-market-trade-tabs { display: flex; border-bottom: 1px solid #f0f1f5; margin: 2px 0 4px; }
.tm-market-trade-tabs button { position: relative; flex: 1; border: 0; background: none; padding: 7px 2px; font: inherit; font-size: 13px; color: #7b8493; cursor: pointer; }
.tm-market-trade-tabs button.is-active { color: #0769f9; font-weight: 600; }
.tm-market-trade-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: #0769f9; }
#tm-quick-fields[hidden], #tm-contract-fields[hidden], #tm-pos-tab-pending[hidden], .tm-quick-holdings[hidden] { display: none !important; }
.tm-market-order-buttons .tm-market-buy.is-up { background: #0769f9; }
.tm-market-order-buttons .tm-market-sell.is-down { background: #f03d4c; }
/* 秒合约周期快捷标签（两列网格，仅周期，选中蓝框+右上对勾） */
.tm-quick-plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 2px 0 8px; }
.tm-quick-plan { position: relative; display: flex; align-items: center; justify-content: center; padding: 9px 4px; border: 1px solid #e3e7ee; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; line-height: 1.25; }
.tm-quick-plan b { font-size: 13px; font-weight: 600; color: #2a313c; }
.tm-quick-plan.is-active { border-color: #0769f9; background: #f2f7ff; }
.tm-quick-plan-check { position: absolute; top: 4px; right: 5px; width: 10px; height: 6px; border-left: 2px solid #0769f9; border-bottom: 2px solid #0769f9; transform: rotate(-45deg); }
.tm-quick-holdings { display: flex; flex-direction: column; gap: 6px; }
.tm-quick-holding { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #e9edf3; border-left: 3px solid #0769f9; border-radius: 8px; background: #fff; font-size: 12px; color: #414a57; }
.tm-quick-holding.is-down { border-left-color: #f03d4c; }
.tm-qh-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-qh-head { display: flex; align-items: center; gap: 6px; }
.tm-qh-head b { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #171d26; font-size: 12px; }
.tm-qh-badge { flex: none; padding: 0 7px; border-radius: 8px; font-size: 10px; line-height: 15px; font-style: normal; color: #fff; background: #0769f9; }
.tm-quick-holding.is-down .tm-qh-badge { background: #f03d4c; }
.tm-qh-quote { display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
.tm-qh-quote em { font-style: normal; color: #a2a9b3; margin-right: 3px; }
.tm-qh-right { flex: none; text-align: right; }
.tm-qh-timer { font-size: 19px; font-weight: 700; color: #171d26; line-height: 1; font-variant-numeric: tabular-nums; }
/* 秒合约倒计时弹窗（居中卡片：紫色环形进度+订单详情，到期自动关闭） */
.tm-qc-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; background: rgba(13, 20, 32, 0.55); padding: 20px; }
.tm-qc-mask[hidden] { display: none; }
.tm-qc-card { position: relative; width: 320px; max-width: 100%; background: #fff; border-radius: 16px; padding: 20px 20px 12px; box-shadow: 0 18px 48px rgba(13, 20, 32, 0.22); }
.tm-qc-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 20px; line-height: 1; color: #9aa2ae; cursor: pointer; }
.tm-qc-close:hover { color: #414a57; }
.tm-qc-ring { position: relative; width: 128px; height: 128px; margin: 4px auto 14px; }
.tm-qc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tm-qc-ring circle { fill: none; stroke-width: 9; }
.tm-qc-ring-bg { stroke: #eef1f6; }
.tm-qc-ring-fg { stroke: #0166fc; stroke-linecap: round; stroke-dasharray: 339.292; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.tm-qc-ring b { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 27px; color: #2b2350; font-variant-numeric: tabular-nums; }
/* 结算等待/结果态：系统计算中 → 盈亏显示 */
.tm-qc-ring b.is-pending { font-size: 14px; font-weight: 700; color: #0166fc; white-space: nowrap; }
.tm-qc-ring b.is-win, .tm-qc-ring b.is-lose { font-size: 21px; }
.tm-qc-ring b.is-win { color: #12b76a; }
.tm-qc-ring b.is-lose { color: #f03d4c; }
.tm-qc-card.is-qc-pending .tm-qc-ring-fg, .tm-qc-card.is-qc-win .tm-qc-ring-fg { stroke-dashoffset: 0; }
.tm-qc-card.is-qc-win .tm-qc-ring-fg { stroke: #12b76a; transition: none; }
.tm-qc-card.is-qc-lose .tm-qc-ring-fg { stroke: #f03d4c; transition: none; }
.tm-qc-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.tm-qc-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-qc-item.tm-qc-right { align-items: flex-end; }
.tm-qc-item em { font-style: normal; font-size: 12px; color: #97a0ac; }
.tm-qc-item span { font-size: 14px; font-weight: 600; color: #1c2430; }
.tm-qc-line { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.tm-qc-line em { font-style: normal; font-size: 12px; color: #97a0ac; }
.tm-qc-line span { font-weight: 600; color: #1c2430; }
.tm-qc-dir { display: inline-flex; padding: 3px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff !important; background: #0166fc; }
.tm-qc-dir.is-up, .tm-qc-dir.is-down { color: #fff !important; background: #0166fc; }
.tm-qc-symbol { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-qc-pnl { color: #0166fc !important; }
/* 结算完成：底部手动关闭按钮 */
.tm-qc-close-btn { display: block; width: 100%; margin-top: 10px; padding: 11px 0; border: 0; border-radius: 10px; background: #0166fc; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tm-qc-close-btn:hover { background: #0153cc; }
.tm-qc-close-btn[hidden] { display: none; }
.tm-market-positions { min-height: 220px; border: 1px solid #f0f1f5; border-radius: 9px; margin-top: 9px; padding: 6px 14px; }
.tm-market-position-tabs { display: flex; align-items: center; gap: 26px; height: 27px; }
.tm-market-position-tabs button { border: 0; background: none; color: #aab0b9; cursor: pointer; font-size: 13px; padding: 0; }
.tm-market-position-tabs button.is-active { color: #0666f7; }
.tm-market-positions-head, .tm-market-position-row { display: grid; grid-template-columns: 1.1fr 0.85fr 0.65fr 0.65fr 1fr 1fr 0.8fr 0.8fr 0.9fr 0.8fr 1.15fr 1.4fr; gap: 6px; align-items: center; min-height: 25px; font-size: 11px; }
/* 历史视图 13 列：交易对/订单号/方向/手数/下单价/平仓价/止盈/止损/手续费/保证金/收益/开仓时间/平仓时间 */
.tm-market-positions-head.is-filled, .tm-market-position-row.is-filled { grid-template-columns: 1.05fr 0.8fr 0.6fr 0.55fr 0.95fr 0.95fr 0.75fr 0.75fr 0.75fr 0.8fr 0.8fr 1.1fr 1.1fr; }
.tm-market-positions-head { color: #adb2bc; }
.tm-market-position-row { color: #313844; border-top: 1px solid #eff1f4; }
body.tm-trade-quick .tm-market-positions-head, body.tm-trade-quick .tm-market-position-row { grid-template-columns: 1.2fr repeat(5, 1fr); }
.tm-pos-actions { display: flex; gap: 4px; justify-content: flex-start; }
.tm-pos-direction { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 11px; line-height: 15px; }
.tm-pos-direction.is-buy { background: #0769f9; color: #fff; }
.tm-pos-direction.is-sell { background: #f03d4c; color: #fff; }
.tm-pos-btn { border: 1px solid #d6dbe3; background: #fff; color: #313844; border-radius: 4px; padding: 2px 8px; font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap; }
.tm-pos-btn:hover { border-color: #0769f9; color: #0769f9; }
.tm-pos-btn.is-close { border-color: #f03d4c; color: #f03d4c; }
.tm-pos-btn.is-close:hover { background: #f03d4c; color: #fff; }
/* TP/SL 弹窗（独立样式，不复用 tm-market-confirm-dialog，避免通用 div/button 规则干扰） */
.tm-sl-dialog { position: relative; width: min(320px, 92vw); padding: 20px; border-radius: 12px; background: #fff; color: #1c2330; box-shadow: 0 15px 50px #12213d33; text-align: left; }
.tm-sl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.tm-sl-head strong { font-size: 15px; color: #1c2330; }
.tm-sl-x { padding: 4px 6px; margin: 0; border: 0; background: transparent; color: #98a0ad; font-size: 21px; line-height: 1; cursor: pointer; }
.tm-sl-x:hover { color: #5b6470; }
.tm-sl-field { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.tm-sl-field label { flex: 0 0 64px; text-align: right; font-size: 13px; color: #5b6470; margin: 0; }
.tm-sl-stepper { display: flex; align-items: stretch; border: 1px solid #e2e6ee; border-radius: 6px; overflow: hidden; background: #fff; }
.tm-sl-stepper button { width: 36px; height: 34px; padding: 0; margin: 0; border: 0; border-radius: 0; background: #f5f6f9; color: #98a0ad; font-size: 15px; line-height: 34px; cursor: pointer; }
.tm-sl-stepper button:hover { background: #e8ebf2; color: #5b6470; }
.tm-sl-stepper input { width: 116px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: 0; background: #fff; color: #1c2330; font-size: 13px; text-align: center; outline: none; box-shadow: none; }
.tm-sl-stepper input::-webkit-outer-spin-button, .tm-sl-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tm-sl-stepper input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.tm-sl-save { display: block; width: 266px; max-width: 100%; height: 38px; padding: 0; margin: 22px auto 0; border: 0; border-radius: 6px; background: #0769f9; color: #fff; font-size: 13px; line-height: 38px; cursor: pointer; }
.tm-sl-save:hover { background: #065cd9; }
/* 操作结果提示浮层（成功/失败消息，盖过 TP/SL 弹窗 z-index 200） */
.gt-toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10001; max-width: 76vw; padding: 12px 18px; border-radius: 8px; background: rgba(0, 0, 0, 0.82); color: #ffffff; font-size: 14px; line-height: 1.5; text-align: center; word-break: break-word; pointer-events: none; animation: gt-toast-in 0.18s ease; }
@keyframes gt-toast-in { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.gt-toast.is-out { transition: opacity 0.25s ease; opacity: 0; }
.tm-market-position-row .tm-pos-pl.is-positive, .tm-orders-pl.is-positive, .tm-orders-card-pl.is-positive { color: #0869f9; font-weight: 600; }
.tm-market-position-row .tm-pos-pl.is-negative, .tm-orders-pl.is-negative, .tm-orders-card-pl.is-negative { color: #f13f4e; font-weight: 600; }
.tm-market-position-list { min-height: 160px; color: #9da5b0; display: block; padding-top: 5px; font-size: 12px; }
.tm-market-position-list.is-empty { display: flex; justify-content: center; align-items: center; }
.tm-market-mobile-head, .tm-market-bottom-nav { display: none; }
.tm-market-confirm[hidden] { display: none !important; }
.tm-market-confirm { position: fixed; inset: 0; background: rgba(14,24,40,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tm-market-confirm-dialog { width: min(350px, 100%); padding: 20px; border-radius: 12px; background: #fff; color: #1b2638; box-shadow: 0 15px 50px #12213d33; }
.tm-market-confirm-dialog strong { font-size: 16px; }
.tm-market-confirm-dialog p { line-height: 1.5; white-space: pre-line; font-size: 13px; }
.tm-market-confirm-dialog div { display: flex; justify-content: flex-end; gap: 12px; }
.tm-market-confirm-dialog button { border: 0; border-radius: 5px; padding: 8px 17px; cursor: pointer; color: #fff; background: #0769f9; }
.tm-market-confirm-dialog button:first-child { background: #eef1f5; color: #333; }
@media (max-width: 900px) {
    body.tm-market-page .tm-market-layout { grid-template-columns: 210px minmax(0, 1fr) 230px; gap: 4px; }
    body.tm-market-page .tm-market-table-row { grid-template-columns: minmax(82px, 1fr) 68px 62px; }
    body.tm-market-page .tm-market-sparkline { display: none; }
}
@media (max-width: 700px) {
    html:root, body.tm-market-page { background: #f9fbfe !important; }
    body.tm-market-page .tm-market-stage { min-height: 100vh; padding: 0 0 calc(77px + env(safe-area-inset-bottom)); overflow: visible; background: #f9fbfe !important; }
    body.tm-market-page .tm-market-shell { padding: 0 15px; max-width: 460px; margin: 0 auto; }
    body.tm-market-page .tm-market-mobile-head { display: flex; align-items: center; justify-content: space-between; height: 64px; }
    .tm-market-locale { width: 36px; height: 26px; display: flex; align-items: center; font-size: 25px; line-height: 1; text-decoration: none; }
    .tm-market-locale img { display: block; width: 30px; height: 20px; object-fit: contain; }
    .tm-market-tw-flag { display: block; position: relative; width: 30px; height: 20px; background: #ed182b; }
    .tm-market-tw-flag::before { content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 10px; background: #122a91; }
    .tm-market-tw-flag::after { content: ""; position: absolute; left: 5px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
    .tm-market-logo { width: 94px; height: 31px; display: inline-flex; align-items: center; justify-content: center; background: transparent; }
    .tm-market-logo > span { font-size: 29px; }
    .tm-market-logo small { font-size: 6px; }
    body.tm-market-page .tm-market-mobile-search-toggle { display: flex; align-items: center; justify-content: center; width: 37px; height: 37px; border: 1px solid #eff1f7; border-radius: 8px; background: #fff; color: #222; box-shadow: 0 3px 15px #c3cbd62b; }
    body.tm-market-page .tm-market-mobile-search-toggle svg { width: 23px; height: 23px; }
    body.tm-market-page .tm-market-mobile-toolbar { display: block !important; height: 48px; margin: 0 -15px 8px; }
    body.tm-market-page .tm-market-mobile-toolbar .tm-market-main-tabs { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 5px 16px; background: #fff; border-radius: 0; }
    body.tm-market-page .tm-market-main-tab { background: #f1f3f7; color: #0d1119; border-radius: 18px; min-height: 29px; font-size: 15px; font-weight: 500; padding: 0 12px; line-height: 28px; }
    body.tm-market-page .tm-market-main-tab.is-active { background: #e2edff; color: #0966f9; }
    body.tm-market-page .tm-market-mobile-search { display: none; background: #fff; border: 1px solid #e5eaf1; border-radius: 9px; margin: 0 0 10px; }
    body.tm-market-page .tm-market-stage.is-search-open .tm-market-mobile-search { display: flex; }
    body.tm-market-page .tm-market-desktop-top, .tm-market-desktop-filter, .tm-market-workspace, .tm-market-order-side, .tm-market-positions { display: none !important; }
    body.tm-market-page .tm-market-layout { display: block; height: auto; min-height: 0; margin: 0; }
    body.tm-market-page .tm-market-main { border: 0; border-radius: 0; overflow: visible; }
    body.tm-market-page .tm-market-board { display: block; background: transparent; overflow: visible; }
    body.tm-market-page .tm-market-table-body { overflow: visible; }
    body.tm-market-page .tm-market-table-row {
        display: grid; grid-template-columns: minmax(125px, 1.35fr) minmax(68px, .85fr) minmax(80px, .9fr);
        gap: 4px; min-height: 66px; height: 66px; margin: 0 0 9px; padding: 0 10px;
        background: #fff; border: 0; border-radius: 16px; box-shadow: 0 2px 11px #cad4e123;
    }
    body.tm-market-page .tm-market-name { gap: 6px; }
    body.tm-market-page .tm-market-name-main { font-size: 15px; font-weight: 400; }
    body.tm-market-page .tm-market-icon-wrap { flex-basis: 44px; width: 44px; height: 43px; }
    body.tm-market-page .tm-market-icon-wrap .tm-market-asset-icon, body.tm-market-page .tm-market-icon-wrap .tm-market-symbol-badge { width: 25px; height: 25px; bottom: 2px; }
    body.tm-market-page .tm-market-icon-wrap .tm-market-quote-flag { width: 23px; height: 23px; right: 3px; top: 2px; }
    body.tm-market-page .tm-market-price { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; font-size: 15px; color: #18202d; }
    body.tm-market-page .tm-market-price.is-up { color: #18202d; }
    body.tm-market-page .tm-market-price > span:first-child,
    body.tm-market-page .tm-market-price.is-up > span:first-child { align-self: flex-start; color: #18202d; font-size: 15px; }
    body.tm-market-page .tm-market-change, body.tm-market-page .tm-market-change.is-up {
        display: block; flex: none; min-width: 0; max-width: none; height: auto; align-self: flex-start;
        background: none; color: #ff3b4a !important; font-size: 13px; font-weight: 600; line-height: 1;
    }
    body.tm-market-page .tm-market-change.is-up { color: #0769f9 !important; }
    /* 移动端卡片：休市为灰色文字，无底色无箭头 */
    body.tm-market-page .tm-market-change.is-closed { color: #98a1ab !important; background: none; }
    body.tm-market-page .tm-market-change.is-down::after { content: " ▾"; }
    body.tm-market-page .tm-market-change.is-up::after { content: " ▴"; }
    body.tm-market-page .tm-market-sparkline { display: block; height: 35px; }
    .tm-market-bottom-nav {
        display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
        grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(58px + env(safe-area-inset-bottom));
        padding: 0 0 env(safe-area-inset-bottom); background: #fff; box-shadow: 0 2px 29px #a1a1a12e;
    }
    .tm-market-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding-bottom: 3px; text-decoration: none; font-size: 13px; line-height: 16px; color: #cecece; white-space: nowrap; }
    .tm-market-bottom-nav a.is-active { color: #0166fc; }
    .tm-market-bottom-nav .tm-nav-icon { width: 30px; height: 30px; display: block; flex: none; fill: currentColor; background: none; border-radius: 0; }
    .tm-market-bottom-nav .tm-market-bottom-trade { justify-content: flex-start; padding: 0; }
    .tm-market-bottom-nav .tm-market-bottom-trade .tm-nav-icon { position: relative; top: -25px; width: 50px; height: 50px; fill: #0166fc; }
}

/* ---------- PC 端整体字号加大一点（仅 tm-device-pc 作用域，移动端不受影响） ---------- */
body.tm-device-pc .tm-market-table-header { font-size: 14px; }
body.tm-device-pc .tm-market-name-main { font-size: 13px; }
body.tm-device-pc .tm-market-price, body.tm-device-pc .tm-market-price > span:first-child { font-size: 13px; }
body.tm-device-pc .tm-market-change { font-size: 11px; }
body.tm-device-pc .tm-market-desktop-filter select { font-size: 13px; }
body.tm-device-pc .tm-market-desktop-search input { font-size: 13px; }
body.tm-device-pc .tm-market-top-action, body.tm-device-pc .tm-market-periods button { font-size: 14px; }
body.tm-device-pc .tm-market-top-user { font-size: 15px; }
body.tm-device-pc .tm-market-chart-caption { font-size: 12px; }
body.tm-device-pc .tm-market-chart-caption strong { font-size: 14px; }
body.tm-device-pc .tm-market-order-form > strong { font-size: 14px; }
body.tm-device-pc .tm-market-order-form label, body.tm-device-pc .tm-market-order-form input,
body.tm-device-pc .tm-market-order-form select, body.tm-device-pc .tm-market-order-metrics { font-size: 13px; }
body.tm-device-pc .tm-market-order-feedback { font-size: 12px; }
body.tm-device-pc .tm-market-pos-stats, body.tm-device-pc .tm-market-pos-cats button { font-size: 13px; }
body.tm-device-pc .tm-market-positions-head, body.tm-device-pc .tm-market-position-row { font-size: 12px; }
body.tm-device-pc .tm-market-position-list { font-size: 13px; }
/* 秒合约底部持仓/历史：字体加大，Time left 红色加粗 */
body.tm-device-pc.tm-trade-quick .tm-market-positions-head, body.tm-device-pc.tm-trade-quick .tm-market-position-row { font-size: 14px; }
body.tm-device-pc.tm-trade-quick .tm-market-position-list { font-size: 14px; }
.tm-market-position-row [data-quick-timer] { color: #f13f4e; font-weight: 700; }
body.tm-device-pc .tm-market-position-tabs button { font-size: 14px; }
body.tm-device-pc .tm-market-account small, body.tm-device-pc .tm-market-account span { font-size: 13px; }

/* ---------- PC 顶栏语言切换（设计图：边框按钮 + 线框/阴影下拉） ---------- */
.tm-lang-switch { position: relative; flex: none; margin-right: 6px; }
.tm-lang-btn {
    display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px;
    border: 1px solid #dfe3ea; border-radius: 6px; background: #fff;
    color: #404b60; font-size: 12px; cursor: pointer;
}
.tm-lang-btn:hover { border-color: #0866f9; }
.tm-lang-btn img { width: 21px; height: 15px; object-fit: contain; border-radius: 2px; }
.tm-lang-btn svg { width: 10px; height: 6px; transition: transform .15s; }
.tm-lang-switch.is-open .tm-lang-btn svg { transform: rotate(180deg); }
.tm-lang-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 95; min-width: 158px;
    padding: 5px; background: #fff; border: 1px solid #e3e7ee; border-radius: 8px;
    box-shadow: 0 10px 26px rgba(22, 35, 58, .16);
}
.tm-lang-menu[hidden] { display: none; }
.tm-lang-item {
    display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px;
    border: 0; border-radius: 6px; background: none; color: #333; font-size: 13px;
    text-align: left; cursor: pointer;
}
.tm-lang-item img { width: 21px; height: 15px; object-fit: contain; border-radius: 2px; flex: none; }
.tm-lang-item:hover { background: #f2f6ff; }
.tm-lang-item.is-current { background: #0866f9; color: #fff; }

/* ---------- PC 持仓/历史持仓区：工作区加高使持仓区下移，并压缩其预留占位（不影响 /pc/orders 订单页） ---------- */
body.tm-market-page.tm-device-pc:not(.tm-orders-page) .tm-market-layout { height: min(780px, calc(100vh - 250px)); }
body.tm-market-page.tm-device-pc:not(.tm-orders-page) .tm-market-positions { min-height: 0; margin-top: 14px; }
body.tm-market-page.tm-device-pc:not(.tm-orders-page) .tm-market-position-list { min-height: 0; padding-bottom: 8px; }
body.tm-market-page.tm-device-pc:not(.tm-orders-page) .tm-market-position-list.is-empty { min-height: 84px; }

/* ---------- PC 顶部 Orders 按钮：收起/展开右侧交易面板 ---------- */
body.tm-market-page .tm-market-layout.tm-side-collapsed { grid-template-columns: 310px minmax(0, 1fr); }
body.tm-market-page .tm-market-layout.tm-side-collapsed .tm-market-order-side { display: none; }
@media (max-width: 900px) {
    body.tm-market-page .tm-market-layout.tm-side-collapsed { grid-template-columns: 210px minmax(0, 1fr); }
}

/* ---------- PC 交易面板（Gate 设计图：下单类型下拉/借款/止盈止损开关+步进器/数量步进/信息行/灰胶囊按钮） ---------- */
.tm-order-contract { gap: 2px; }
/* 品种名/报价沿用 .tm-market-order-form 基础字号，合约/秒合约切换时不跳变 */
.tm-order-contract label { display: block; margin: 10px 0 6px; color: #333; }
.tm-order-contract input, .tm-order-contract select { height: 38px; border-color: #e2e6ee; border-radius: 6px; color: #22262e; font-size: 13px; }
.tm-order-contract input:focus, .tm-order-contract select:focus { outline: none; border-color: #0866f9; }
.tm-order-contract input:disabled { background: #f7f8fa; color: #b6bcc6; }
.tm-stepper { display: flex; align-items: stretch; height: 38px; border: 1px solid #e2e6ee; border-radius: 6px; overflow: hidden; background: #fff; }
.tm-stepper button { width: 40px; flex: none; border: 0; background: #fff; color: #333; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.tm-stepper button:hover { background: #f4f6f9; }
.tm-stepper button:first-child { border-right: 1px solid #e2e6ee; }
.tm-stepper button:last-child { border-left: 1px solid #e2e6ee; }
.tm-stepper input { flex: 1; min-width: 0; width: auto; height: 100%; border: 0; border-radius: 0; text-align: center; font-size: 13px; color: #22262e; }
.tm-stepper input:focus { border: 0; outline: none; }
.tm-step-hint { color: #8a93a1; font-weight: 400; }
/* (0,2,1) 压过上方 .tm-order-contract label 的 display:block，保证开关胶囊靠行右缘 */
.tm-order-contract label.tm-switch-row, .tm-switch-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.tm-switch { position: relative; display: inline-block; width: 34px; height: 18px; flex: none; }
.tm-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tm-switch i { position: absolute; inset: 0; border-radius: 9px; background: #d5dae2; transition: background .15s; pointer-events: none; }
.tm-switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20,30,50,.2); transition: transform .15s; }
.tm-switch input:checked + i { background: #0866f9; }
.tm-switch input:checked + i::after { transform: translateX(16px); }
.tm-risk-row .tm-stepper { margin-top: 6px; }
.tm-limit-row[hidden] { display: none; }
.tm-metrics-list { display: block; margin-top: 14px; border-top: 1px solid #f0f2f6; padding-top: 6px; }
.tm-metrics-row { display: flex; align-items: center; justify-content: space-between; min-height: 26px; font-size: 12px; }
.tm-metrics-row em { font-style: normal; color: #6d7684; }
.tm-metrics-row b { color: #1a2029; font-weight: 500; max-width: 60%; text-align: right; overflow-wrap: anywhere; }
.tm-order-contract .tm-market-order-buttons { gap: 10px; margin-top: 16px; }
/* 开市：買入蓝/賣出红胶囊；休市由 .is-closed 整体置灰（JS 同步 disabled） */
.tm-order-contract .tm-market-order-buttons button { height: 40px; border-radius: 20px; font-size: 14px; }
.tm-order-contract .tm-market-order-buttons button:hover { opacity: .9; }
.tm-market-order-buttons.is-closed button,
.tm-market-order-buttons.is-closed button:hover { background: #d9dde3; opacity: 1; cursor: not-allowed; }
/* 移动端：图表容器有固定高度，分时线/K线在窄屏也可渲染 */
@media (max-width: 700px) {
    body.tm-market-page .tm-market-chart-panel { height: 230px; padding: 6px 8px; }
    body.tm-market-page .tm-market-chart-caption { margin-bottom: 4px; font-size: 11px; }
}

/* ---------- 持仓/订单列表斑马纹：交易页与订单页通用（奇偶交替底色） ---------- */
.tm-market-position-list > .tm-market-position-row:nth-child(even) { background: #f6f7fa; }
.tm-quick-card:nth-child(even), .tm-orders-card:nth-child(even) { background: #f6f7fa; }

/* ---------- 订单详情弹窗：移动端全宽底部卡片，PC（≥769px）屏幕居中卡片（交易页/订单页通用） ---------- */
/* 居中用容器 flex 实现（面板 relative 参与布局），不依赖 absolute+transform，避免任何场景下偏移 */
.tm-order-detail-modal {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 10002;
    display: flex; align-items: flex-end; justify-content: center;
}
.tm-order-detail-modal[hidden] { display: none; }
.tm-order-detail-mask {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(10, 20, 38, .55);
}
.tm-order-detail-panel {
    position: relative; width: 100%; max-width: 460px; max-height: 100%;
    border-radius: 18px;
    background: #fff; display: flex; flex-direction: column;
    border: 1px solid #e8ebf1; box-sizing: border-box;
    margin: 0 12px calc(12px + env(safe-area-inset-bottom));
    overflow-y: auto; animation: tmDetailIn .2s ease;
}
/* 入场动画只动透明度，不碰 transform（transform 参与定位时会被动画覆盖导致偏移） */
@keyframes tmDetailIn { from { opacity: .35; } to { opacity: 1; } }
.tm-order-detail-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid #eef0f4; flex: none;
}
.tm-order-detail-head strong { font-size: 17px; color: #111721; }
.tm-order-detail-x {
    width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f1f3f7;
    color: #6b7280; font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.tm-order-detail-x:hover { color: #374151; }
.tm-order-detail-body { padding: 0 16px 18px; font-size: 14px; color: #111721; }
/* 品种行 + 行内方向胶囊；单列字段行（数量打头），上下分隔线 */
.tm-order-detail-symbol { font-size: 22px; font-weight: 400; padding: 16px 0 6px; }
.tm-order-detail-symbol .tm-orders-direction { margin-left: 10px; vertical-align: 4px; font-size: 12px; line-height: 16px; padding: 2px 10px; border-radius: 10px; }
.tm-order-detail-prices {
    font-size: 18px; font-weight: 400; color: #111721;
    padding-bottom: 14px; border-bottom: 1px solid #eef0f4;
}
.tm-order-detail-info {
    display: flex; flex-direction: column; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid #eef0f4;
}
.tm-order-detail-info > div { word-break: break-all; font-size: 14px; font-weight: 400; color: #111721; }
.tm-order-detail-info > div > span:first-child { color: #111721; font-weight: 400; margin-right: 6px; }
.tm-order-detail-info > div > b { font-weight: 400; }
/* 底部盈亏区：标签与金额同行基线对齐，盈利蓝色 + 号 / 亏损红色 - 号 */
.tm-order-detail-pnl { display: flex; align-items: baseline; gap: 12px; padding-top: 14px; }
.tm-order-detail-pnl > span { font-size: 16px; font-weight: 400; }
.tm-order-detail-pnl strong { font-size: 24px; font-weight: 400; line-height: 1; }
.tm-order-detail-pnl strong.is-positive { color: #0869f9; }
.tm-order-detail-pnl strong.is-negative { color: #f13f4e; }
/* 移动端订单页 sheet 复用详情布局时去掉双层内边距 */
.tm-order-sheet .tm-order-detail-body { padding: 0; }
@media (max-width: 480px) {
    .tm-order-detail-symbol { font-size: 19px; }
    .tm-order-detail-prices { font-size: 16px; }
    .tm-order-detail-pnl strong { font-size: 22px; }
}
/* 弹窗内引用的订单页配色类（orders.css 仅在 body.tm-orders-page 作用域定义，交易页需在此补齐） */
.tm-order-detail-modal .tm-orders-direction {
    display: inline-block; border-radius: 12px; padding: 3px 11px;
    background: #0869f9; color: #fff; font-size: 13px; line-height: 18px;
}
.tm-order-detail-modal .tm-orders-direction.is-short { background: #f13f4e; }
.tm-order-detail-modal .tm-quick-left { color: #f13f4e; font-weight: 600; }
@media (min-width: 769px) {
    .tm-order-detail-modal { align-items: center; }
    .tm-order-detail-panel {
        max-height: calc(100vh - 48px);
        margin: 0;
        box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
        overflow: hidden;
    }
}
/* 移动端：详情弹窗全屏显示（保持内部布局不变） */
@media (max-width: 768px) {
    .tm-order-detail-modal { align-items: stretch; }
    .tm-order-detail-panel {
        max-width: none; max-height: none;
        margin: 0; border: 0; border-radius: 0;
    }
}
