        /* S&P 500 market intelligence */
        .sp500-panel { margin-top: 10px; overflow: hidden; }
        .mover-count {
            display: inline-grid;
            place-items: center;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: var(--amber-bg);
            color: var(--amber);
            font-family: var(--mono);
            font-size: .58rem;
        }
        .heatmap-toolbar {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 38px;
            padding: 8px 14px;
            border-bottom: 1px solid var(--line);
            color: var(--faint);
            font-size: .61rem;
        }
        .session-toggle {
            display: inline-flex;
            gap: 4px;
            margin-left: auto;
            padding: 3px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(255,255,255,.025);
        }
        .session-btn {
            padding: 5px 8px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: var(--muted);
            font-size: .6rem;
            font-weight: 800;
            cursor: pointer;
        }
        .session-btn.active { background: var(--surface-3); color: var(--text); }
        .sp500-updated { margin-left: auto; font-family: var(--mono); color: var(--muted); }
        .heat-legend { display: flex; align-items: center; gap: 3px; margin-left: auto; }
        .heat-legend i { width: 18px; height: 8px; border-radius: 2px; }
        .sp500-widget-shell {
            height: clamp(560px, 68vh, 820px);
            padding: 8px;
            background: #080c12;
        }
        .sp500-widget { width: 100%; height: 100%; }
        .sp500-widget .tradingview-widget-container__widget { width: 100%; height: 100%; }
        .mover-list { max-height: 520px; overflow-y: auto; }
        .mover-card {
            display: grid;
            grid-template-columns: 118px minmax(0, 1fr);
            gap: 15px;
            padding: 14px 16px;
            border-bottom: 1px solid var(--line);
        }
        .mover-card:last-child { border-bottom: 0; }
        .mover-quote { padding-right: 14px; border-right: 1px solid var(--line); }
        .mover-symbol { font-family: var(--mono); font-size: .86rem; font-weight: 800; }
        .mover-name { display: block; margin-top: 3px; color: var(--faint); font-size: .58rem; }
        .mover-change { display: block; margin-top: 10px; font-family: var(--mono); font-size: 1.04rem; font-weight: 800; }
        .mover-change.up { color: var(--green); }
        .mover-change.down { color: var(--red); }
        .mover-price { display: block; margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: .61rem; }
        .mover-news { display: grid; gap: 8px; align-content: center; }
        .mover-news a { color: var(--text); font-size: .72rem; font-weight: 700; line-height: 1.45; text-decoration: none; }
        .mover-news a:hover { color: var(--blue); }
        .mover-news-meta { display: block; margin-top: 2px; color: var(--faint); font-size: .57rem; font-weight: 500; }
        .mover-empty { color: var(--faint); font-size: .68rem; }
        .sidebar-movers { overflow: hidden; }
        .sidebar-movers .mover-list { max-height: 390px; }
        .sidebar-movers .mover-card { display: block; padding: 11px 12px; }
        .sidebar-movers .mover-quote {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: baseline;
            gap: 7px;
            padding: 0 0 7px;
            border: 0;
        }
        .sidebar-movers .mover-name { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sidebar-movers .mover-change { margin: 0; font-size: .8rem; }
        .sidebar-movers .mover-price { display: none; }
        .sidebar-movers .mover-news { gap: 0; }
        .sidebar-movers .mover-news a { font-size: .66rem; line-height: 1.35; }
        .sidebar-movers .mover-news a:nth-child(n+2) { display: none; }

        /* News and activity */
        .content-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr);
            gap: 10px;
            margin-top: 10px;
        }
        .news-panel, .activity-panel { min-height: 460px; overflow: hidden; }
        .news-tools { display: flex; align-items: center; gap: 5px; margin-left: auto; }
        .filter-btn {
            padding: 5px 8px;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: transparent;
            color: var(--muted);
            font-size: .61rem;
            font-weight: 700;
            cursor: pointer;
        }
        .filter-btn.active { color: var(--text); background: var(--surface-3); border-color: var(--line-strong); }
        .filter-btn[data-filter="호재"].active { color: var(--green); background: var(--green-bg); border-color: rgba(44,230,155,.28); }
        .filter-btn[data-filter="악재"].active { color: var(--red); background: var(--red-bg); border-color: rgba(255,97,116,.28); }
        .news-list { max-height: 520px; overflow-y: auto; }
        .news-item {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr);
            gap: 12px;
            padding: 12px 15px;
            border-bottom: 1px solid var(--line);
            transition: background .15s ease;
        }
        .news-item:last-child { border-bottom: 0; }
        .news-item:hover { background: rgba(255,255,255,.025); }
        .news-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
        .news-badge {
            min-width: 39px;
            padding: 3px 6px;
            border-radius: 6px;
            background: rgba(135,147,164,.1);
            color: var(--muted);
            font-size: .6rem;
            font-weight: 800;
            text-align: center;
        }
        .news-item.good { box-shadow: inset 2px 0 var(--green); }
        .news-item.good .news-badge { color: var(--green); background: var(--green-bg); }
        .news-item.bad { box-shadow: inset 2px 0 var(--red); }
        .news-item.bad .news-badge { color: var(--red); background: var(--red-bg); }
        .news-title { display: block; color: var(--text); font-size: .76rem; font-weight: 600; line-height: 1.45; text-decoration: none; }
        .news-title:hover { color: var(--blue); }
        .news-origin { display: block; margin-top: 4px; color: var(--faint); font-size: .62rem; line-height: 1.35; }
        .news-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; color: var(--muted); font-size: .6rem; font-weight: 700; line-height: 1.35; }
        .news-meta-time { color: var(--faint); font-family: var(--mono); font-weight: 600; }

        .us-watch-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 10px;
        }
        .watch-panel { overflow: hidden; min-height: 360px; }
        .watch-list { max-height: 420px; overflow-y: auto; }
        .market-rail .watch-panel { min-height: 0; }
        .market-rail .watch-list { max-height: 390px; }
        .watch-item {
            display: grid;
            gap: 5px;
            padding: 12px 14px;
            border-bottom: 1px solid var(--line);
        }
        .watch-item.good { box-shadow: inset 3px 0 var(--green); background: rgba(44,230,155,.035); }
        .watch-item.bad { box-shadow: inset 3px 0 var(--red); background: rgba(255,97,116,.035); }
        .watch-item.neutral { box-shadow: inset 3px 0 rgba(105,168,255,.7); }
        .watch-item:last-child { border-bottom: 0; }
        .watch-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
        .watch-title { color: var(--text); font-size: .73rem; font-weight: 800; line-height: 1.4; text-decoration: none; }
        .watch-title:hover { color: var(--blue); }
        .watch-date { color: var(--blue); font-family: var(--mono); font-size: .61rem; font-weight: 800; white-space: nowrap; }
        .watch-meta { color: var(--faint); font-size: .6rem; line-height: 1.45; }
        .watch-values {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 5px;
        }
        .watch-value {
            min-width: 0;
            padding: 6px;
            border: 1px solid var(--line);
            border-radius: 7px;
            background: rgba(255,255,255,.025);
        }
        .watch-value span { display: block; color: var(--faint); font-size: .53rem; }
        .watch-value strong { display: block; margin-top: 2px; overflow: hidden; font-family: var(--mono); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
        .watch-pill {
            display: inline-flex;
            width: max-content;
            padding: 3px 6px;
            border-radius: 999px;
            background: var(--blue-bg);
            color: var(--blue);
            font-size: .55rem;
            font-weight: 800;
        }
        .watch-pill.good { color: var(--green); background: var(--green-bg); }
        .watch-pill.bad { color: var(--red); background: var(--red-bg); }
        .watch-pill.neutral { color: var(--blue); background: var(--blue-bg); }
        .watch-links {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 10px;
            align-items: center;
            min-width: 0;
        }
        .watch-link-label { color: var(--faint); font-size: .58rem; font-weight: 800; }
        .watch-link {
            max-width: 190px;
            overflow: hidden;
            color: var(--blue);
            font-size: .58rem;
            font-weight: 800;
            text-decoration: none;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .watch-link:hover { color: var(--text); text-decoration: underline; }

        .tabs { display: flex; gap: 4px; margin-left: auto; }
        .tab-btn {
            padding: 5px 8px;
            border: 0;
            border-radius: 7px;
            background: transparent;
            color: var(--faint);
            font-size: .62rem;
            font-weight: 700;
            cursor: pointer;
        }
        .tab-btn.active { background: rgba(255,255,255,.07); color: var(--text); }
        .activity-list { max-height: 520px; overflow-y: auto; }
        .activity-row {
            display: grid;
            grid-template-columns: 78px minmax(0, 1fr);
            gap: 10px;
            padding: 9px 13px;
            border-bottom: 1px solid var(--line);
            font-size: .67rem;
            line-height: 1.45;
        }
        .activity-meta { display: grid; align-content: start; gap: 3px; min-width: 0; }
        .activity-time { color: var(--faint); font-family: var(--mono); font-size: .6rem; }
        .activity-kind { color: var(--blue); font-size: .62rem; font-weight: 800; line-height: 1.1; word-break: keep-all; }
        .activity-message { color: #b7c0cd; word-break: break-word; }
        .activity-row.buy .activity-kind, .activity-row.buy .activity-message strong { color: var(--amber); }
        .activity-detail-line {
            display: block;
            margin-top: 3px;
            color: var(--text);
            font-family: var(--mono);
            font-size: .62rem;
            font-weight: 800;
        }

        .empty { padding: 34px 16px; color: var(--faint); font-size: .7rem; text-align: center; }
        /* Test tools */
        .test-tools { margin-top: 10px; overflow: hidden; }
        .test-tools summary {
            padding: 12px 16px;
            color: var(--muted);
            font-size: .7rem;
            font-weight: 700;
            cursor: pointer;
            list-style: none;
        }
        .test-tools summary::-webkit-details-marker { display: none; }
        .test-actions {
            display: grid;
            grid-template-columns: repeat(10, minmax(90px, 1fr));
            gap: 6px;
            padding: 0 12px 12px;
            overflow-x: auto;
        }
        .test-btn {
            padding: 8px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: rgba(255,255,255,.025);
            color: var(--muted);
            font-size: .62rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }
        .test-btn.green { color: var(--green); border-color: rgba(44,230,155,.2); }
        .test-btn.red { color: var(--red); border-color: rgba(255,97,116,.2); }
        .test-btn.blue { color: var(--blue); border-color: rgba(105,168,255,.2); }
        .test-btn:hover { background: rgba(255,255,255,.06); }
        footer { padding: 16px 4px 6px; color: var(--faint); font-family: var(--mono); font-size: .6rem; text-align: center; }
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #253140; border-radius: 20px; }
