/* Independent BTC display; Gold and the chart's signal styles are untouched. */
.btc-market-state { display:flex; align-items:center; gap:9px; flex:0 0 auto; min-width:0; font:11px var(--font-body); }
.btc-market-state .ohlcv-pair-v { display:inline-flex; margin:0; }
.bms-live { color:var(--text-muted); font:9px var(--font-mono); border-left:1px solid var(--border-color); padding-left:8px; }
.bms-chip { display:inline-flex; align-items:center; gap:5px; padding:6px 2px; border:0; background:transparent; color:var(--text-primary); font:600 11px var(--font-body); white-space:nowrap; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bms-name { font-size:9px; font-weight:500; color:var(--text-primary); opacity:.65; letter-spacing:.025em; }
.bms-chip[data-state="up"] { color:var(--accent-blue,#72a7ee); }
.bms-chip[data-state="down"] { color:var(--accent-orange,#e8ad66); }
.bms-chip[data-state="impulse"], .bms-chip[data-state="opposed"] { color:var(--accent-orange,#e8ad66); }
.bms-chip[data-state="unavailable"] { color:var(--text-muted); }
.bms-chip:focus-visible, .bms-dialog button:focus-visible { outline:2px solid var(--accent-blue,#72a7ee); outline-offset:2px; }
.bms-dialog { position:fixed; inset:0; margin:auto; width:min(420px,calc(100vw - 32px)); max-height:70vh; max-height:70dvh; box-sizing:border-box; overflow-y:auto; padding:18px; border:1px solid var(--border-color); border-radius:12px; background:var(--bg-secondary); color:var(--text-primary); font:12px/1.55 var(--font-body); box-shadow:0 12px 50px #0006; }
.bms-dialog::backdrop { background:rgba(0,0,0,.45); }
.bms-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.bms-heading h2 { margin:0; font-size:14px; }
.bms-heading button { min-height:36px; padding:6px 10px; background:transparent; border:1px solid var(--border-color); border-radius:6px; color:var(--text-primary); font:inherit; cursor:pointer; }
.bms-dialog p { margin:12px 0; }
.bms-window { padding:10px 0; border-top:1px solid var(--border-color); }
.bms-window strong { font-size:12px; }
.bms-window p { margin:4px 0; }
.bms-note { color:var(--text-primary); opacity:.72; font-size:11px; }
@media(max-width:1250px) {
    body .chart-header { flex-wrap:wrap; column-gap:8px; row-gap:2px; }
    body .chart-header .ohlcv-display { flex:1 1 0; min-width:0; }
    body .chart-header .chart-controls { order:2; }
    .btc-market-state { order:3; flex-basis:100%; gap:10px; min-height:24px; }
}
@media(max-width:480px) {
    .btc-market-state { gap:7px; font-size:10px; }
    .bms-chip { gap:4px; padding:6px 0; font-size:10px; }
    .bms-name { font-size:9px; }
    .bms-live { font-size:8px; padding-left:7px; }
    .bms-dialog { inset:auto 0 0; margin:0; width:100%; max-height:65vh; max-height:65dvh; padding:16px 16px max(16px,env(safe-area-inset-bottom)); border-radius:14px 14px 0 0; }
}

/* Compact statistics use native table headers for screen readers. */
#btcMarketStateSummary { margin:4px 0 12px; font-size:13px; font-weight:600; }
.bms-stats { width:100%; border-collapse:collapse; font-size:12px; line-height:1.4; }
.bms-stats th, .bms-stats td { padding:9px 0; border-bottom:1px solid var(--border-color); text-align:right; vertical-align:top; }
.bms-stats th:first-child { text-align:left; padding-right:10px; font-weight:400; }
.bms-stats thead th { font-size:10px; color:var(--text-muted); font-weight:500; }
.bms-stats td { font-variant-numeric:tabular-nums; padding-left:8px; }
#btcMarketStateSource { margin:12px 0 0; font-size:10px; }
