:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --line: #e5eaf0;
  --line-bright: #cbd5e1;
  --text: #1e293b;
  --muted: #475569;
  --muted-2: #526176;
  --red: #d83a46;
  --red-soft: #fff1f2;
  --green: #078963;
  --green-soft: #eaf8f2;
  --yellow: #986d08;
  --blue: #2478c5;
  --cyan: #09849a;
  --left-panel: 56%;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); }

body {
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; cursor: pointer; }

a { color: inherit; }

.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  min-height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; text-decoration: none; letter-spacing: 0.04em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; color: #071018; background: linear-gradient(135deg, #f7d366, #d79835); font-size: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.brand strong { display: block; color: #1e293b; font-size: 12px; font-weight: 750; line-height: 1.15; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }

.market-status { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(152, 109, 8, 0.1); }
.status-dot.live { background: var(--green); box-shadow: 0 0 0 3px rgba(7, 137, 99, 0.1); }
.status-dot.error { background: var(--red); box-shadow: 0 0 0 3px rgba(216, 58, 70, 0.1); }
.status-divider { color: #cbd5e1; }
.futures-status[data-state="online"] { color: var(--green); }
.futures-status[data-state="error"] { color: var(--red); }
.top-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.icon-button, .refresh-button, .tool-button, .intervals button, .filter-chip, .star-button, .load-more-button { border: 1px solid transparent; background: transparent; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; border-color: transparent; border-radius: 5px; color: var(--muted); font-size: 15px; }
.icon-button:hover, .icon-button.active { color: var(--blue); border-color: #cbdcf0; background: #edf5ff; }
.refresh-button { height: 31px; margin-left: 5px; padding: 0 11px; border-color: #b8cfe9; border-radius: 5px; color: #2164a4; background: #f1f7ff; font-size: 12px; }
.refresh-button:hover { background: #e4f0ff; }
.refresh-button.is-loading span { display: inline-block; animation: spin 0.85s linear infinite; }

.market-overview { --green: #08724f; --red: #b52f3d; flex-shrink: 0; min-width: 0; padding: 5px 13px 9px; border-bottom: 1px solid var(--line); color: #1e293b; background: #fbfcfe; }
.market-overview-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; min-height: 25px; color: #1e293b; font-size: 10px; }
.market-overview-heading strong { color: #1e293b; font-size: 11px; }
.market-overview-heading button { margin-left: auto; padding: 2px 7px; border: 0; border-radius: 3px; color: #175c9d; background: transparent; font-size: 10px; font-weight: 600; }
.market-overview-heading button:hover { background: #edf5ff; }
.market-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(250px, .72fr); gap: 9px; }
.market-overview-grid[hidden] { display: none; }
.market-overview-card { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; color: #1e293b; background: #ffffff; font-size: 10px; }
.breadth-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; }
.breadth-heading h2 { margin: 0; color: #1e293b; font-size: 12px; font-weight: 700; }
.breadth-heading > span { color: #334155; font-size: 9px; }
.breadth-chart { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; padding-top: 2px; }
.breadth-bin { min-width: 0; text-align: center; }
.breadth-track { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 58px; border-bottom: 1px solid #e5eaf0; }
.breadth-count { color: #1e293b; font: 700 10px ui-monospace, Consolas, monospace; }
.breadth-track i { display: block; width: clamp(5px, 40%, 18px); flex-shrink: 0; margin-top: 2px; background: #078963; }
.breadth-bin.is-flat .breadth-track i { background: #94a3b8; }
.breadth-bin.is-down .breadth-track i { background: #d83a46; }
.breadth-label { display: block; overflow: hidden; padding-top: 3px; color: #334155; font: 600 9px ui-monospace, Consolas, monospace; white-space: nowrap; }
.breadth-ratio { display: flex; gap: 2px; height: 5px; margin-top: 5px; overflow: hidden; border-radius: 4px; background: #edf1f5; }
.breadth-ratio i { display: block; min-width: 0; background: #078963; }
.breadth-ratio i.is-flat { background: #94a3b8; }
.breadth-ratio i.is-down { background: #d83a46; }
.breadth-counts { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; font-size: 10px; }
.up-text { color: var(--green); }
.down-text { color: var(--red); }
.breadth-foot { margin-top: 3px; color: #334155; font-size: 9px; }
.breadth-volumes { margin-top: 3px; color: #1e293b; font-size: 10px; }
.breadth-volumes strong { color: #1e293b; font-variant-numeric: tabular-nums; }
.overview-turnover-row { display: grid; grid-template-columns: 54px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: baseline; padding-top: 4px; }
.overview-turnover-row > :not(:first-child) { text-align: right; overflow-wrap: anywhere; }
.overview-turnover-head { margin-top: 5px; border-top: 1px solid var(--line); color: #334155; font-size: 9px; }
.overview-volume-coverage { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; color: #334155; font-size: 9px; line-height: 1.4; }
.overview-extra-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 7px 0; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-extra-metrics > div { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.overview-extra-metrics strong { color: #1e293b; font: 700 15px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.overview-extra-metrics small { color: #334155; font-size: 9px; }
.top100-member-values { text-align: right; }
.top100-member-values small { display: block; font-size: 9px; }
.overview-warning { color: #805b05; }
.top100-card { position: relative; }
.top100-universe { margin: 4px 0; color: #334155; font-size: 9px; line-height: 1.4; }
.top100-amount { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 3px; color: #1e293b; }
.top100-amount strong { font: 750 25px ui-monospace, Consolas, monospace; letter-spacing: -.04em; }
.top100-amount > span { font-size: 10px; }
.top100-coverage { font-size: 10px; font-weight: 650; }
.top100-coverage > span { color: #334155; font-size: 9px; font-weight: 500; }
.top100-quality, .top100-status { margin-top: 4px; font-size: 9px; line-height: 1.4; }
.top100-details { margin-top: 4px; }
.top100-details summary { width: fit-content; color: #175c9d; cursor: pointer; font-size: 10px; }
.top100-detail-panel { position: absolute; z-index: 10; top: calc(100% - 4px); right: 0; width: min(520px, calc(100vw - 32px)); max-height: min(330px, 55vh); overflow: auto; padding: 10px 12px; border: 1px solid #bfd3eb; border-radius: 5px; color: #1e293b; background: #ffffff; box-shadow: 0 7px 25px rgba(30, 58, 90, .16); font-size: 11px; line-height: 1.6; }
.top100-detail-panel p { margin: 0 0 7px; }
.top100-detail-panel ul { margin: 0; padding: 0; list-style: none; }
.top100-detail-panel li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.top100-detail-panel li > span { min-width: 0; overflow-wrap: anywhere; }
.top100-detail-panel small { color: #334155; }

.controlbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  flex-shrink: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.search-box { display: flex; align-items: center; gap: 8px; height: 33px; min-width: min(310px, 28vw); padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 5px; background: #ffffff; color: var(--muted); }
.search-box:focus-within { border-color: rgba(103, 163, 232, 0.7); box-shadow: 0 0 0 3px rgba(77, 142, 219, 0.11); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: #7c899c; }
kbd { padding: 1px 4px; border: 1px solid #d5dce6; border-bottom-width: 2px; border-radius: 3px; color: #64748b; background: #f8fafc; font: 10px ui-monospace, monospace; }
.filter-group { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.filter-chip { height: 25px; padding: 0 8px; border-radius: 4px; color: var(--muted); font-size: 11px; }
.filter-chip:hover { color: var(--text); }
.filter-chip.active { color: #2164a4; background: #eaf3ff; box-shadow: inset 0 0 0 1px #cbdff5; }
.compact-select { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.compact-select select { height: 30px; max-width: 122px; padding: 0 22px 0 7px; border: 1px solid var(--line-bright); border-radius: 4px; outline: 0; color: #475569; background: #ffffff; font-size: 11px; }
.compact-select select:focus { border-color: rgba(103, 163, 232, 0.65); }
.numeric-filters { display: flex; flex: 0 1 auto; min-width: 0; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.numeric-filter { display: flex; min-width: 0; align-items: center; gap: 5px; color: #475569; font-size: 11px; font-weight: 600; }
.numeric-filter-label { flex-shrink: 0; white-space: nowrap; }
.numeric-filter input { width: 68px; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid var(--line-bright); border-radius: 4px; outline: 0; color: #1e293b; background: #ffffff; font: 600 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.turnover-filter input { width: 88px; }
.numeric-filter input::placeholder { color: #64748b; font-weight: 500; }
.numeric-filter input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(36, 120, 197, .12); }
.numeric-filter input[aria-invalid="true"] { border-color: var(--red); background: #fff8f9; }
.comparison-filter select { flex-shrink: 0; width: 46px; height: 30px; padding: 0 4px; border: 1px solid var(--line-bright); border-radius: 4px; color: #334155; background: #ffffff; font-size: 13px; font-weight: 700; }
.comparison-filter select:focus { border-color: var(--blue); }
.range-separator { color: #64748b; }
.clear-filters-button { flex-shrink: 0; height: 30px; padding: 0 8px; border: 1px solid var(--line-bright); border-radius: 4px; color: #475569; background: #ffffff; font-size: 11px; font-weight: 600; }
.clear-filters-button:hover:not(:disabled) { color: #2164a4; background: #edf5ff; }
.clear-filters-button:disabled { opacity: .5; cursor: default; }
.numeric-filter-hint { color: #526176; font-size: 10px; white-space: nowrap; }
.filter-save-status { color: #526176; font-size: 10px; font-weight: 600; white-space: nowrap; }
.filter-save-status[data-state="saved"] { color: var(--green); }
.filter-save-status[data-state="error"] { color: var(--red); }
.numeric-filter-status { flex-basis: 100%; min-width: 0; margin: 0; color: var(--red); font-size: 11px; font-weight: 600; }
.numeric-filter-status[hidden] { display: none; }
.session-info { display: flex; align-items: baseline; gap: 7px; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.session-label { color: #64748b; }
.session-info strong { color: #334155; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 500; }
.countdown { color: var(--yellow); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }

.workspace { display: grid; grid-template-columns: min(var(--left-panel), calc(100% - 437px)) 7px minmax(430px, 1fr); flex: 1; min-height: 0; }
.market-panel, .chart-panel { min-width: 0; min-height: 0; background: #ffffff; }
.market-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.market-modules { display: grid; flex-shrink: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.market-module { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: #ffffff; font-size: 12px; }
.market-module:hover { color: var(--text); border-color: var(--line-bright); }
.market-module.active { border-color: #a9c9ed; color: #2164a4; background: #edf5ff; }
.market-module[data-market-module="stocks"].active { border-color: #dfcb96; color: #85600c; background: #fff9e9; }
.market-module[data-market-module="commodities"].active { border-color: #c9b0e8; color: #70459d; background: #f6f0fc; }
.market-module[data-market-module="indices"].active { border-color: #9dcfc5; color: #176d5c; background: #edf9f5; }
.module-count { padding: 2px 6px; border-radius: 4px; color: inherit; background: rgba(92, 122, 158, .09); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.module-note { flex-shrink: 0; margin: 0; padding: 8px 15px; border-bottom: 1px solid var(--line); color: #64748b; background: #fbfcfe; font-size: 10px; line-height: 1.5; }
.module-note[data-module="stocks"] { color: #85600c; background: #fffcf3; }
.module-note[data-module="commodities"] { color: #70459d; background: #fcf9ff; }
.module-note[data-module="indices"] { color: #176d5c; background: #f7fcfa; }
.asset-type-tag[data-asset-type="commodities"] { border-color: #d6c2eb; color: #70459d; background: #f6f0fc; }
.asset-type-tag[data-asset-type="indices"] { border-color: #b8dfd6; color: #176d5c; background: #edf9f5; }
.asset-type-tag { margin-left: 5px; padding: 1px 4px; border: 1px solid #e5d4a7; border-radius: 3px; color: #85600c; background: #fffaf0; font-size: 8px; font-weight: 500; }
.panel-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; min-height: 71px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: #4776a3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.panel-heading h1, .selected-asset h2, .overview-heading h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.panel-summary { display: flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.panel-summary strong { color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; }
.muted-separator { color: #cbd5e1; }

.resize-handle { position: relative; z-index: 3; margin-left: -4px; cursor: col-resize; touch-action: none; background: transparent; }
.resize-handle::before { position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; content: ""; background: #e5eaf0; transition: background 120ms ease; }
.resize-handle:hover::before, body.is-resizing .resize-handle::before { width: 2px; background: var(--blue); }

.table-wrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #cbd5e1 #f8fafc; scrollbar-width: thin; }
.market-table { border-collapse: collapse; table-layout: fixed; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 11px; font-weight: 600; }
.market-table th { position: sticky; top: 0; z-index: 1; height: 41px; padding: 5px 5px; border-bottom: 1px solid var(--line-bright); color: #334155; background: #f6f8fb; font-size: 10px; font-weight: 700; line-height: 1.16; text-align: left; white-space: nowrap; }
.market-table th small { color: #526176; font-size: 9px; font-weight: 600; }
.market-table th.numeric { text-align: right; }
.market-table th[draggable="true"] { cursor: grab; user-select: none; }
.market-table th[draggable="true"]:active { cursor: grabbing; }
.market-table th[draggable="true"]:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.market-table th .column-label { display: block; overflow: hidden; padding-right: 5px; text-overflow: ellipsis; }
.column-resize-handle { position: absolute; z-index: 2; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; touch-action: none; }
.column-resize-handle::after { position: absolute; top: 10px; right: 1px; bottom: 10px; width: 1px; background: #d4dde8; content: ""; }
.column-resize-handle:hover::after, .column-resize-handle:focus-visible::after { width: 2px; background: var(--blue); }
.column-resize-handle:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.market-table th.column-dragging { opacity: .45; }
.market-table th.drop-before { box-shadow: inset 3px 0 var(--blue); }
.market-table th.drop-after { box-shadow: inset -3px 0 var(--blue); }
body.is-column-resizing, body.is-column-resizing * { cursor: col-resize !important; user-select: none !important; }
.market-table th.sort-header:hover { color: #2164a4; background: #eaf3ff; }
.market-table th.sort-header .column-label > span:not([id]) { color: #64748b; }
.market-table th.sort-active { color: #2164a4; }
.market-table th.sort-active .column-label > span:not([id]) { color: var(--blue); }
.market-table tbody tr { height: 39px; border-bottom: 1px solid #f0f3f7; transition: background 100ms ease; cursor: pointer; }
.market-table tbody tr:hover { background: #f6f9fd; }
.market-table tbody tr.selected { background: #edf5ff; box-shadow: inset 2px 0 0 var(--blue); }
.market-table td { overflow: hidden; padding: 5px 5px; vertical-align: middle; white-space: nowrap; text-overflow: ellipsis; }
.market-table td.numeric { color: #334155; text-align: right; font-variant-numeric: tabular-nums; }
.rank-column { text-align: right !important; }
.favorite-column { padding-right: 0 !important; }
.rank { color: #7c899c; text-align: right; }
.asset-cell { display: flex; align-items: center; gap: 7px; min-width: 0; }
.asset-badge { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border: 1px solid #dce5ef; border-radius: 50%; color: #52677e; background: #f1f5f9; font-size: 9px; font-weight: 800; }
.asset-identity { overflow: hidden; line-height: 1.15; }
.asset-symbol { display: block; overflow: hidden; color: #1e293b; font-size: 11px; font-weight: 700; text-overflow: ellipsis; }
.asset-name { display: block; max-width: 100px; overflow: hidden; color: #475569; font-family: Inter, "PingFang SC", sans-serif; font-size: 9px; font-weight: 600; text-overflow: ellipsis; }
.market-source { color: #176d5c; font-weight: 700; }
.market-source[data-source="perpetual"] { color: #8055a7; }
.favorite-cell { padding-left: 4px !important; }
.row-star, .star-button { display: grid; place-items: center; border: 0; color: #94a3b8; background: transparent; }
.row-star { width: 20px; height: 20px; font-size: 15px; }
.row-star:hover { color: var(--yellow); }
.row-star.is-favorite, .star-button.is-favorite { color: var(--yellow); }
.pct { font-weight: 700; letter-spacing: -0.02em; }
.pct.positive { color: var(--green) !important; }
.pct.negative { color: var(--red) !important; }
.pct.flat { color: #64748b !important; }
.loading-cell { color: #7c899c; letter-spacing: 0.08em; }
.empty-cell { color: #7c899c; }
.description { display: flex; align-items: center; gap: 7px; min-width: 0; }
.description-text { display: inline-block; min-width: 0; flex: 1; overflow: hidden; color: #475569; font-family: Inter, "PingFang SC", sans-serif; font-size: 10px; font-weight: 600; text-overflow: ellipsis; }
.details-link { flex: 0 0 auto; color: #2478c5; font-family: Inter, "PingFang SC", sans-serif; font-size: 10px; text-decoration: none; }
.details-link:hover { color: #185b99; text-decoration: underline; }

.table-footer { display: flex; flex-shrink: 0; align-items: center; gap: 8px; min-height: 43px; padding: 7px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; background: #fbfcfe; }
#tableStatus { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-save-status { flex-shrink: 0; color: #64748b; white-space: nowrap; }
.column-save-status[data-state="saved"] { color: var(--green); }
.column-save-status[data-state="error"] { color: var(--red); }
.layout-save-statuses { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; }
.panel-save-status { color: #64748b; white-space: nowrap; }
.panel-save-status[data-state="saved"] { color: var(--green); }
.panel-save-status[data-state="error"] { color: var(--red); }
.load-more-button, .reset-columns-button { flex-shrink: 0; height: 26px; padding: 0 8px; border-color: #cbd5e1; border-radius: 4px; color: #475569; background: #ffffff; font-size: 10px; }
.reset-columns-button { margin-left: auto; }
.load-more-button:hover, .reset-columns-button:hover { background: #edf5ff; }
.load-more-button[hidden] { display: none; }
.keyboard-tip { color: #7c899c; white-space: nowrap; }

.chart-panel { display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain; scrollbar-color: #cbd5e1 #f8fafc; scrollbar-width: thin; }
.selected-bar { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 15px; min-height: 71px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.selected-asset { display: flex; align-items: center; min-width: 0; gap: 9px; }
.coin-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid #e7d6a3; border-radius: 50%; color: #986d08; background: #fff7dc; font-size: 15px; font-weight: 800; }
.selected-asset h2 { max-width: 265px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.star-button { width: 25px; height: 25px; margin-left: 1px; font-size: 21px; line-height: 1; }
.star-button:hover { color: var(--yellow); transform: scale(1.07); }
.trade-link { padding: 6px 8px; border: 1px solid #cbdff5; border-radius: 4px; color: #2164a4; background: #f3f8ff; font-size: 10px; text-decoration: none; white-space: nowrap; }
.trade-link:hover { background: #e4f0ff; }
.chart-toolbar { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 13px; border-bottom: 1px solid var(--line); }
.intervals { display: flex; gap: 1px; }
.intervals button { min-width: 32px; height: 25px; border-radius: 3px; color: #64748b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.intervals button:hover { color: #334155; background: #f1f5f9; }
.intervals button.active { color: #2164a4; background: #eaf3ff; box-shadow: inset 0 0 0 1px #cbdff5; }
.chart-tools { display: flex; gap: 5px; }
.tool-button { min-height: 25px; padding: 0 7px; border: 1px solid var(--line); border-radius: 3px; color: #64748b; background: #ffffff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.tool-button:hover { color: #2164a4; border-color: #b8cfe9; }
.tool-button.active { color: #1d639f; border-color: #bfd5ed; background: #eaf3fd; }
.tool-button.active { color: #2164a4; border-color: #b8cfe9; background: #edf5ff; }
.indicator-legend { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 7px 14px; min-height: 31px; padding: 8px 14px 0; font: 600 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.indicator-legend[hidden] { display: none; }
.ma-unit { color: var(--muted); }
.ma-item { color: var(--ma-color); white-space: nowrap; }
.ma-name { font-weight: 700; }

.chart-card { position: relative; flex-shrink: 0; margin: 10px 13px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.chart-card::before { position: absolute; z-index: 0; inset: 0; content: ""; pointer-events: none; background-image: linear-gradient(#f1f5f9 1px, transparent 1px), linear-gradient(90deg, #f1f5f9 1px, transparent 1px); background-size: 38px 38px; }
.chart-legend { position: absolute; z-index: 2; top: 8px; right: 65px; left: 10px; width: fit-content; max-width: calc(100% - 75px); padding: 2px 5px; border-radius: 3px; color: #334155; background: rgba(255, 255, 255, .9); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 600; line-height: 1.6; pointer-events: none; }
.candle-ohlc { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.candle-details { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 1px; }
.candle-details > span { white-space: nowrap; }
.candle-time { color: #526176; }
.candle-details strong { font-weight: 700; }
.chart-container { position: relative; z-index: 1; width: 100%; height: min(48vh, 475px); min-height: 300px; }
.chart-placeholder { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; padding: 20px; background: #ffffff; color: #64748b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; text-align: center; }
.chart-placeholder[hidden] { display: none; }
.chart-placeholder.is-error { color: #b92d3b; }

.quote-strip { display: grid; flex-shrink: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 10px 13px 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--line); }
.quote-strip div { min-width: 0; padding: 9px 10px; background: #f8fafc; }
.quote-strip span { display: block; overflow: hidden; color: #64748b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.quote-strip strong { display: block; margin-top: 4px; overflow: hidden; color: #334155; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.asset-overview { flex-shrink: 0; margin: 10px 13px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.overview-heading h3 { font-family: Inter, "PingFang SC", sans-serif; }
.data-source-tag { padding: 3px 5px; border: 1px solid #d8e5f2; border-radius: 3px; color: #4776a3; background: #f7faff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; letter-spacing: 0.08em; }
.asset-overview > p { min-height: 34px; margin: 10px 0; color: #526176; font-size: 11px; line-height: 1.7; }
.overview-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #64748b; font-size: 10px; }
.overview-footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-footer a { flex: 0 0 auto; color: #2478c5; text-decoration: none; }
.overview-footer a:hover { text-decoration: underline; }
.method-note { flex-shrink: 0; margin: 11px 14px 14px; color: #64748b; font-size: 10px; line-height: 1.65; }
.method-note strong { color: #475569; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 500; }

.event-legend { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; gap: 6px 13px; margin: 8px 14px 0; color: #64748b; font-size: 10px; line-height: 1.6; }
.event-legend[hidden] { display: none; }
.event-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.marker-type { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--marker-color, #986d08); }
.event-detail { flex-shrink: 0; margin: 8px 13px 0; padding: 10px 12px; border: 1px solid #d8e5f2; border-left: 3px solid #2478c5; border-radius: 4px; color: #475569; background: #f6faff; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.event-detail[hidden] { display: none; }
.event-detail strong { color: #334155; }
.event-detail a { color: #2478c5; text-decoration: none; }
.event-detail a:hover { text-decoration: underline; }
.event-detail small, .event-detail time { color: #64748b; font-size: 10px; }
.overview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; margin: 12px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; min-width: 0; font-size: 11px; line-height: 1.6; }
.overview-fact label { color: #64748b; }
.overview-fact strong { color: #334155; font-weight: 600; overflow-wrap: anywhere; }
.overview-fact a { color: #2478c5; text-decoration: none; overflow-wrap: anywhere; }
.overview-fact a:hover { text-decoration: underline; }
.news-panel { flex-shrink: 0; margin: 10px 13px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.news-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-heading h3 { margin: 0; color: #1e293b; font-size: 15px; font-weight: 650; }
.news-heading .tool-button { flex-shrink: 0; }
.news-status { margin: 8px 0 0; color: #64748b; font-size: 10px; line-height: 1.7; }
.news-list { margin: 10px 0 0; padding: 0; list-style: none; }
.news-item { padding: 11px 0; border-top: 1px solid var(--line); }
.news-item:last-child { padding-bottom: 0; }
.news-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 5px; color: #64748b; font-size: 10px; line-height: 1.6; }
.news-event-type { display: inline-block; padding: 1px 5px; border: 1px solid #dce5ef; border-radius: 3px; color: #52677e; background: #f6f8fb; font-size: 9px; line-height: 1.5; }
.news-item-title { display: block; color: #334155; font-size: 12px; font-weight: 650; line-height: 1.65; text-decoration: none; overflow-wrap: anywhere; }
.news-item-title:hover { color: #2478c5; text-decoration: underline; text-underline-offset: 3px; }
.news-empty { margin: 12px 0 0; padding: 14px 10px; border: 1px dashed #d8e0ea; border-radius: 4px; color: #64748b; background: #fbfcfe; font-size: 11px; line-height: 1.7; }
.news-source-link { display: inline-block; margin-top: 13px; color: #2478c5; font-size: 10px; text-decoration: none; }
.news-source-link:hover { text-decoration: underline; }

/* Stronger small text without changing saved column widths or panel geometry. */
.market-module, .filter-chip, .compact-select, .compact-select select,
.refresh-button, .tool-button, .intervals button, .load-more-button,
.reset-columns-button, .details-link, .trade-link, .overview-footer a,
.news-source-link, .session-info strong, .module-count { font-weight: 600; }
.module-note, .table-footer, .keyboard-tip, .quote-strip span,
.overview-footer, .overview-fact label, .method-note, .event-legend,
.news-status, .news-item-meta, .news-empty, .asset-overview > p { color: #475569; }
.quote-strip strong, .overview-fact strong { font-weight: 700; }

button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #2478c5; outline-offset: 2px; }

.toast { position: fixed; z-index: 20; right: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); padding: 10px 12px; border: 1px solid #bfd3eb; border-radius: 5px; opacity: 0; color: #334155; background: #ffffff; box-shadow: 0 8px 30px rgba(30, 58, 90, .13); font-size: 12px; pointer-events: none; transform: translateY(10px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #f0bdc3; color: #b92d3b; background: #fff8f9; }
.loading-layer { position: fixed; z-index: 15; inset: 0; display: flex; align-items: center; justify-content: center; gap: 11px; color: #475569; background: rgba(255, 255, 255, .9); backdrop-filter: blur(4px); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; transition: opacity 250ms ease, visibility 250ms ease; }
.loading-layer.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-orbit { width: 19px; height: 19px; border: 2px solid #dae6f3; border-top-color: #2478c5; border-radius: 50%; animation: spin .8s linear infinite; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1350px) {
  .market-overview-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(225px, .8fr); }
  .workspace { grid-template-columns: min(var(--left-panel), calc(100% - 397px)) 7px minmax(390px, 1fr); }
  .controlbar { gap: 8px; }
  .search-box { min-width: 220px; }
  .compact-select span { display: none; }
  .keyboard-tip { display: none; }
}

@media (max-width: 1050px) {
  .market-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top100-card { grid-column: 1 / -1; }
  .app-shell { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
  .topbar { gap: 12px; }
  .market-status { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); flex: none; overflow: visible; }
  .resize-handle { display: none; }
  .market-panel { height: 62vh; min-height: 420px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chart-panel { min-height: 560px; overflow: visible; }
  .app-shell[data-layout="table"] .chart-panel { display: none; }
  .app-shell[data-layout="chart"] .market-panel { display: none; }
  .session-info { display: none; }
  .controlbar { flex-wrap: wrap; }
  .search-box { flex: 1 1 280px; }
}

@media (max-width: 680px) {
  .market-overview { padding-right: 10px; padding-left: 10px; }
  .market-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .top100-card { grid-column: auto; }
  .market-overview-heading > span { max-width: 100%; font-size: 9px; }
  .market-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { min-height: 52px; padding: 7px 10px; }
  .brand small, .icon-button[data-layout-button] { display: none; }
  .refresh-button { padding: 0 8px; }
  .controlbar { padding: 7px 10px; }
  .filter-group { order: 3; width: 100%; overflow: auto; }
  .filter-chip { flex: 1 0 auto; }
  .sort-select { margin-left: auto; }
  .panel-heading, .selected-bar { padding-right: 11px; padding-left: 11px; }
  .chart-toolbar { padding-right: 8px; padding-left: 8px; }
  .intervals button { min-width: 29px; }
  .chart-card, .quote-strip, .asset-overview, .news-panel, .event-detail { margin-right: 8px; margin-left: 8px; }
  .chart-container { height: 335px; min-height: 270px; }
  .quote-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-facts { grid-template-columns: 1fr; gap: 7px; }
  .event-legend { margin-right: 9px; margin-left: 9px; }
  .method-note { margin-right: 9px; margin-left: 9px; }
  .selected-asset h2 { max-width: 170px; }
  .trade-link { font-size: 9px; }
}
