/* ============================================================================
   layout-compact.css — 토스증권형 화면 구조 + 조밀한 타이포 스케일

   열 배치 (왼쪽 → 오른쪽)
     [차트 + 하단정보] [일반주문(열릴 때)] [호가/시장동향] [관심목록/모의계좌] [아이콘 레일]
   - 예전 "왼쪽 관심목록" 영역(aside.left-sidebar)은 마크업을 우측으로 옮겼다.
   - 각 열은 카드(둥근 모서리 + 1px 경계)로 보이고, html body 페이지 배경은 한 단계 더 어둡다.
   - 글자·간격은 13px 기준으로 통일한다. 각 CSS 파일의 15~22px 값과 데스크톱
     미디어쿼리의 !important 확대 규칙보다 우선하도록 `html body` 접두 + !important 를
     같이 쓴다(동일 !important 끼리는 특이도가 높은 쪽이 이긴다).
   - 이 파일은 theme.css 다음(마지막)에 로드된다.
   ========================================================================== */

html:root {
    --header-height:   44px;
    --top-menu-height: 0px;
    --footer-height:   0px;
    --panel-gap:       8px;
    --panel-radius:    12px;
    --rail-w:          62px;
    --watch-w:         340px;
    --hoga-w:          430px;
    --order-w:         var(--hoga-w);   /* 모의투자 주문창 폭 = 3열(호가) 폭 */
    --fs-base:         13px;
    --fs-scale:        1.15;   /* 글자 크기 단계 (theme.js: 작게 1 = 13px 기준 / 중간 1.15 / 크게 1.3) — html 인라인으로 덮어씀. 기본은 중간 */
    --submenu-h:       60px;   /* 3열 서브메뉴 높이 = 아래 콘텐츠 margin-top (RightMainSidebar.js 가 읽음) */

    /* 호가창 행/글자 (hoga-orderbook.css 의 :root/미디어쿼리 값보다 우선) */
    --ob-row-h: calc(30px * var(--fs-scale, 1));
    --ob-fs-price: calc(13px * var(--fs-scale, 1));
    --ob-fs-rate: calc(13px * var(--fs-scale, 1));
    --ob-fs-vol: calc(13px * var(--fs-scale, 1));
    --ob-fs-exec: calc(13px * var(--fs-scale, 1));
}

@media (max-width: 1600px) {
    html:root { --watch-w: 320px; --hoga-w: 400px; }
}
@media (max-width: 1366px) {
    html:root { --watch-w: 300px; --hoga-w: 370px; }
}

body.dark-theme { background-color: var(--bg-darker); }

/* ───────────────────────── 헤더 ───────────────────────── */
html body .main-header {
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0 12px 0 14px;
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-subtle);
    font-size: calc(var(--fs-base) * var(--fs-scale, 1));
}
html body .logo-area { min-height: 0; }
html body .logo-area img, html body .logo-img { height: 22px; margin-right: 6px; }
html body .logo-text { font-size: calc(17px * var(--fs-scale, 1)) !important; width: auto; margin-right: 14px; letter-spacing: -.01em; }
html body .platform-type { font-size: calc(13px * var(--fs-scale, 1)) !important; margin-right: 8px; }
html body .version-container { height: 20px; min-width: 150px; }
html body .version { font-size: calc(13px * var(--fs-scale, 1)); font-weight: 600; line-height: 20px; }

html body .layout-search-container { max-width: 320px; }
html body .layout-search-box { width: 320px !important; height: 30px !important; }
html body .layout-search-input {
    width: 100%; height: 30px; padding: 4px 34px 4px 12px;
    font-size: calc(13px * var(--fs-scale, 1)); border-radius: 8px;
    background: var(--bg-light); border-color: var(--border-subtle);
}
html body .layout-search-icon { font-size: calc(13px * var(--fs-scale, 1)); right: 12px; }

html body .fixed-icons { gap: 6px; }
html body .fixed-icons .icon-item { width: 28px; height: 28px; margin: 0; }
html body .fixed-icons .icon-item img { width: 28px; height: 28px; }
html body .user-menu button { margin-left: 6px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .login-btn { padding: 5px 12px; font-size: calc(13px * var(--fs-scale, 1)); border-radius: 6px; }
html body .my-info-btn.circle-icon { width: 30px; height: 30px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .st-theme-btn { height: 28px; }

/* ───────────────────────── 본문 프레임 ───────────────────────── */
html body .main-content {
    height: calc(100vh - var(--header-height));
    padding: var(--panel-gap);
    gap: var(--panel-gap);
    font-size: calc(var(--fs-base) * var(--fs-scale, 1));
    overflow: hidden;
    align-items: stretch;
}
html body .main-content > main, html body .main-content > aside, html body .main-content > nav { min-height: 0; }

/* 카드 */
html body .center-area .chart-area, html body .center-area .infomation-area, html body .right-sidebar, html body .left-sidebar, html body .mo-panel.is-open {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    overflow: hidden;
    box-sizing: border-box;
}

/* 1열: 차트 + 하단 정보 */
html body .center-area {
    order: 1;
    flex: 1 1 auto;
    min-width: 560px;
    gap: var(--panel-gap);
    overflow: hidden;
    background: transparent;
}
html body .center-area .chart-area { min-height: 320px; }
html body #main-chart { min-height: 0 !important; }

/* 2열: 일반주문 (열릴 때만 카드) */
html body .mo-panel { order: 2; }
html body .mo-panel:not(.is-open) { border: 0; }
html body .mo-panel.is-open, html body .mo-inner { width: var(--order-w); min-width: var(--order-w); }
html body .mo-panel.is-open { border-left-width: 1px; }

/* 3열: 호가 / 시장동향 / 캘린더 */
html body .right-sidebar {
    order: 3;
    width: var(--hoga-w) !important;
    min-width: var(--hoga-w);
    flex: 0 0 var(--hoga-w);
    border-left: 1px solid var(--border-subtle);
    transition: none;
    overflow-y: auto;      /* 카드 규칙의 overflow:hidden 을 되돌림 — 테마발굴·뉴스 등 긴 내용은 이 열이 스크롤한다 */
    overflow-x: hidden;
}
html body .right-sidebar.collapsed {
    width: 0 !important;
    min-width: 0;
    flex-basis: 0;
    border: 0;
    transform: none;
    display: none;
}

/* 4열: 관심목록 / 모의투자 계좌 (예전 왼쪽 영역) */
html body .left-sidebar {
    order: 4;
    width: var(--watch-w) !important;
    min-width: var(--watch-w);
    flex: 0 0 var(--watch-w);
    border-right: 1px solid var(--border-subtle);
}
html body .left-sidebar.collapsed {
    width: 56px !important;
    min-width: 56px;
    flex-basis: 56px;
}
/* 우측에 있으므로 접기 화살표 방향을 거울 반전 */
html body .left-sidebar #mainSidebarToggle { transform: scaleX(-1); }

/* 5열: 아이콘 레일 */
html body .side-rail {
    order: 5;
    flex: 0 0 var(--rail-w);
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
}
html body .side-rail-btn {
    width: 56px;
    height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 9px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
html body .side-rail-btn i { font-size: calc(15px * var(--fs-scale, 1)); line-height: 1; }
html body .side-rail-btn span { font-size: calc(13px * var(--fs-scale, 1)); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
html body .side-rail-btn:hover { background: var(--fg-a06); color: var(--text-primary); }
html body .side-rail-btn.is-active { color: var(--text-primary); background: var(--fg-a08); }
html body .side-rail-btn.is-active i { color: var(--red-up); }
html body .side-rail-sep { width: 22px; height: 1px; background: var(--border-color); margin: 4px 0; }
html body .side-rail-spacer { flex: 1; }

/* ───────────────────────── 차트 헤더 ───────────────────────── */
html body .chart-header-container {
    padding: 8px 12px;
    box-shadow: none;
    border-bottom: 1px solid var(--border-subtle);
}
html body .chart-header-stock-info { margin-right: 12px; margin-bottom: 0; }
html body .chart-header-stock-name { font-size: calc(15px * var(--fs-scale, 1)) !important; font-weight: 700; margin-right: 6px; }
html body .chart-header-stock-code { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .chart-header-stock-price { font-size: calc(20px * var(--fs-scale, 1)) !important; font-weight: 700; margin-right: 10px; letter-spacing: -.02em; }
html body .chart-header-price-change { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .chart-header-change-arrow, html body .chart-header-change-value, html body .chart-header-change-percent { margin-right: 5px; }
html body .chart-header-integrated-badge { font-size: calc(13px * var(--fs-scale, 1)); padding: 2px 7px; margin-right: 10px; line-height: 1.3; }
html body .chart-header-action-buttons { margin-right: 8px; }
html body .chart-header-btn-icon { font-size: calc(15px * var(--fs-scale, 1)); padding: 4px; margin-right: 4px; }
html body .chart-header-trading-options { margin-right: 6px; }
html body .chart-header-btn-trading { font-size: calc(13px * var(--fs-scale, 1)); padding: 5px 14px; border-radius: 6px; }
html body .chart-header-market-toggle { padding: 4px 8px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .chart-header-market-text { font-size: calc(13px * var(--fs-scale, 1)); width: 26px; margin-right: 8px; }
html body .chart-header-sidebar-toggle { padding: 3px 6px; margin-left: 4px; }
html body .chart-header-sidebar-toggle i { font-size: calc(14px * var(--fs-scale, 1)); }

/* ───────────────────────── 하단 정보 탭 ───────────────────────── */
html body .chart-tabs {
    font-size: calc(13px * var(--fs-scale, 1)) !important;
    padding: 0 8px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
}
html body .tab-btn { padding: 9px 8px; margin-right: 2px; font-size: calc(13px * var(--fs-scale, 1)); color: var(--text-muted); }
html body .tab-btn.active { color: var(--text-primary); border-bottom: 2px solid var(--text-primary); }
html body .tab-btn:hover { color: var(--text-primary); }

html body .financial-title { font-size: calc(14px * var(--fs-scale, 1)); }
html body .financial-sub-header-title { font-size: calc(13px * var(--fs-scale, 1)); }
html body .toggle-btn, html body .dropdown-btn, html body .chart-btn { font-size: calc(13px * var(--fs-scale, 1)); padding: 4px 10px; }
html body .table-container table th { font-size: calc(13px * var(--fs-scale, 1)); padding: 8px 10px; }
html body .table-container table td { font-size: calc(13px * var(--fs-scale, 1)); padding: 7px 10px; }
html body .investor-chart-select select { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-legend-text { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-diagnosis-table { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-diagnosis-table thead th { font-size: calc(13px * var(--fs-scale, 1)); padding: 10px 12px; }
html body .investor-diagnosis-table tbody td { font-size: calc(13px * var(--fs-scale, 1)); padding: 12px; }
html body .diagnosis-badge { font-size: calc(13px * var(--fs-scale, 1)); }
html body .diagnosis-ratio { font-size: calc(13px * var(--fs-scale, 1)); }

html body .market-status-bar { font-size: calc(13px * var(--fs-scale, 1)); margin: 0; padding: 4px 10px; }
html body .ticker-highlight { font-size: calc(13px * var(--fs-scale, 1)) !important; padding: 1px 6px; }
html body .ticker-content { font-size: calc(13px * var(--fs-scale, 1)) !important; }

/* ───────────────────────── 관심목록 / 모의계좌 (우측 4열) ───────────────────────── */
html body .lsm-mode { padding: 6px 8px; gap: 4px; }
html body .lsm-mode-btn { height: 28px; font-size: calc(13px * var(--fs-scale, 1)); border-radius: 7px; }
html body .lsm-mock-title { font-size: calc(14px * var(--fs-scale, 1)); }

html body .stock-list-tabs { font-size: calc(13px * var(--fs-scale, 1)) !important; height: 38px; padding: 0 4px; }
html body .left-section-title { font-size: calc(13px * var(--fs-scale, 1)) !important; padding: 8px 6px; margin-left: 4px; }
html body .stock-list-tabs .sidebar-toggle-sotck-move, html body .stock-list-tabs .sidebar-toggle { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stock-list-tabs .fas { font-size: calc(13px * var(--fs-scale, 1)); }
html body .back-btn, html body .page-list-sub-header { font-size: calc(14px * var(--fs-scale, 1)); }
html body .page-tab { font-size: calc(13px * var(--fs-scale, 1)); padding: 8px 0; }
html body .favorite-page-item { font-size: calc(13px * var(--fs-scale, 1)); padding: 9px 12px; }
html body .page-item-icon { font-size: calc(14px * var(--fs-scale, 1)); }
html body .page-item-count { font-size: calc(13px * var(--fs-scale, 1)); }
html body .action-btn { font-size: calc(13px * var(--fs-scale, 1)); height: 28px; }

html body .leftside-stock-item { padding: 3px 10px; }
html body .stock-name { font-size: calc(13px * var(--fs-scale, 1)) !important; font-weight: 600; }
html body .stock-price { font-size: calc(13px * var(--fs-scale, 1)) !important; font-weight: 600; margin-bottom: 1px; }
html body .price-change { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .leftside-stock-price-container { padding: 2px 0 2px 6px; margin: 0; }
html body .stock-badges { margin: 0 0 3px 0; gap: 3px; }
html body .stock-badge { font-size: calc(13px * var(--fs-scale, 1)); min-width: 17px; min-height: 17px; padding: 0 4px 1px; border-radius: 3px; letter-spacing: 0; }
html body .stock-badge .stock-badge-arrow { width: 1em; height: 1.2em; }
html body .stock-number-item { width: 36px; height: 36px; font-size: calc(13px * var(--fs-scale, 1)); border-radius: 9px; }
html body .tooltip-name { font-size: calc(13px * var(--fs-scale, 1)); }
html body .tooltip-price { font-size: calc(14px * var(--fs-scale, 1)); }
html body .tooltip-change { font-size: calc(13px * var(--fs-scale, 1)); }

html body .sidebar-footer .market-info { font-size: calc(13px * var(--fs-scale, 1)); border-bottom-width: 1px; }
html body .sidebar-footer .market-info button { padding: 2px 6px; font-size: calc(13px * var(--fs-scale, 1)); }

/* 모의투자 계좌 (left-mock-account.css) */
html body .ma-sum-pl { font-size: calc(15px * var(--fs-scale, 1)); }
html body .ma-pending span { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ma-name, html body .ma-price { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ma-btn { font-size: calc(13px * var(--fs-scale, 1)); height: 28px; }
html body .ma-state { font-size: calc(13px * var(--fs-scale, 1)); padding: 28px 14px; }
html body .ma-state-btn { font-size: calc(13px * var(--fs-scale, 1)); height: 32px; }

/* ───────────────────────── 호가 / 시장동향 (3열) ───────────────────────── */
html body .main-menu-bar { padding: 2px 6px !important; }
html body .main-menu-item { padding: 6px 0 5px; }
html body .main-menu-item:hover { transform: none; }
html body .menu-icon { height: 20px; margin-bottom: 2px; }
html body .menu-icon svg { width: 18px; height: 18px; }
html body .menu-text { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .menu-indicator { height: 2px; }

html body .submenu-container.active { max-height: var(--submenu-h); }
html body .submenu-wrapper { padding: 7px 10px; }
html body .submenu-items { gap: 6px; }
html body .submenu-item { padding: 8px 6px; border-radius: 7px; }
html body #market-submenu .submenu-item { padding: 8px 4px; }
html body .submenu-item:hover { transform: none; box-shadow: none; }
html body .item-text { font-size: calc(13px * var(--fs-scale, 1)); }
html body .submenu-title { font-size: calc(13px * var(--fs-scale, 1)); }
html body .submenu-note { font-size: calc(13px * var(--fs-scale, 1)); }

/* 캘린더/경제지표 iframe 래퍼: 100vh 기준이던 높이를 3열 카드 높이 기준으로 (메뉴바 + 서브메뉴 여백 제외) */
html body #iframe-wrapper, html body #CalendarContent, html body #EconomicIndicatorContent { height: calc(100% - 56px - var(--submenu-h)); }
html body .right-sidebar.collapsed #CalendarContent, html body .right-sidebar.collapsed #EconomicIndicatorContent { width: 100%; }

/* 시장동향 (rightside-*) */
html body .rightside-container { padding: 12px; }
html body .rightside-header { margin-bottom: 10px; }
html body .rightside-header-title { font-size: calc(14px * var(--fs-scale, 1)) !important; }
html body .rightside-toggle-option { font-size: calc(13px * var(--fs-scale, 1)) !important; padding: 3px 8px; }
html body .rightside-market-name { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .rightside-market-value, html body .rightside-value-price, html body .rightside-value-change { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .rightside-left-label, html body .rightside-right-label, html body .rightside-left-value, html body .rightside-right-value, html body .rightside-right-item { font-size: calc(13px * var(--fs-scale, 1)) !important; }
html body .rightside-chart-container { height: 150px; margin: 12px 0; }
html body .rightside-ai-container { font-size: calc(13px * var(--fs-scale, 1)) !important; padding: 6px 10px !important; }
html body .rightside-news-content { font-size: calc(13px * var(--fs-scale, 1)) !important; line-height: 1.45; }
html body .rightside-news-meta { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-popup-title { font-size: calc(14px * var(--fs-scale, 1)); }
html body .rightside-popup-date { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-section-number { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-section-text { font-size: calc(14px * var(--fs-scale, 1)); }
html body .rightside-news-text { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-tomato-tv-section { padding: 8px 12px; margin: 10px 0; border-radius: 10px; }

/* 종목뉴스 카드 (stock-news-*) */
html body .stock-news-header { padding: 10px 12px; }
html body .stock-news-stock-name { font-size: calc(14px * var(--fs-scale, 1)); }
html body .stock-news-stock-code { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stock-news-card { padding: 9px 11px; border-radius: 8px; }
html body .stock-news-card-meta { font-size: calc(13px * var(--fs-scale, 1)); margin-bottom: 4px; }
html body .stock-news-card-title { font-size: calc(13px * var(--fs-scale, 1)); line-height: 1.4; }

/* 구형 호가 패널 (RightMainSidebar.css · .hoga-*) */
html body .right-sidebar .stock-name { font-size: calc(14px * var(--fs-scale, 1)) !important; }
html body .right-sidebar .stock-code, html body .right-sidebar .market-badge { font-size: calc(13px * var(--fs-scale, 1)); padding: 2px 6px; }
html body .right-sidebar .current-price { font-size: calc(20px * var(--fs-scale, 1)); }
html body .right-sidebar .change-info { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .volume-info { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .additional-info-row { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .hoga-content { height: 30px; padding: 0 10px; }
html body .right-sidebar .hoga-price { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .hoga-volume { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .hoga-change { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .execution-header { font-size: calc(13px * var(--fs-scale, 1)); padding: 6px 12px; }
html body .right-sidebar .execution-item, html body .right-sidebar .execution-price, html body .right-sidebar .execution-volume, html body .right-sidebar .execution-type { font-size: calc(13px * var(--fs-scale, 1)); padding: 4px 8px; }
html body .right-sidebar .order-tab { font-size: calc(13px * var(--fs-scale, 1)); padding: 9px 12px; }
html body .right-sidebar .section-title, html body .right-sidebar .order-type-select, html body .right-sidebar .input-group label, html body .right-sidebar .price-input, html body .right-sidebar .quantity-input, html body .right-sidebar .input-unit, html body .right-sidebar .summary-item, html body .right-sidebar .summary-value, html body .right-sidebar .order-submit { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .price-input, html body .right-sidebar .quantity-input { padding: 7px 10px; }
html body .right-sidebar .order-submit { padding: 10px; }
html body .right-sidebar .message-title, html body .right-sidebar .message-subtitle { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .no-data-icon, html body .right-sidebar .error-icon { font-size: calc(32px * var(--fs-scale, 1)); }

/* 호가창(ob-*) 헤더 — 원본 18/24/17/16/15px + max-height 130px 이라 줄이면 잘리므로 함께 조정 */
html body .ob-header { padding: 10px 12px 8px; max-height: none; box-shadow: none; border-radius: 0; }
html body .ob-header__title-row { gap: 8px; margin-bottom: 4px; }
html body .ob-header__name { font-size: calc(14px * var(--fs-scale, 1)); text-shadow: none; }
html body .ob-header__code { font-size: calc(13px * var(--fs-scale, 1)); padding: 2px 6px; border-radius: 5px; }
html body .ob-header__price-row { gap: 10px; margin-bottom: 4px; }
html body .ob-header__cur-price { font-size: calc(19px * var(--fs-scale, 1)); text-shadow: none; }
html body .ob-header__change { font-size: calc(13px * var(--fs-scale, 1)); text-shadow: none; }
html body .ob-header__vol { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ob-header__sub-row { display: flex; gap: 12px; }
html body .ob-header__sub-item { font-size: calc(13px * var(--fs-scale, 1)); }

/* ───────────────────────── 주문 패널 (mo-*) ───────────────────────── */
html body .mo-head { padding: 12px 14px 10px; align-items: center; gap: 8px; }
html body .mo-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .mo-account-main strong { font-size: calc(14px * var(--fs-scale, 1)); }
html body .mo-seg-btn { height: 36px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-summary-row--total { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-summary-row--total strong { font-size: calc(15px * var(--fs-scale, 1)); }
html body .mo-submit { height: 46px; font-size: calc(15px * var(--fs-scale, 1)); border-radius: 9px; }
html body .mo-step button { width: 30px; height: 32px; }
html body .mp-title, html body .mr-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .mp-hero-total { font-size: calc(26px * var(--fs-scale, 1)); }
html body .mp-stats dd { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-section-title { font-size: calc(14px * var(--fs-scale, 1)); }
html body .mp-row-name, html body .mp-sd-name { font-size: calc(13.5px * var(--fs-scale, 1)); }
html body .mp-row-price, html body .mp-row-eval, html body .mp-sd-amt, html body .mp-lbl-pct { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-orow-name { font-size: calc(13.5px * var(--fs-scale, 1)); }
html body .mo-depth-title { font-size: calc(14px * var(--fs-scale, 1)); }

/* ───────────────────────── 오버레이 패널 (알림·노트·내정보) ───────────────────────── */
html body .notice-panel, html body .note-panel, html body .mypage-info-profile-panel { width: 400px !important; min-width: 300px; }
html body .notice-panel-header h3, html body .note-panel-header h3, html body #myPageInfoPanelTitle { font-size: calc(16px * var(--fs-scale, 1)); }
html body .notice-close-btn, html body .note-close-btn, html body .mypage-info-close-btn { font-size: calc(20px * var(--fs-scale, 1)); }

/* 스크롤바를 얇게 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { border-radius: 4px; }

/* ───────────────────────── 좁은 화면 ───────────────────────── */
@media (max-width: 1200px) {
    html body .side-rail { display: none; }
    html body .left-sidebar { width: 240px !important; min-width: 240px; flex-basis: 240px; }
}
@media (max-width: 1023px) {
    html body .main-content { padding: 4px; gap: 4px; }
    html body .left-sidebar { display: none; }
}

/* ───────────────────────── 테마발굴 / 테마상세 (3열에 AJAX 주입되는 Views/Theme/*) ─────────────────────────
   인라인 <style> 의 clamp(…vw…) 값이 데스크톱에서 최댓값(22~24px, 카드 최소폭 380px)으로 커져
   340px 열에서 잘리므로 열 기준 크기로 고정한다. */
html body .right-sidebar .theme-container { height: auto; padding: 10px 12px 16px; max-width: none; }
html body .right-sidebar .theme-header { gap: 8px; flex-wrap: wrap; }
html body .right-sidebar .theme-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-controls { gap: 6px; }
html body .right-sidebar .theme-search-wrapper,
html body .right-sidebar .theme-select-wrapper { min-width: 0 !important; flex: 1 1 140px; }
html body .right-sidebar .theme-search-input { width: 100%; padding: 6px 26px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-search-input::placeholder { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-search-icon { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-search-clear { width: 20px; height: 20px; font-size: calc(13px * var(--fs-scale, 1)); padding: 2px; }
html body .right-sidebar .theme-select { padding: 6px 26px 6px 10px; font-size: calc(13px * var(--fs-scale, 1)); width: 100%; }
html body .right-sidebar .theme-select-wrapper::after { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-search-results { padding: 8px 10px; font-size: calc(13px * var(--fs-scale, 1)); gap: 8px; }
html body .right-sidebar .search-reset { padding: 4px 10px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .no-search-results { padding: 30px 14px; }
html body .right-sidebar .no-search-results i { font-size: calc(28px * var(--fs-scale, 1)); }
html body .right-sidebar .no-search-results p { font-size: calc(14px * var(--fs-scale, 1)); }
html body .right-sidebar .no-search-results span { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar #themeTbody { grid-template-columns: 1fr; gap: 8px; }
html body .right-sidebar .theme-card { padding: 12px 14px; border-radius: 10px; }
html body .right-sidebar .card-top { gap: 8px; }
html body .right-sidebar .card-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .right-sidebar .card-rank { font-size: calc(13px * var(--fs-scale, 1)); padding: 2px 8px; }
html body .right-sidebar .card-metrics { gap: 4px 8px; }
html body .right-sidebar .metric-row { padding: 2px 0; gap: 4px; }
html body .right-sidebar .metric-label,
html body .right-sidebar .metric-value { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .cards-loading { height: 140px; }
html body .right-sidebar .no-data { padding: 30px; font-size: calc(13px * var(--fs-scale, 1)); }
/* 테마 상세 */
html body .right-sidebar .theme-detail-container { height: auto; min-height: 0; }
html body .right-sidebar .theme-detail-container .theme-header { padding: 10px 12px; }
html body .right-sidebar .theme-detail-container .theme-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-detail-container .back-btn { padding: 5px 10px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .metrics-grid { gap: 6px; }
html body .right-sidebar .metric-card { padding: 8px; }
html body .right-sidebar .metric-card .metric-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .metric-card .metric-value { font-size: calc(13.5px * var(--fs-scale, 1)); }
html body .right-sidebar .theme-tab-btn { padding: 9px 6px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .tab-indicator { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .stock-item { padding: 9px 10px; }
html body .right-sidebar .stock-info-right { min-width: 96px; }
html body .right-sidebar .stock-change-label { font-size: calc(13px * var(--fs-scale, 1)); min-width: 36px; }
html body .right-sidebar .stock-change { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .detail-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .detail-value { font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .filter-bar { gap: 6px; padding: 8px 10px; }
html body .right-sidebar .filter-btn { padding: 5px 10px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .right-sidebar .empty-state { padding: 28px 16px; }
html body .right-sidebar .empty-icon { font-size: calc(30px * var(--fs-scale, 1)); }

/* ───────────────────────── 종목 검색 드롭다운 ───────────────────────── */
html body .layout-section-title { font-size: calc(13px * var(--fs-scale, 1)); padding: 6px 12px; }
html body .layout-stock-name { font-size: calc(13px * var(--fs-scale, 1)); }
html body .layout-stock-code { font-size: calc(13px * var(--fs-scale, 1)); }
html body .layout-stock-item { padding: 8px 12px; }
html body .layout-tab { font-size: calc(13px * var(--fs-scale, 1)); padding: 9px; }
html body .layout-no-results { font-size: calc(13px * var(--fs-scale, 1)); padding: 24px 12px; }
html body .layout-close-btn { font-size: calc(20px * var(--fs-scale, 1)); width: 24px; height: 24px; }

/* 모의투자 계좌 패널 세부 */
html body .lsm-mode-btn { height: 28px; font-size: calc(13px * var(--fs-scale, 1)); }
html body .lsm-mock-title { font-size: calc(14px * var(--fs-scale, 1)); }
html body .mo-choice-btn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-unit, html body .mo-hint { font-size: calc(13px * var(--fs-scale, 1)); }

/* ───────────────────────── 나머지 통일 (주문 스텝 버튼 · 테마상세 라벨 · 시계) ───────────────────────── */
html body .mo-step button { font-size: calc(15px * var(--fs-scale, 1)); }
html body .right-sidebar .stock-price-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .sidebar-footer .time-info { font-size: calc(13px * var(--fs-scale, 1)); }

/* ───────────────────────── 모달 (로그인 · 알림) ───────────────────────── */
html body .left-side-login-modal-container { padding: 22px 24px; border-radius: 14px; }
html body .left-side-login-title { font-size: calc(18px * var(--fs-scale, 1)); }
html body .left-side-login-close-btn { font-size: calc(22px * var(--fs-scale, 1)); width: 28px; height: 28px; }
html body .left-side-login-input-group label,
html body .left-side-login-checkbox-label,
html body .left-side-login-links .left-side-login-link,
html body .left-side-login-country-code { font-size: calc(13px * var(--fs-scale, 1)); }
html body .left-side-login-input-group input,
html body .left-side-login-phone-input-wrapper input,
html body .left-side-login-password-wrapper input { font-size: calc(13.5px * var(--fs-scale, 1)); padding: 10px 14px; }
html body .left-side-login-password-wrapper input { padding-right: 40px; }
html body .left-side-login-country-code { padding: 10px 8px; width: 108px; }
html body .left-side-login-submit-btn { font-size: calc(14px * var(--fs-scale, 1)); padding: 11px; }
html body .modal-container { padding: 22px 24px; }
html body .modal-title { font-size: calc(16px * var(--fs-scale, 1)); }
html body .modal-message { font-size: calc(13.5px * var(--fs-scale, 1)); }
html body .modal-icon { width: 44px; height: 44px; }
html body #favoriteAlertModalIconSymbol { font-size: calc(22px * var(--fs-scale, 1)); }
html body .modal-btn { font-size: calc(13px * var(--fs-scale, 1)); padding: 9px 14px; }
html body .modal-input { font-size: calc(13px * var(--fs-scale, 1)); padding: 9px 12px; }

/* ───────────────────────── 개인노트 · 공지 · 내정보 패널 ───────────────────────── */
html body .note-summary-section { padding: 12px 0; }
html body .stat-card { padding: 10px; }
html body .stat-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stat-value { font-size: calc(15px * var(--fs-scale, 1)); }
html body .note-panel .stock-title { font-size: calc(15px * var(--fs-scale, 1)); }
html body .note-panel .stock-code { font-size: calc(13px * var(--fs-scale, 1)); }
html body .action-card { padding: 12px; }
html body .action-title { font-size: calc(13.5px * var(--fs-scale, 1)); }
html body .action-desc { font-size: calc(13px * var(--fs-scale, 1)); }
html body .note-panel h3, html body .notice-panel h3, html body .mypage-info-profile-panel h3 { font-size: calc(14px * var(--fs-scale, 1)); }

/* ───────────────────────── 글자 최소 13px 바닥값 (다른 CSS 의 13px 미만 규칙을 덮음 · 이 파일이 이미 크기를 정한 선택자는 제외 · 자동 생성) ───────────────────────── */
html body .snowflake { font-size: calc(13px * var(--fs-scale, 1)); }
html body .gray-td-tab { font-size: calc(13px * var(--fs-scale, 1)); }
html body .section-title i { font-size: calc(13px * var(--fs-scale, 1)); }
html body .item-title { font-size: calc(13px * var(--fs-scale, 1)); }
html body .market-table th, html body .market-table td { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-time-axis { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-summary-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .rightside-news-dot { font-size: calc(13px * var(--fs-scale, 1)); }
html body .footer-info { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stock-news-loading-more { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stock-news-detail-meta { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ob-state-msg { font-size: calc(13px * var(--fs-scale, 1)); }
html body .hoga-diff { font-size: calc(13px * var(--fs-scale, 1)); }
html body .hoga-change { font-size: calc(13px * var(--fs-scale, 1)); }
html body .limit-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .no-execution-data { font-size: calc(13px * var(--fs-scale, 1)); }
html body .stock-code { font-size: calc(13px * var(--fs-scale, 1)); }
html body .volume-info { font-size: calc(13px * var(--fs-scale, 1)); }
html body .additional-info-row { font-size: calc(13px * var(--fs-scale, 1)); }
html body .change-info { font-size: calc(13px * var(--fs-scale, 1)); }
html body .order-tab { font-size: calc(13px * var(--fs-scale, 1)); }
html body .section-title { font-size: calc(13px * var(--fs-scale, 1)); }
html body .order-type-select { font-size: calc(13px * var(--fs-scale, 1)); }
html body .input-group label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .order-submit { font-size: calc(13px * var(--fs-scale, 1)); }
html body .control-btn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .hoga-volume { font-size: calc(13px * var(--fs-scale, 1)); }
html body .execution-header { font-size: calc(13px * var(--fs-scale, 1)); }
html body .price-input, html body .quantity-input { font-size: calc(13px * var(--fs-scale, 1)); }
html body .input-unit { font-size: calc(13px * var(--fs-scale, 1)); }
html body .summary-item { font-size: calc(13px * var(--fs-scale, 1)); }
html body .execution-item { font-size: calc(13px * var(--fs-scale, 1)); }
html body .financial-table th, html body .financial-table td { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-tooltip { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-tooltip-date { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-tooltip-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-tooltip-value { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-last-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-market-btn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .investor-chart-tab { font-size: calc(13px * var(--fs-scale, 1)); }
html body .scroll-btn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .left-side-login-checkbox-label input[type="checkbox"]:checked + .left-side-login-checkmark::after { font-size: calc(13px * var(--fs-scale, 1)); }
html body .left-side-login-links .left-side-login-divider { font-size: calc(13px * var(--fs-scale, 1)); }
html body .order-status { font-size: calc(13px * var(--fs-scale, 1)); }
html body .notice-badge { font-size: calc(13px * var(--fs-scale, 1)); }
html body .notice-date { font-size: calc(13px * var(--fs-scale, 1)); }
html body .notice-detail-body table { font-size: calc(13px * var(--fs-scale, 1)); }
html body .register-checkbox-label input[type="checkbox"]:checked + .register-checkmark::after { font-size: calc(13px * var(--fs-scale, 1)); }
html body .password-message { font-size: calc(13px * var(--fs-scale, 1)); }
html body .layout-stock-market { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-seg-count { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-mini { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-fill-badge { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-toast { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-sd-count { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-sd-members { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-thead { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-odate { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-orow-time { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-market { font-size: calc(13px * var(--fs-scale, 1)); padding: 1px 7px; }
html body .mo-onote { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-confirm-warn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-depth-spread { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-depth-ratio-top { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-depth-ratio-sum { font-size: calc(13px * var(--fs-scale, 1)); }
html body .md-xtext { font-size: calc(13px * var(--fs-scale, 1)); }
html body .md-pill-text { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-depth-tip { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mr-chip { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-confirm-sub { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mj-lead { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mj-cash-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mj-cash-note { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mj-example { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-orow-cost { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-fill-cost { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-feeline { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mp-note { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mr-rule { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-acct-kind { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-acct-group { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-acct-item-sub { font-size: calc(13px * var(--fs-scale, 1)); }
html body .mo-acct-action small { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ad-label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ad-hint { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ad-notice { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ma-badge { font-size: calc(13px * var(--fs-scale, 1)); }
html body .ma-sub { font-size: calc(13px * var(--fs-scale, 1)); }
html body .st-theme-mode { font-size: calc(13px * var(--fs-scale, 1)); }
html body .st-theme-row label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .st-theme-preset { font-size: calc(13px * var(--fs-scale, 1)); }
html body .st-theme-actions button { font-size: calc(13px * var(--fs-scale, 1)); }
html body .earing-holding-delete-btn { font-size: calc(13px * var(--fs-scale, 1)); }
html body .earing-holding-empty-subtext { font-size: calc(13px * var(--fs-scale, 1)); }
html body .memo-modal-meta { font-size: calc(13px * var(--fs-scale, 1)); }
html body .memo-modal-pos label { font-size: calc(13px * var(--fs-scale, 1)); }
html body .tab-indicator { font-size: calc(13px * var(--fs-scale, 1)); }

html body .stock-badges { margin: 0 0 2px 0; }
/* 3열 상단 메뉴바(시장동향/호가/캘린더)는 긴 내용을 스크롤해도 위에 고정 */
html body .right-panel-menu { position: sticky; top: 0; z-index: 60; background-color: var(--bg-dark); }
html body .vol-pct { font-size: calc(13px * var(--fs-scale, 1)); }

/* 3열 서브메뉴 라벨(시장브리핑 등 5글자)이 '크게' 단계에서 두 줄로 접히지 않게 */
html body .submenu-item .item-text { white-space: nowrap; letter-spacing: -.04em; }
html body #market-submenu .submenu-item { padding-left: 2px; padding-right: 2px; }

/* 닫혀 있는(폭 0) 포트폴리오·랭킹 오버레이와 접힌 서브메뉴가 그림자만 남기던 문제 — 열렸을 때만 그림자 */
html body .mp-panel:not(.is-open), html body .mr-panel:not(.is-open) { box-shadow: none; }
html body .submenu-container:not(.active) { box-shadow: none; }

/* 화면 밖(오른쪽)에 대기하는 슬라이드 패널(내 정보·공지·개인노트)의 그림자가 화면 안으로 번지던 문제 — 열렸을 때만 */
html body .mypage-info-profile-panel:not(.active),
html body .notice-panel:not(.active),
html body .note-panel:not(.active) { box-shadow: none; }

/* ───── 토마토TV 라이브 섹션 (RightTomatoTV.js) — 테마 토큰 ───── */
html body .rightside-tomato-tv-section { box-shadow: none; }
html body .rightside-tomato-tv-section:hover { border-color: var(--border-strong); box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
html body .tomato-tv-desc { display: flex; flex-direction: column; gap: 4px; color: var(--text-primary); min-width: 0; }
html body .tomato-tv-desc-title { font-size: calc(15px * var(--fs-scale, 1)); font-weight: 700; }
html body .tomato-tv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-width: 96px; padding: 7px 14px; border-radius: 999px;
    background: var(--pill-active-bg, var(--bg-lighter)); color: var(--on-accent, #fff);
    border: 1px solid var(--border-strong); font-size: calc(14px * var(--fs-scale, 1)); font-weight: 700; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform .15s, box-shadow .15s, border-color .15s;
}
    html body .tomato-tv-btn:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(0, 0, 0, .22); border-color: var(--text-muted); }
    html body .tomato-tv-btn img { width: 22px; height: 22px; margin-left: 4px; }
/* AI 요약 브리핑 버튼: 배경이 진한 그라데이션이라 글자는 항상 흰색 */
html body .rightside-ai-container { color: #fff; }
/* 모의투자 계좌 종류(개인/리그) 활성 탭: 흰색 테마에서도 구분되게 골드 강조 */
html body .ma-kind-btn.is-active {
    background: rgba(var(--gold-rgb), .18);
    color: var(--gold-text);
    box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .45);
}

/* ───── 토마토TV 플레이어 (chartContainer 안, RightTomatoTV.js createTomatoTVContainer) ───── */
html body .rightside-chart-container.tomato-tv-active { height: auto; min-height: 320px; background: transparent; margin: 10px 0; }
html body .tomato-tv-container { display: flex; flex-direction: column; width: 100%; border-radius: 12px; overflow: hidden; background: var(--bg-light); border: 1px solid var(--border-color); position: relative; z-index: 1; }
html body .tomato-tv-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; padding: 8px 12px; background: var(--bg-light); border-bottom: 1px solid var(--border-subtle); position: static; z-index: auto; flex-wrap: nowrap; }
html body .tomato-tv-title { font-size: calc(14px * var(--fs-scale, 1)); font-weight: 700; color: var(--text-primary); }
html body .tomato-tv-back {
    display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
    background: var(--bg-lighter); color: var(--text-primary); border: 1px solid var(--border-color);
    font-size: calc(13px * var(--fs-scale, 1)); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
    html body .tomato-tv-back:hover { background: var(--bg-elevated, var(--bg-lighter)); border-color: var(--border-strong); }
html body .tomato-tv-video { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; background: #000; }
html body .tomato-tv-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .5s ease; }
html body .tomato-tv-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #ddd; font-size: calc(13px * var(--fs-scale, 1)); }
html body .tomato-tv-spinner { width: 36px; height: 36px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin 1s linear infinite; }

/* 호가 섹션: 3열이 아니라 호가 목록(.ob-scroll)이 스크롤되게 높이를 열에 맞춘다 (머리글·총잔량은 항상 보임) */
html body #HogaSection { height: calc(100% - 56px - var(--submenu-h)) !important; max-height: calc(100% - 56px - var(--submenu-h)) !important; overflow: hidden !important; }   /* JS 인라인 height 보다 우선 */
html body #HogaSection .ob-wrap { height: 100%; }
html body #HogaSection .ob-scroll { flex: 1 1 auto; min-height: 0; }
html body .ob-header { padding: 10px 14px 8px; max-height: none; box-shadow: none; }
html body .ob-header__title-row { margin-bottom: 4px; }
html body .ob-header__price-row { margin-bottom: 4px; gap: 10px; }
html body .ob-header__sub-row { gap: 12px; align-items: center; }
html body .ob-col-header { height: 24px; }
html body .ob-col-header__cell { font-size: calc(13px * var(--fs-scale, 1)); color: var(--text-muted); }
html body .ob-totals { height: 26px; }

/* 팝업 닫기(X) 아이콘: 흰색 고정이라 흰색 테마에서 안 보이던 것 → 글자색 */
html body .rightside-close-icon:before, html body .rightside-close-icon:after { background-color: var(--text-primary); }
html body .rightside-popup-close { opacity: .75; }
html body .rightside-popup-close:hover { opacity: 1; }

/* 사이드 창 위치 = 왼쪽: 관심목록(4열)을 차트 앞으로. 아이콘 레일은 그대로 오른쪽 */
html[data-side="left"] body .left-sidebar { order: 0; }
html[data-side="left"] body .left-sidebar #mainSidebarToggle { transform: none; }   /* 오른쪽 배치용 거울 반전 해제 */
html[data-side="left"] body .side-rail [data-rail="collapse"] i { transform: scaleX(-1); }
