/* Trading-terminal dark palette; the original paper theme remains untouched. */
:root[data-theme="dark"]{color-scheme:dark;--bg:#181c22;--paper:#181c22;--panel:#1d2229;--panel2:#252c36;--text:#dce4ef;--ink:#dce4ef;--muted:#9daec1;--line:#343d49;--blue:#70b7fa;--green:#8daac8;--up:#f4777f;--red:#f4777f;--down:#45c797;--soft:#252c36;--heat-line:#343d49;--heat-muted:#9daec1;--heat-green:#8daac8;--heat-red:#f4777f;--heat-down:#45c797;--heat-paper:#1d2229;--heat-soft:#252c36}
:root[data-theme="dark"] body{background-color:#181c22;background-image:none;color:#dce4ef}
:root[data-theme="dark"] dialog::backdrop{background:#05080dbb;backdrop-filter:blur(5px)}
:root[data-theme="dark"] .concept-orb-ring{filter:brightness(1.9) saturate(.45)}
:root[data-theme="dark"] .zen-art{opacity:.68}
.appearance-control{display:inline-flex;align-items:center;flex:0 0 auto;margin-left:3px;vertical-align:middle}
.appearance-toggle{display:grid;place-items:center;width:34px;height:34px;padding:7px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted,#77856e);cursor:pointer;flex:0 0 auto}
.appearance-toggle svg{width:19px;height:19px;display:block}
.appearance-toggle:hover,.appearance-toggle[aria-expanded="true"]{background:var(--panel2,#ecefe5);border-color:var(--line,#dddfd3);color:var(--text,#303d34)}
.appearance-toggle:focus-visible,.appearance-menu button:focus-visible{outline:2px solid #559fe8;outline-offset:2px}
.appearance-menu{position:fixed;z-index:10000;min-width:184px;padding:9px;border:1px solid var(--line,#d4ddcb);border-radius:12px;background:var(--panel,#fafaf4);color:var(--text,#303d34);box-shadow:0 12px 42px #111a2030;font:14px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.appearance-menu[hidden]{display:none!important}
.appearance-menu button{display:flex;align-items:center;gap:12px;width:100%;min-height:42px;padding:9px 12px;border:0;border-radius:7px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.appearance-menu button:hover,.appearance-menu button:focus-visible{background:var(--panel2,#ecefe5)}
.appearance-radio{width:16px;height:16px;border-radius:50%;border:1px solid var(--muted,#87947c);background:transparent;flex-shrink:0}
.appearance-menu [aria-checked="true"]{color:#367ab9}
.appearance-menu [aria-checked="true"] .appearance-radio{border:5px solid #368eef;background:#fff}
:root[data-theme="dark"] .appearance-menu{background:#252a33;border-color:#4a5260;box-shadow:0 15px 50px #0008}
:root[data-theme="dark"] .appearance-menu [aria-checked="true"]{color:#79bcff}
:root[data-theme="dark"] .appearance-toggle{color:#b5c3d5}
:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{color-scheme:dark;accent-color:#4b9bf1}
@media(max-width:700px){.appearance-menu{min-width:166px}.appearance-toggle{width:32px;height:32px}.appearance-control{margin-left:0}}
@media(prefers-reduced-motion:no-preference){.appearance-menu{animation:appearance-open .12s ease-out}@keyframes appearance-open{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}}

:root[data-theme="dark"] .ma-legend-item i[style*="background:#000000" i]{background:#dce4ef!important}
:root[data-theme="dark"] .heat-page .ladder-stock-reseal{border:0;background:#b96a55;color:#fffaf1}
