body.ladder-page .lv-tabs { display:flex; gap:6px; align-items:center; padding:0 0 16px; flex-wrap:wrap; }
body.ladder-page .lv-tabs button,body.ladder-page .lv-tools button,body.ladder-page .lv-pager button { font:inherit; font-size:13px; border:1px solid #e1e5eb; border-radius:7px; background:#fff; color:#657080; padding:8px 14px; cursor:pointer; }
body.ladder-page .lv-tabs button[aria-selected=true] { background:#fff0f1; color:#c52d37; border-color:#f4cbd0; font-weight:700; }
body.ladder-page [hidden] { display:none !important; }
.lv-tools { display:flex; align-items:center; gap:10px; margin:0 0 14px; color:#768293; font-size:13px; }
.lv-tools label { margin-left:auto; display:flex; align-items:center; gap:6px; }
.lv-table-scroll,.lv-multi-scroll { overflow:auto; max-width:100%; border:1px solid #e4e8ed; border-radius:10px; background:white; }
body.ladder-page .lv-table { width:100%; min-width:1250px; border-collapse:collapse; text-align:left; font-size:13px; color:#637080; }
.lv-table th { height:48px; background:#f7f8fa; font-weight:600; white-space:nowrap; }
.lv-table th,.lv-table td { padding:10px 14px; border-bottom:1px solid #edf0f4; }
.lv-table td { height:86px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lv-table th button { border:0; background:transparent; padding:0; color:inherit; font:inherit; cursor:pointer; }
.lv-table th button::after { content:' ↕'; color:#c2c9d3; }
.lv-table th[aria-sort=ascending] button::after { content:' ↑'; color:#287fe9; }
.lv-table th[aria-sort=descending] button::after { content:' ↓'; color:#287fe9; }
.lv-table .lv-level-row td { height:42px; background:#f6f8fa; }
.lv-level { display:inline-block; border-radius:5px; background:#c8232c; color:white; font-weight:700; padding:4px 8px; margin-right:12px; }
body.ladder-page .lv-stock { display:block; border:0; background:transparent; padding:0; color:#303640; font:inherit; font-weight:700; font-size:15px; cursor:pointer; text-align:left; }
.lv-stock-meta { display:flex; align-items:center; gap:5px; margin-top:7px; color:#95a0af; font-size:12px; }
.lv-theme { background:#edf4ff; color:#327dda; border-radius:4px; padding:2px 5px; max-width:140px; overflow:hidden; text-overflow:ellipsis; }
.lv-pct { display:inline-block; padding:5px 9px; border-radius:5px; font-weight:700; }
.lv-up { color:#ec4941; }.lv-down { color:#169e65; }.lv-flat { color:#8a95a4; }
.lv-pct.lv-up { background:#ffeded; }.lv-pct.lv-down { background:#e9f8ee; }
.lv-table .lv-pct.lv-up { color:#fff; background:#ca242a; }
.lv-board-count { color:#287be5; font-weight:700; }
.lv-mini { width:148px; height:62px; position:relative; font-size:10px; color:#a0a9b5; display:flex; align-items:center; justify-content:center; }
.lv-mini small { position:absolute; bottom:-8px; right:0; font-size:9px; color:#929baa; }
.lv-chart { width:100%; height:100%; }
.lv-extra { display:flex; gap:4px; }
body.ladder-page .lv-extra button { padding:3px 6px; font-size:12px; }
body.ladder-page .lv-extra button[aria-pressed=true] { color:#287be5; background:#edf4ff; }
.lv-pager { display:flex; gap:24px; align-items:center; justify-content:center; margin:8px 0 16px; font-size:13px; color:#8c96a5; }
.lv-pager button:disabled { opacity:.4; cursor:default; }
.lv-multi { width:100%; min-width:1340px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; }
.lv-multi th,.lv-multi td { border-right:1px solid #e3e7ed; border-bottom:1px solid #e3e7ed; vertical-align:top; }
.lv-multi th { background:#f2f4f7; padding:12px 6px; color:#343b44; }
.lv-multi th:first-child { width:64px; }
.lv-multi td { padding:7px; background:#fff; }
.lv-multi td:first-child { background:#f8fafc; }
.lv-multi tr:last-child td { border-bottom:0; }
.lv-multi th:last-child,.lv-multi td:last-child { border-right:0; }
.lv-day-title { font-size:15px; margin-bottom:12px; }
.lv-day-title small { font-size:12px; color:#8b96a6; }
.lv-day-sort { display:flex; align-items:center; gap:4px; }
.lv-day-sort button { border:0; background:transparent; color:#8b929c; padding:3px 5px; font:inherit; font-size:12px; cursor:pointer; }
.lv-day-sort button.active { background:#287fe9; color:white; border-radius:4px; }
.lv-day-sort .lv-day-open { margin-left:auto; color:#287fe9; }
.lv-day-card { display:flex; flex-direction:column; gap:7px; border:1px solid #e4e7ed; border-radius:8px; padding:11px; margin-bottom:7px; background:#fff; cursor:pointer; }
.lv-day-card .lv-stock { font-size:13px !important; margin-bottom:7px; }
.lv-day-card .lv-pct { padding:3px 4px; font-size:12px; }
.lv-day-card .lv-mini { width:72px; height:48px; background:#f7f8fa; border:1px solid #e4e7eb; border-radius:4px; }
.lv-day-card .lv-detail { grid-column:1/-1; color:#7b8490; font-size:12px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.lv-reason { margin-left:auto; border:0; border-radius:3px; background:#287fe9; color:white; cursor:pointer; font:inherit; padding:3px 6px; }
.lv-multi .lv-level { background:#b76a08; font-size:12px; margin:0; padding:3px 5px; }
.lv-empty { padding:40px; color:#909baa; text-align:center; }
.lv-missing-note { color:#939cab; font-size:11px; margin:12px 0; }
#ladderRealtime { min-height:580px; }
#ladderRealtime .rtl-toolbar { display:flex; align-items:center; gap:14px; }
#ladderRealtime .rtl-replay { flex:1; }
#ladderRealtime .rtl-icon { width:30px; height:30px; padding:4px; }
@media(max-width:680px) { .lv-tabs button { flex:1; padding:8px 6px !important; }.lv-pager { gap:12px; }.lv-tools { flex-wrap:wrap; } }

.lv-card-main { display:flex; align-items:flex-start; align-content:flex-start; flex-wrap:wrap; gap:6px; }
.lv-card-main .lv-stock { margin-bottom:0; padding-top:3px; }
#ladderRealtime .rtl-help:not([open]) { display:block; }

/* Standalone realtime view: compact controls, full-width plot, selectable themes. */
#ladderRealtime .rtl-meta,#ladderRealtime .rtl-visual-guide { display:none !important; }
#ladderRealtime { min-height:0; width:100%; }
#ladderRealtime #realtimeLadderPanel { padding:0; }
#ladderRealtime .rtl-toolbar { margin:0 0 10px; min-height:28px; }
#ladderRealtime .rtl-toolbar .rtl-status { position:static; width:auto; height:auto; clip-path:none; white-space:nowrap; font-size:11px; }
#ladderRealtime .rtl-board { width:100%; min-width:100%; }
#ladderRealtime .rtl-scroll { width:100%; box-sizing:border-box; }
#ladderRealtimeThemes button { font:inherit; font-size:12px; }
body.ladder-page #ladderRealtimeThemes .ind-tag.selected { border-color:#e0737c !important; background:#ffebed !important; color:#be303b !important; outline:none; }
#ladderRealtimeThemes button:focus-visible { outline:2px solid #508fe5; outline-offset:2px; }

/* Keep the view tabs, filters and themes together without stacked spacing. */
body.ladder-page .main-area > main.content { row-gap:8px !important; }
body.ladder-page .lv-tabs { padding-bottom:0; }
body.ladder-page #ladderControls {
  border:0 !important;
  padding:0 !important;
  margin:0 !important;
  gap:8px !important;
}
body.ladder-page #indTags,
body.ladder-page #ladderRealtimeThemes {
  margin:0 !important;
  padding:7px 10px !important;
}
body.ladder-page #ladderRealtimeThemes { margin-bottom:8px !important; }

/* Ten trading days share the existing filters; scroll the full date range. */
body.ladder-page.lv-multi-active #ladderControls .lad-controls { flex-wrap:wrap !important; }
body.ladder-page #ladderMultiFullscreen {
  margin-left:auto; flex-shrink:0; height:36px; min-height:36px; padding:0 12px;
  border:1px solid #dfe6ee; border-radius:5px; background:#fff;
  color:#54687e; font:inherit; font-size:13px; cursor:pointer;
}
body.ladder-page #ladderMultiFullscreen[hidden] { display:none; }
body.ladder-page #ladderMultiFullscreen:hover { background:#f7f8fa; border-color:#b8c9d9; }
body.ladder-page #ladderMultiFullscreen:focus-visible { outline:2px solid #92a8bf; outline-offset:2px; }
body.ladder-page.lv-multi-fullscreen { overflow:hidden; }
html body.ladder-page.lv-multi-fullscreen .sidebar,
html body.ladder-page.lv-multi-fullscreen .topbar,
html body.ladder-page.lv-multi-fullscreen .yp-pet-root,
html body.ladder-page.lv-multi-fullscreen #yp-mobile-tabs,
html body.ladder-page.lv-multi-fullscreen .yp-sidebar-toggle { display:none !important; }
html body.ladder-page.lv-multi-fullscreen > .layout,
html body.ladder-page.lv-multi-fullscreen .main-area { transform:none !important; filter:none !important; perspective:none !important; }
html body.ladder-page.lv-multi-fullscreen .main-area > .content {
  position:fixed !important; inset:0 !important; z-index:100; box-sizing:border-box;
  width:100% !important; max-width:none !important; height:100dvh !important; margin:0 !important;
  padding:12px !important; background:#fff; overflow:auto;
  display:flex; flex-direction:column;
}
body.ladder-page.lv-multi-fullscreen .content > :not(#ladderControls):not(#indTags):not(#ladderMulti) { display:none !important; }
body.ladder-page.lv-multi-fullscreen #ladderControls { flex-shrink:0; }
body.ladder-page.lv-multi-fullscreen #indTags { max-height:68px !important; overflow-y:auto !important; flex-shrink:0; }
body.ladder-page.lv-multi-fullscreen #ladderMulti { flex:1; min-height:0; display:flex; flex-direction:column; }
body.ladder-page.lv-multi-fullscreen #ladderMulti .lv-multi-body { flex:1; min-height:0; display:flex; flex-direction:column; }
body.ladder-page.lv-multi-fullscreen #ladderMulti .lv-multi-scroll { flex:1; min-height:0; max-height:none; }
body.ladder-page.lv-multi-active #ladderControls .yp-date-picker,
body.ladder-page.lv-multi-active #dateSel { display:none !important; }
body.ladder-page #ladderMulti .lv-multi { min-width:2464px; }
body.ladder-page #ladderMulti .lv-multi th:first-child,
body.ladder-page #ladderMulti .lv-multi td:first-child { position:sticky; left:0; z-index:1; }
body.ladder-page.lv-multi-active #indTags { max-height:120px; overflow-y:auto; flex-shrink:0; }

body.ladder-page .lv-day-card .lv-sort-value { display:inline-block; padding:2px 6px; border-radius:6px; background:var(--blue-soft); color:var(--blue); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
body.ladder-page .lv-day-card:hover { border-color:#b8c9d9; }
body.ladder-page .lv-day-card:focus-visible { outline:2px solid #92a8bf; outline-offset:2px; }

body.ladder-page .lv-day-card .lv-concept-tag { display:inline-block; font-size:10px; background:#fff0f1; color:#d93645; border-radius:5px; padding:2px 5px; margin:0; font-weight:800; line-height:1.25; }

/* Multi-day ladder: compact stock rows with a per-cell cohort summary. */
body.ladder-page #ladderMulti .lv-day-card { border:0; border-radius:4px; padding:10px 4px; margin:0; gap:3px; }
body.ladder-page #ladderMulti .lv-day-card:hover { background:#f7f8fa; }
body.ladder-page #ladderMulti .lv-day-card .lv-stock { font-size:14px !important; }
body.ladder-page #ladderMulti .lv-card-main .lv-stock { padding:0; }
body.ladder-page #ladderMulti .lv-row-metrics { display:flex; align-items:center; gap:5px; flex-wrap:wrap; color:#737b87; font-size:12px; font-variant-numeric:tabular-nums; }
body.ladder-page #ladderMulti .lv-level { background:transparent; color:#272b33; font-size:15px; font-weight:700; padding:10px 0; }
.lv-cell-summary { display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:5px 4px 8px; border-bottom:1px dashed #e5e8ed; color:#737b87; font-size:12px; }
.lv-cell-summary strong { color:#d92d32; font-weight:600; }
.lv-cell-summary button { margin-left:auto; border:0; padding:0; background:transparent; color:#356aab; font:inherit; cursor:pointer; }
.lv-cell-summary button:focus-visible { outline:2px solid #92a8bf; outline-offset:3px; }
body.ladder-page .lv-peer-dialog { margin:auto; overflow:auto; box-sizing:border-box; width:min(1000px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 40px); padding:0; border:1px solid #e5e8ed; border-radius:14px; color:#272b33; background:#fff; box-shadow:0 16px 48px #17203330; }
.lv-peer-dialog::backdrop { background:#17203366; }
.lv-peer-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; z-index:2; padding:16px 20px; background:#fff; border-bottom:1px solid #e5e8ed; }
.lv-peer-head h2 { margin:0; font-size:18px; }
.lv-peer-head h2 small { font-size:13px; font-weight:400; color:#737b87; }
.lv-peer-head button { border:0; border-radius:50%; width:32px; height:32px; background:#f7f8fa; color:#737b87; font:inherit; font-size:23px; cursor:pointer; }
.lv-peer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:16px; }
.lv-peer-card { min-width:0; padding:12px; border:1px solid #e5e8ed; border-radius:10px; background:#fff; }
.lv-peer-sealed { border:2px solid #d92d32; padding:11px; }
.lv-peer-failed { background:#f7f8fa; border-style:dashed; }
.lv-peer-stock { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-variant-numeric:tabular-nums; }
.lv-peer-stock small { font-size:11px; color:#737b87; }
.lv-peer-stock .lv-pct { margin-left:auto; padding:0; background:none; font-size:14px; }
.lv-peer-card .lv-mini { width:100%; height:150px; margin:10px 0 24px; }
.lv-peer-status { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; color:#737b87; font-size:12px; }
.lv-peer-sealed .lv-peer-status > span:first-child { color:#d92d32; background:#fff1f1; border-radius:5px; padding:2px 6px; }
.lv-peer-note { padding:0 16px 14px; margin:0; color:#737b87; font-size:11px; }
@media(max-width:900px) { .lv-peer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:540px) { .lv-peer-grid { grid-template-columns:minmax(0,1fr); }.lv-peer-head { padding:12px; }.lv-peer-head h2 small { display:block; margin-top:4px; } }

/* Compact aligned ladder: shared board rows keep missing date cells empty. */
body.ladder-page.lv-multi-active #indTags { max-height:68px; padding:5px 8px !important; }
body.ladder-page #ladderMulti .lv-multi-scroll { max-height:calc(100dvh - 330px); min-height:240px; border-radius:6px; }
body.ladder-page #ladderMulti .lv-date-header { position:sticky; top:0; z-index:2; display:flex; align-items:center; gap:8px; height:34px; padding:0 8px; background:#f2f4f7; border-bottom:1px solid #e5e8ed; color:#737b87; font-size:11px; font-variant-numeric:tabular-nums; }
body.ladder-page #ladderMulti .lv-date-header button { border:0; background:transparent; padding:0; font:inherit; font-size:14px; font-weight:700; color:#272b33; cursor:pointer; }
body.ladder-page #ladderMulti .lv-date-header small { margin-left:auto; font-size:11px; }
body.ladder-page #ladderMulti .lv-cell-summary { gap:5px; padding:5px 0; font-size:11px; flex-wrap:nowrap; }
body.ladder-page #ladderMulti .lv-level { padding:0; margin:0 2px 0 0; font-size:13px; white-space:nowrap; }
body.ladder-page #ladderMulti .lv-day-card { padding:5px 1px; gap:3px; border-radius:3px; border-bottom:1px solid #f0f1f4; }
body.ladder-page #ladderMulti .lv-day-card:last-child { border-bottom:0; }
body.ladder-page #ladderMulti .lv-card-main { align-items:center; gap:4px; }
body.ladder-page #ladderMulti .lv-card-main .lv-stock { font-size:14px !important; line-height:20px; }
body.ladder-page #ladderMulti .lv-card-main .lv-concept-tag { margin-left:auto; font-weight:600; overflow-wrap:anywhere; max-width:100%; }
body.ladder-page #ladderMulti .lv-row-metrics { gap:4px; font-size:11px; line-height:16px; }
body.ladder-page #ladderMulti .lv-date-empty { padding:14px 8px; font-size:12px; color:#737b87; }
body.ladder-page #ladderMulti .lv-date-header button:focus-visible { outline:2px solid #92a8bf; outline-offset:2px; }
@media(max-width:680px) { body.ladder-page #ladderMulti .lv-multi-scroll { max-height:calc(100dvh - 300px); } }

body.ladder-page #ladderMulti .lv-aligned { min-width:1864px; width:100%; overflow:visible !important; }
body.ladder-page #ladderMulti .lv-board-column { width:64px; }
body.ladder-page #ladderMulti .lv-trading-column { width:180px; }
body.ladder-page #ladderMulti .lv-aligned thead th { position:sticky; top:0; z-index:3; padding:0; height:34px; vertical-align:middle; }
body.ladder-page #ladderMulti .lv-aligned th:first-child { position:sticky; left:0; text-align:center; background:#f2f4f7; }
body.ladder-page #ladderMulti .lv-aligned thead th:first-child { z-index:4; }
body.ladder-page #ladderMulti .lv-aligned tbody th { width:64px; padding:10px 4px; z-index:2; }
body.ladder-page #ladderMulti .lv-aligned tbody th .lv-level { font-size:16px; }
body.ladder-page #ladderMulti .lv-aligned td { padding:0 6px 3px; }
body.ladder-page #ladderMulti .lv-aligned .lv-date-header { position:static; border:0; }

/* Standalone realtime ladder uses the page, without enlarging workspace panels. */
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-scroll { width:100%; max-width:100%; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-stock { font-size:14px !important; line-height:22px !important; height:24px; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-rel-label .rtl-stock { width:84px; max-width:84px; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-top { min-height:56px; gap:3px 8px; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-top h3 { font-size:14px; line-height:22px !important; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-top p { font-size:13px; line-height:20px !important; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-axis span,
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-axis-head,
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-axis-foot,
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-bottom > b { font-size:12px; }
body.ladder-page #ladderRealtime #realtimeLadderPanel .rtl-bottom { min-height:30px; }
body.ladder-page #ladderRealtimeThemes { max-height:68px; overflow-y:auto; }

.lv-member-note { display:block; padding:6px 0; color:#d92d32; font-size:12px; line-height:1.5; }
