:root[data-theme]{--paper:#f3f4ef;--card:#fff;--ink:#1c241e;--muted:#657064;--line:#dce2d8;--acid:#eaf5bd;--lime:#d5fb19;--accent:#426515;--action:#c4e957;--accent-ink:#19220b;--soft:#f0f3e9;--green:#087d62;--red:#cc3658;--shadow:0 3px 14px #2030180d;color-scheme:light}
:root[data-theme=dark]{--paper:#101112;--card:#1a1c1e;--ink:#eceeef;--muted:#a9adb1;--line:#333638;--acid:#29332a;--lime:#d5fb19;--accent:#c0e859;--action:#c4e957;--accent-ink:#19220b;--soft:#252729;--green:#50d5ad;--red:#ff839a;--shadow:0 3px 14px #0002;color-scheme:dark}
html[data-theme] body{background:var(--paper);color:var(--ink)}
html[data-theme] .card{background:var(--card);border-color:var(--line);border-radius:16px;box-shadow:var(--shadow)}
html[data-theme] .topbar{border-bottom:2px solid var(--line);gap:12px}
html[data-theme] :is(.mark,.brand-mark){background:var(--action);color:var(--accent-ink);border-radius:12px;transform:none}
.theme-toggle{flex:none;white-space:nowrap;min-height:36px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:var(--soft);color:var(--ink);font-size:12px;font-weight:600;cursor:pointer}
html[data-theme] :is(.btn,.account,.star,.select,.search,.symbol-menu,.logout,.legend button,.field input,.field select,.login-box input,input,select,textarea){background:var(--card);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.btn.primary,.btn.acid,.run,.login-submit){background:var(--action);border-color:var(--action);color:var(--accent-ink)}
html[data-theme] :is(.nav a.active,.console-links a.active,.tabs button.active,.bottom-nav a.active,.mobile-console-nav a.active,.star.on){background:var(--acid);color:var(--accent)}
html[data-theme] :is(.segments,.stat,.class-pill,.pill,.user-entry-head,.user-badge,.strip,.orbit-count span){background:var(--soft);color:var(--ink)}
html[data-theme] .segments button.active{background:var(--card);color:var(--accent)}
html[data-theme] :is(.user-entry,.history-card,#trade-breakdown){background:var(--card);color:var(--ink)}
html[data-theme] :is(th,#detail-modal th){background:var(--soft);color:var(--muted)}
html[data-theme] tbody tr:hover{background:var(--soft)}
html[data-theme] :is(.user-muted,.user-id,.user-kv span,.user-entry-note>span,.cal-date,.cal-n,#trade-breakdown .breakdown-row span:first-child){color:var(--muted)}
html[data-theme] .user-extension{color:var(--green)}
html[data-theme] :is(.bottom-nav,.mobile-console-nav){background:var(--card);border-color:var(--line)}
html[data-theme] .legend button:not(.off){background:var(--soft);border-color:var(--line)}
html[data-theme] .legend button.off{background:transparent;color:var(--muted)}
html[data-theme] :is(.signal-orbit,.horizon-lattice){background:var(--soft);border-color:var(--line)}
html[data-theme] .lattice-box{fill:var(--card);stroke:var(--line)}
html[data-theme] .lattice-title{fill:var(--ink)}
html[data-theme] .lattice-meta{fill:var(--muted)}
html[data-theme] .cal-cell{background:var(--soft);border-color:var(--line);color:var(--ink)}
html[data-theme] .cal-head{color:var(--muted);border-color:var(--line)}
html[data-theme] .cal-cell.win{background:color-mix(in srgb,var(--green) 10%,var(--card));border-color:color-mix(in srgb,var(--green) 35%,var(--line))}
html[data-theme] .cal-cell.loss{background:color-mix(in srgb,var(--red) 10%,var(--card));border-color:color-mix(in srgb,var(--red) 35%,var(--line))}
html[data-theme] .cal-cell.win .cal-pnl{color:var(--green)}
html[data-theme] .cal-cell.loss .cal-pnl{color:var(--red)}
html[data-theme] .cal-cell.zero .cal-pnl{color:var(--muted)}
html[data-theme=dark] :is(.pill.on,.statusbar){background:#153c34;color:var(--green)}
html[data-theme=dark] :is(.pill.off,.statusbar.error){background:#422331;color:var(--red)}
html[data-theme=dark] .btn.danger{color:var(--red);border-color:#774252}
html[data-theme=dark] .live{background:#175343;color:#dcfff4}
html[data-theme=dark] .symbol-option:hover{background:var(--soft)}
html[data-theme] .panel-title:before{color:var(--accent)}
html[data-theme] .hero .big,html[data-theme] .metric-value{letter-spacing:-.035em}
@media(max-width:680px){
 html[data-theme] .topbar{flex-wrap:wrap;height:auto;min-height:64px;gap:8px}
 html[data-theme] .topbar .brand{flex:1;min-width:0}
 html[data-theme] .topbar .brand strong{font-size:15px}
 html[data-theme] .topbar #account{max-width:112px}
 .theme-toggle{min-height:40px;padding:7px 9px}
 html[data-theme] .topbar .brand-mark{width:34px;height:34px;font-size:22px;flex:none}
}
html[data-theme] :is(.chart-reset,.chart-tip,.horizon,.filter button){background:var(--card);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.level,.tag,.vote.flat){background:var(--soft);color:var(--muted)}
html[data-theme] .filter button.active{background:var(--action);color:var(--accent-ink);border-color:var(--accent)}
html[data-theme] :is(.signal,th,td){border-color:var(--line)}
html[data-theme] .disclaimer{color:var(--muted);border-color:var(--line)}
html[data-theme] .motivation{background:var(--soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] .vote.up{background:#153c34}
html[data-theme=dark] .vote.down{background:#422331}
html[data-theme=dark] .status{background:#422331;color:#ffb9c8;border-color:#774252}
html[data-theme] .panel-head{height:auto;min-height:31px;flex-wrap:wrap}
html[data-theme] .notice{border-color:var(--line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--muted);opacity:1}
@media(max-width:680px){html[data-theme] .topbar .live{display:none}}

#chart-readout{min-height:30px;padding:6px 0;color:var(--muted);font-size:11px;line-height:1.6;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html[data-theme] body{font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif;-webkit-font-smoothing:antialiased}
html[data-theme] :is(.panel-title,.brand strong,.user-name,.coin,.history-card header>b,.position-card-head b){font-weight:750;color:var(--ink)}
html[data-theme] :is(.big,.metric-value,.stat b,.position-field strong,.history-card-grid b,.level b,.user-entry [data-assets]>b){font-weight:750;font-variant-numeric:tabular-nums}
html[data-theme] :is(.user-card-code,#account-info b,#account-info strong){font-weight:650;color:var(--ink)}
html[data-theme] :is(td,.user-entry-grid){font-weight:500}
html[data-theme] :is(th,.field label,.history-card-grid span){font-weight:650}
html[data-theme] :is(.sub,.eyebrow,.notice,.user-muted){line-height:1.65}
html[data-theme=light]{--ink:#151b16;--muted:#596253}
html[data-theme=dark]{--ink:#f1f2f3;--muted:#b1b5b9}
/* Position values have a stronger reading hierarchy than supporting metadata. */
html[data-theme] #positions td{font-size:15px;font-weight:700;color:var(--ink);padding:14px 16px}
html[data-theme] #positions th{font-size:12px;font-weight:650}
html[data-theme] #positions .coin{font-size:17px;font-weight:750}
html[data-theme] #positions td small{font-size:12px;font-weight:400;color:var(--muted)}
html[data-theme] .position-field strong{font-size:16px;font-weight:700}
html[data-theme] .position-field strong.positive,html[data-theme] .position-field strong.negative{font-size:17px}
html[data-theme] .position-card-head b{font-size:17px}
@media(max-width:680px){html[data-theme] #positions td{font-size:14px;padding:12px}html[data-theme] .position-field strong{font-size:15px}}
