/* Exchange owns its vertical budget; expanding updates never consumes the plot. */
.market-budget{margin:7px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}
.market-margin-chips #market-margin-max{flex:2;min-width:0;overflow-wrap:anywhere}
.market-margin-chips button:disabled{opacity:.5}
@media(min-width:801px){
  .app-shell.market-round .stage{height:620px;min-height:620px}
  .app-shell .market-stage{padding:18px 20px 0}
}
.app-shell .market-stage{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#718b7a #213238}
.app-shell .market-chart-top{flex:none;min-height:48px;gap:12px}
.app-shell .market-chart-top h3{font-size:20px;line-height:1.4}
.app-shell .market-quote strong{font-size:28px}
.app-shell .market-quote>span{font-size:12px}
.app-shell .market-asset-tabs{flex:none;gap:6px;margin:12px 0 4px}
.app-shell .market-asset-tabs>button[data-market-asset]{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 11px;min-height:38px;padding:3px 10px;gap:1px 5px;text-align:left}
.app-shell .market-asset-tabs>button[data-market-asset]:focus-visible{outline:2px solid #e0eeb0;outline-offset:-2px}
.app-shell .market-asset-tabs>button>span:first-child{font-size:13px;line-height:1.4}
.app-shell .market-asset-tabs>button>strong,.app-shell .market-asset-tabs>button>strong.up,.app-shell .market-asset-tabs>button>strong.down{font-size:12px;line-height:1.4}
.market-asset-trend{grid-column:1/-1;height:11px}
.market-asset-trend svg{display:block;width:100%;height:100%;color:#a7bdb0}
.market-asset-trend svg.market-trend-up{color:#a6d0a0}
.market-asset-trend svg.market-trend-down{color:#e4a788}
.market-asset-trend path{stroke:#80948b;stroke-dasharray:1 3;stroke-width:1;vector-effect:non-scaling-stroke}
.market-asset-trend polyline{fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.market-asset-trend circle{fill:currentColor}
.app-shell .market-chart-area{flex:1 0 241px;min-height:241px;margin:10px -3px 0}
.app-shell .market-news{flex:none;min-height:44px;margin:0;padding:10px 0;gap:9px;background:transparent}
.app-shell .market-news>p{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.app-shell .market-news>span{font-size:11px}
.app-shell .market-news>i{display:none}
.market-insights{position:relative;z-index:1;flex:none;margin:8px 0 0;color:#dce9dc;font-variant-numeric:tabular-nums}
.market-insights-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px}
.market-session-stats{display:flex;align-items:center;gap:clamp(10px,2vw,24px);min-width:0}
.market-session-stats>span{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
.market-session-stats small{font-size:11px;color:#a5b9ad}
.market-session-stats b{font-size:13px;font-weight:600;color:#e2ecde}
.market-chart-modes{display:flex;flex:none;gap:3px;padding:3px;border:1px solid #617a6e77;border-radius:7px;background:#152b2c80}
.market-chart-modes button{border:0;border-radius:4px;background:transparent;color:#b4c7b9;padding:7px 10px;font:600 12px system-ui;cursor:pointer}
.market-chart-modes button[aria-pressed=true]{background:#536f5b;color:#f0f5e9}
.market-chart-modes button:focus-visible,.market-updates summary:focus-visible{outline:2px solid #e0eeb0;outline-offset:2px}
.market-behavior{margin:4px 0 6px;color:#b1c8b9;font-size:11px;line-height:1.5}
.market-position-brief{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;min-height:32px;margin:5px 0;padding:7px 9px;border:1px solid #627a6566;border-radius:6px;background:#162c2d70;color:#c5d3c6;font-size:11px;line-height:1.5}
.market-position-brief[hidden]{display:none}
.market-position-brief .brief-position-title{color:#e1edd9;font-weight:700;font-size:12px}
.market-position-brief .brief-position-pnl{font-size:14px;font-weight:700;color:#a0e1ae}
.market-position-brief .brief-position-pnl.negative{color:#efb798}
.market-position-brief .brief-position-other{color:#b2c4b4}
.market-updates{position:relative;z-index:1;flex:none;border-top:1px solid #65857955;font-size:11px}
.app-shell .market-updates[open]~.market-news{display:none}
.market-updates>summary{display:flex;justify-content:space-between;align-items:center;min-height:32px;cursor:pointer;color:#c5d6c6;font-size:12px;list-style:none}
.market-updates>summary::-webkit-details-marker{display:none}
.market-updates>summary span{font-size:11px;color:#a3bba9}
.market-updates[open]>summary span{font-size:0}
.market-updates[open]>summary span:after{content:'收合';font-size:11px}
.market-updates-body{max-height:130px;overflow-y:auto;overscroll-behavior:contain;padding:3px 6px 6px 0;scrollbar-width:thin}
.market-recent-news{display:flex;flex-direction:column;gap:8px;margin:0 0 8px}
.market-news-item{display:grid;grid-template-columns:36px auto minmax(0,1fr);align-items:baseline;gap:5px 8px;font-size:12px;line-height:1.5}
.market-news-item>small{color:#abc1b1;font-size:11px}
.market-news-item>span{min-width:0;color:#d0decf;overflow-wrap:anywhere}
.market-news-item>.market-news-category{padding:1px 5px;border:1px solid #67867377;border-radius:4px;color:#b3cfb9;font-size:11px;white-space:nowrap}
.market-news-item>b{grid-column:3;font-size:11px;font-weight:500;color:#a5dcad}
.market-news-item>b.negative{color:#edb492}
.market-news-empty{font-size:11px;color:#b3c8b6}
.market-round-recap{margin-top:5px;border-top:1px solid #65857955;color:#c4d6c6;font-size:11px;line-height:1.5}
.market-round-recap>summary{padding:8px 0;cursor:pointer;color:#c6d6c4;font-size:12px}
.market-recap-summary{margin:0 0 6px;color:#d5e3d6}
.market-recap-round{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid #65857944}
.market-recap-round span{min-width:0;overflow-wrap:anywhere}
.market-recap-round b{flex:none;color:#a0dda8}
.market-recap-round b.negative{color:#efb394}
.market-recap-empty{display:block;padding:0 0 5px;color:#acc3af;font-size:11px}
/* Order and position details share the same readable type scale. */
.app-shell .market-order-heading>small,.app-shell .market-panel .leverage-heading>span,
.app-shell .market-panel .leverage-options button small,.app-shell .market-order-details>div,
.app-shell .market-risk-note,.app-shell .market-open-info,.app-shell .position-heading,
.app-shell .position-heading strong,.app-shell .position-pnl small,.app-shell .position-facts>div,
.app-shell .market-trades-details>summary,.app-shell .market-trades-list>.empty,
.app-shell .market-trades-list>p,.app-shell .market-trade,.app-shell .trade-row,
.app-shell .market-trade small,.app-shell .trade-row small,.app-shell .market-round-xp,
.app-shell .market-summary span,.app-shell .market-next-countdown,.app-shell .market-panel .next-countdown{font-size:11px;line-height:1.6}
.app-shell .market-order-details strong,.app-shell .position-facts strong,
.app-shell .market-trade strong,.app-shell .trade-row strong,.app-shell .market-panel .leverage-heading{font-size:13px}
.app-shell .market-close-btn{font-size:13px;min-height:44px}
@media(max-width:800px){
  .app-shell .market-stage{padding-top:calc(var(--arena-safe-top) + 114px);padding-bottom:calc(var(--arena-floor) + 119px)}
  .app-shell .market-asset-tabs>button[data-market-asset]{padding-inline:7px}
  .app-shell .market-asset-tabs>button>span:first-child{font-size:12px}
  .app-shell .market-asset-tabs>button>strong,.app-shell .market-asset-tabs>button>strong.up,.app-shell .market-asset-tabs>button>strong.down{font-size:11px}
  .market-session-stats{gap:10px;flex:1}
  .market-session-stats>span{flex-direction:column;gap:2px}
  .market-session-stats b{font-size:12px}
  .market-chart-modes button{padding:8px;font-size:11px}
  .market-updates-body{max-height:112px}
  .market-news-item{grid-template-columns:36px minmax(0,1fr)}
  .market-news-item>.market-news-category{display:none}
  .market-news-item>b{grid-column:2}
}
@media(max-width:800px) and (max-height:500px) and (orientation:landscape){
  .app-shell .market-stage{padding-top:calc(var(--arena-safe-top) + 87px);padding-bottom:calc(var(--arena-floor) + 119px)}
}

/* Asset choices need a comfortable touch target on a phone. */
@media (max-width:800px) and (orientation:portrait) {
  .app-shell .market-asset-tabs>button[data-market-asset] {min-height:44px}
}

/* On short portrait screens the exchange scrolls between the fixed header and actions. */
@media (max-width:800px) and (max-height:700px) and (orientation:portrait) {
  .app-shell.market-round .stage {background:#213238}
  .app-shell .market-stage {
    top:calc(var(--arena-safe-top) + 104px);
    bottom:calc(var(--arena-floor) + 112px);
    height:auto;
    padding:10px 15px 12px;
  }
}
