:root {
  --bg: #000;
  --panel: #0d0f11;
  --panel-2: #141719;
  --panel-3: #1b1f22;
  --line: #23282c;
  --line-2: #2e3438;
  --text: #eaecef;
  --text-2: #a3abb3;
  --text-3: #6b757e;
  --up: #e8474b;
  --down: #00b57a;
  --accent: #00c076;
  --warn: #f0b90b;
  --blue: #2b7fff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --r: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 13px; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input { background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; outline: 0; width: 100%; }
input:focus { border-color: var(--line-2); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #2b3136; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--text-2); }
.dim { color: var(--text-3); } .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.warn { color: var(--warn); }

/* ---------- boot ---------- */
.boot { display: flex; align-items: center; justify-content: center; height: 100vh; }
.boot-inner { text-align: center; width: 280px; }
.boot-logo { font-size: 26px; font-weight: 500; letter-spacing: .14em; }
.boot-logo span { color: var(--accent); font-size: 15px; letter-spacing: .2em; margin-left: 6px; }
.boot-bar { height: 2px; background: var(--line); margin: 22px 0 12px; overflow: hidden; border-radius: 2px; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
.boot-txt { color: var(--text-3); font-size: 12px; }
.boot-err { color: var(--text-2); font-size: 12px; margin: 14px 0 18px; line-height: 1.7; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-rows: 46px minmax(0, 1fr) 216px; height: 100dvh; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0;
}
.brand { font-weight: 500; letter-spacing: .1em; font-size: 15px; white-space: nowrap; }
.brand span { color: var(--accent); font-size: 11px; letter-spacing: .16em; margin-left: 5px; }
.nav { display: flex; gap: 14px; color: var(--text-3); font-size: 12px; align-items: center; }
.nav button { color: var(--text-3); font-size: 12px; }
.nav button:hover { color: var(--text); }
.only-mobile { display: none; }
.sym-date { display: none; }
.top-spacer { flex: 1; min-width: 0; }
.hud { display: flex; align-items: center; gap: 14px; font-size: 12px; min-width: 0; }
.hud-item { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.hud-item label { color: var(--text-3); font-size: 10px; letter-spacing: .04em; }
.hud-item strong { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.speed { display: flex; gap: 2px; background: var(--panel-3); padding: 2px; border-radius: 6px; }
.speed button { padding: 3px 7px; border-radius: 4px; color: var(--text-3); font-size: 11px; font-family: var(--mono); }
.speed button.on { color: var(--text); background: #2c3338; }
.speed button:hover { color: var(--text); }

.main { display: grid; grid-template-columns: 252px minmax(0, 1fr) 312px; min-height: 0; min-width: 0; }

/* ---------- left ---------- */
.left { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); }
.left-top { padding: 9px 10px 7px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search input { padding: 6px 9px 6px 26px; font-size: 12px; background: var(--panel-3); }
.search::before { content: ""; position: absolute; left: 9px; top: 9px; width: 9px; height: 9px; border: 1.4px solid var(--text-3); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 17px; top: 18px; width: 5px; height: 1.4px; background: var(--text-3); transform: rotate(45deg); }
.tabs { display: flex; gap: 12px; margin-top: 9px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs b { color: var(--text-3); font-weight: 400; cursor: pointer; position: relative; padding-bottom: 4px; flex: none; }
.tabs b.on { color: var(--text); }
.tabs b.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); }
.tabs b:hover { color: var(--text-2); }
.tabs b.lock { opacity: .55; }
.ctabs { display: flex; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs b { font-weight: 400; cursor: pointer; padding: 2px 8px; border-radius: 9px; background: var(--panel-3); flex: none; }
.ctabs b.on { background: #232a2f; color: var(--text); }
.ctabs b:hover { color: var(--text-2); }
.ctabs b i { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 3px; }
.ctabs b.on i { color: var(--accent); }
.list-head { display: grid; grid-template-columns: 1fr 74px 58px; padding: 5px 10px; color: var(--text-3); font-size: 10px; border-bottom: 1px solid var(--line); }
.list-head span:last-child { text-align: right; }
.mlist { flex: 1; overflow-y: auto; min-height: 0; }
.row { display: grid; grid-template-columns: 1fr 74px 58px; align-items: center; padding: 6px 10px; cursor: pointer; }
.row:hover { background: var(--panel-2); }
.row.on { background: #1a2024; box-shadow: inset 2px 0 0 var(--accent); }
.row.lock { opacity: .55; cursor: not-allowed; }
.row .nm { overflow: hidden; min-width: 0; }
.row .nm b { display: block; font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm i { font-style: normal; color: var(--text-3); font-size: 10px; font-family: var(--mono); }
.row .px { text-align: right; font-family: var(--mono); font-size: 12px; }
.row .ch { text-align: right; font-family: var(--mono); font-size: 10px; }

/* ---------- center ---------- */
.center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.symhead { display: flex; align-items: center; gap: 20px; padding: 10px 14px 9px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.symhead .id h1 { font-size: 17px; font-weight: 500; display: inline; }
.symhead .id em { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 7px; font-family: var(--mono); }
.symhead .price { font-family: var(--mono); font-size: 23px; font-weight: 500; line-height: 1; }
.symhead .chg { font-family: var(--mono); font-size: 12px; margin-top: 3px; }
.stats { display: flex; gap: 18px; margin-left: auto; }
.stat { font-size: 11px; color: var(--text-3); }
.stat b { display: block; color: var(--text-2); font-weight: 400; font-family: var(--mono); margin-top: 2px; font-size: 11px; }

.chartbar { display: flex; align-items: center; gap: 12px; padding: 5px 12px; border-bottom: 1px solid var(--line); font-size: 11px; }
.tf { display: flex; gap: 1px; }
.tf button { padding: 3px 8px; border-radius: 4px; color: var(--text-3); font-size: 11px; }
.tf button.on { background: #242a2e; color: var(--text); }
.tf button:disabled { opacity: .3; cursor: not-allowed; }
.tf button:hover:not(:disabled) { color: var(--text); }
.ms { display: flex; gap: 12px; margin-left: auto; font-family: var(--mono); color: var(--text-3); font-size: 10px; }
.viewtag { color: var(--warn); font-size: 11px; }
.viewtag button { color: var(--accent); text-decoration: underline; font-size: 11px; }
.chartwrap { position: relative; flex: 1; min-height: 0; }
#chart { display: block; width: 100%; height: 100%; cursor: crosshair; }
.ohlc { position: absolute; left: 12px; top: 8px; display: flex; gap: 10px; font-family: var(--mono); font-size: 10px; color: var(--text-2); pointer-events: none; }
.ohlc i { font-style: normal; color: var(--text-3); }

.riskbar { display: flex; gap: 18px; padding: 6px 14px; border-top: 1px solid var(--line); background: var(--panel); overflow-x: auto; scrollbar-width: none; }
.riskbar::-webkit-scrollbar { display: none; }
.rb { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.rb label { display: block; margin-bottom: 1px; }
.rb b { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--text-2); }
.rb.warn b { color: var(--warn); }

/* ---------- right ---------- */
.right { border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--panel); min-height: 0; min-width: 0; overflow-y: auto; }
.modetabs { padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.advnote { padding: 5px 12px; font-size: 10px; line-height: 1.5; color: var(--text-3); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.advnote.lock { color: #f0b921; background: rgba(240,185,33,.07); }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.side-tabs button { padding: 9px 0; font-size: 13px; color: var(--text-3); border-bottom: 2px solid transparent; }
.side-tabs button.on.buy { color: var(--up); border-color: var(--up); }
.side-tabs button.on.sell { color: var(--down); border-color: var(--down); }
.op { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.seg { display: flex; gap: 3px; background: var(--panel-3); padding: 2px; border-radius: 6px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { flex: 1; padding: 5px 0; border-radius: 4px; font-size: 11px; color: var(--text-3); }
.seg button.on { background: #2c3338; color: var(--text); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.field label { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-3); margin-bottom: 4px; }
.field label span { font-family: var(--mono); }
.lev-slider { -webkit-appearance: none; width: 100%; height: 3px; background: var(--line-2); border-radius: 2px; padding: 0; border: 0; }
.lev-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--text); cursor: pointer; }
.lev-marks { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
.kv { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); gap: 8px; }
.kv b { font-weight: 400; color: var(--text-2); font-family: var(--mono); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.estgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; font-size: 10px; color: var(--text-3); }
.estgrid div { display: flex; justify-content: space-between; gap: 6px; }
.estgrid b { font-family: var(--mono); font-weight: 400; color: var(--text-2); }
.estgrid b.dim { color: var(--text-3); }
.op #submitBtn { position: sticky; bottom: -2px; z-index: 4; box-shadow: 0 -10px 18px rgba(0,0,0,.55); }
.btn-main { padding: 11px 0; border-radius: 6px; font-size: 13px; font-weight: 500; color: #fff; text-align: center; }
.btn-main.buy { background: var(--up); } .btn-main.sell { background: var(--down); }
.btn-main:disabled { opacity: .4; cursor: not-allowed; }
.btn-main.buy:hover:not(:disabled) { background: #f05559; } .btn-main.sell:hover:not(:disabled) { background: #00c987; }
.risk-note { font-size: 10px; color: var(--text-3); line-height: 1.6; padding: 0 12px 10px; }
.riskbox { border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; display: flex; flex-direction: column; gap: 5px; background: #101315; }
.riskhead { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-2); }
.riskhint { font-size: 10px; color: var(--text-3); line-height: 1.55; }
.riskhint.warn { color: var(--warn); }
.tpsl { border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: #101315; }
.tpsl summary { font-size: 11px; color: var(--text-2); cursor: pointer; list-style: none; }
.tpsl summary::-webkit-details-marker { display: none; }
.tpsl summary::before { content: "▸ "; color: var(--text-3); }
.tpsl[open] summary::before { content: "▾ "; }
.tpsl .row2 { margin-top: 7px; }
.hint { font-size: 10px; color: var(--text-3); line-height: 1.55; }
.hint.center { text-align: center; }
.hint.maxp { color: var(--text-2); }
.hint.maxp.warn { color: var(--warn); }
.opt-chain table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10px; }
.opt-chain th { color: var(--text-3); font-weight: 400; text-align: right; padding: 3px 2px; border-bottom: 1px solid var(--line); }
.opt-chain th.strike, .opt-chain td.strike { text-align: center; color: var(--text-3); }
.opt-chain td { text-align: right; padding: 3px 2px; border-bottom: 1px solid #14181a; cursor: pointer; }
.opt-chain td:hover { background: #1a2024; }
.opt-chain tr.gk td { background: #171b1e; }

/* ---------- bottom ---------- */
.bottom { border-top: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.btabs { display: flex; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 12px; align-items: center; flex: none; height: 34px; overflow-x: auto; scrollbar-width: none; }
.btabs::-webkit-scrollbar { display: none; }
.btabs span { color: var(--text-3); cursor: pointer; height: 100%; display: flex; align-items: center; border-bottom: 1.5px solid transparent; white-space: nowrap; }
.btabs span.on { color: var(--text); border-color: var(--accent); }
.btabs .r { margin-left: auto; display: flex; gap: 12px; padding-left: 10px; }
.btabs .r button { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.btabs .r button:hover { color: var(--text); }
.bpanes { flex: 1; overflow: auto; min-height: 0; }
table.grid { width: 100%; border-collapse: collapse; font-size: 11px; }
table.grid th { position: sticky; top: 0; background: var(--panel); color: var(--text-3); font-weight: 400; text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.grid th:first-child, table.grid td:first-child { text-align: left; padding-left: 14px; }
table.grid th:last-child, table.grid td:last-child { padding-right: 16px; }
table.grid td { text-align: right; padding: 6px 10px; border-bottom: 1px solid #14181a; font-family: var(--mono); white-space: nowrap; }
table.grid td.name { font-family: var(--sans); }
table.grid td.ops { font-family: var(--sans); }
table.grid tr:hover td { background: #14181b; }
table.grid tbody tr[data-jump] { cursor: pointer; }
.tag { display: inline-block; padding: 1px 5px; border-radius: 3px; font-size: 10px; font-family: var(--sans); }
.tag.long { background: rgba(232,71,75,.14); color: var(--up); }
.tag.short { background: rgba(0,181,122,.14); color: var(--down); }
.tag.lev { background: #23282c; color: var(--text-2); }
.tag.t1 { background: rgba(240,185,33,.14); color: #f0b921; }
.empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 12px; }
.mini-btn { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 10px; color: var(--text-2); white-space: nowrap; }
.mini-btn:hover { color: var(--text); border-color: var(--text-3); }
.mini-btn.on { border-color: var(--accent); color: var(--accent); }
.mini-btn.wide { width: 100%; padding: 5px 8px; text-align: center; }
.mini-inp { padding: 2px 5px; font-size: 11px; width: 96px; }
.eqwrap { padding: 8px 16px 10px; }
.eqcanvas { width: 100%; height: 92px; display: block; }
.eqstats { display: flex; gap: 24px; margin-top: 8px; flex-wrap: wrap; }
.eqstats div { font-size: 10px; color: var(--text-3); }
.eqstats b { display: block; font-size: 14px; color: var(--text); font-family: var(--mono); font-weight: 500; margin-top: 2px; }

/* 结算弹窗的资金曲线 */
.curvebox { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 6px; background: var(--panel-2); }
.curvehead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.curvehead b { font-size: 12px; font-weight: 600; color: var(--text); }
.curvehead span { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.curvehead span i { font-style: normal; }
.curvebox canvas { display: block; width: 100%; height: 132px; }

/* ---------- review ---------- */
.review { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.rvhead { display: flex; align-items: center; gap: 18px; }
.rvsum { flex: 1; min-width: 0; }
.rvt { font-size: 13px; margin-bottom: 2px; }
.rvexport { display: flex; gap: 6px; }
.grade { font-size: 40px; font-weight: 500; line-height: 1; }
.parts { display: flex; flex-direction: column; gap: 4px; max-width: 620px; }
.part { display: grid; grid-template-columns: 72px 1fr 56px; gap: 8px; align-items: center; font-size: 10px; color: var(--text-3); }
.part .bar { height: 5px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.part .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.part b { font-family: var(--mono); font-weight: 500; color: var(--text-2); text-align: right; }
.part em { font-style: normal; color: var(--text-3); }
.advice { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.adv { border-left: 2px solid var(--line-2); padding: 6px 10px; background: #101315; border-radius: 0 6px 6px 0; }
.adv b { display: block; font-size: 11px; margin-bottom: 3px; color: var(--text); font-weight: 500; }
.adv p { font-size: 10px; color: var(--text-3); line-height: 1.6; }
.adv.warn { border-left-color: var(--warn); }
.adv.bad { border-left-color: var(--up); }
.adv.ok { border-left-color: var(--accent); }
.adv.info { border-left-color: var(--blue); }
.rvtrips { min-width: 0; }
.goalbox { border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.grow { display: flex; justify-content: space-between; gap: 12px; color: var(--text-3); }
.grow em { font-style: normal; font-family: var(--mono); color: var(--text-2); }
.grow i { font-style: normal; font-family: var(--mono); }
.grow.ok i { color: var(--accent); } .grow.bad i { color: var(--up); }
.gsum { margin-top: 4px; font-size: 12px; }
.gsum.ok { color: var(--accent); } .gsum.bad { color: var(--up); }

/* ---------- modal ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 18px; backdrop-filter: blur(3px); overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; width: 580px; max-width: 100%; max-height: 92dvh; overflow-y: auto; }
.modal.wide { width: 780px; }
.modal h2 { font-size: 16px; font-weight: 500; padding: 18px 22px 4px; }
.modal .sub { padding: 0 22px 14px; color: var(--text-3); font-size: 12px; }
.modal .body { padding: 0 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal label { font-size: 10px; color: var(--text-3); display: block; margin-bottom: 5px; }
.modal .foot { padding: 0 22px 20px; display: flex; gap: 10px; }
.modal .foot button { flex: 1; padding: 11px 0; border-radius: 7px; font-size: 13px; }
.modal .foot .go { background: var(--accent); color: #04120c; font-weight: 500; }
.modal .foot .cancel { background: var(--panel-3); color: var(--text-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 20px; font-size: 11px; color: var(--text-2); }
.chips button.on { border-color: var(--accent); color: var(--accent); background: rgba(0,192,118,.08); }
.chips button:disabled { opacity: .35; }
.chips button.u10 { border-color: #4a3d18; color: #c9a763; }
.chips button.u10.on { border-color: var(--warn); color: var(--warn); background: rgba(240,185,11,.10); }
.hint.u10warn { color: #c9a763; }
.notice { background: #1a1410; border: 1px solid #3a2c14; border-radius: 7px; padding: 9px 11px; font-size: 11px; color: #c9a763; line-height: 1.6; }
.rules { font-size: 12px; line-height: 1.85; color: var(--text-2); }
.rules b { color: var(--text); }
.scen { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.scen::-webkit-scrollbar { width: 8px; }
.scen::-webkit-scrollbar-thumb { background: #2f353a; border-radius: 4px; }
.scen::-webkit-scrollbar-thumb:hover { background: #3d444a; }
.scen button { text-align: left; border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 10px; display: grid; grid-template-columns: 66px 1fr; gap: 2px 8px; }
.scen button.on { border-color: var(--accent); background: rgba(0,192,118,.06); }
.scen b { font-size: 12px; color: var(--text); grid-row: span 2; align-self: center; }
.scen span { font-size: 11px; color: var(--text-2); }
.scen em { font-style: normal; font-size: 10px; color: var(--text-3); }
.savelist { display: flex; flex-direction: column; gap: 6px; }
.saverow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.saverow b { font-size: 12px; font-weight: 400; display: block; }
.saverow em { font-style: normal; font-size: 10px; color: var(--text-3); }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 90; max-width: min(360px, 86vw); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 2px solid var(--text-3); border-radius: 6px; padding: 8px 13px; font-size: 12px; line-height: 1.5; animation: tin .18s ease-out; }
.toast.ok { border-left-color: var(--accent); }
.toast.err { border-left-color: var(--up); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

/* ---------- tutorial ---------- */
.tut { position: fixed; left: 50%; transform: translateX(-50%); bottom: 228px; width: min(430px, calc(100vw - 40px)); background: #10161a; border: 1px solid #2b3a42; border-radius: 10px; padding: 12px 14px; z-index: 55; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.tut-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tut-head b { font-size: 12px; font-weight: 500; }
.tut-head span { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.tut p { font-size: 11px; color: var(--text-2); line-height: 1.65; }
.tut-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; gap: 8px; }
.tut-foot .dots { display: flex; gap: 4px; }
.tut-foot .dots i { width: 14px; height: 3px; border-radius: 2px; background: var(--line-2); }
.tut-foot .dots i.on { background: var(--accent); }
.tut-foot button { margin-left: 6px; }
.tut-hl { position: relative; z-index: 54; outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 6px; }

/* ---------- mobile ---------- */
.mbar { display: none; }
.drawer-mask { display: none; }

@media (max-width: 1180px) {
  .main { grid-template-columns: 208px minmax(0, 1fr) 278px; }
  .stats { display: none; }
}
@media (max-width: 1000px) {
  .nav { display: none; }
  .hud-item.hide-sm { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-rows: 46px minmax(0, 1fr) 186px 50px; }
  .main { grid-template-columns: minmax(0, 1fr); position: relative; }
  .left, .right {
    position: fixed; top: 46px; bottom: 50px; width: min(88vw, 340px); z-index: 45;
    background: var(--panel); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.7);
  }
  .left { left: 0; transform: translateX(-104%); border-right: 1px solid var(--line-2); }
  .right { right: 0; transform: translateX(104%); border-left: 1px solid var(--line-2); }
  .main.left-open .left, .main.right-open .right { transform: none; }
  .drawer-mask { position: fixed; inset: 46px 0 50px 0; background: rgba(0,0,0,.6); z-index: 44; }
  .drawer-mask.on { display: block; }
  .mbar { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--panel); }
  .mbar button { color: var(--text-2); font-size: 12px; border-right: 1px solid var(--line); }
  .mbar button:last-child { border-right: 0; }
  .only-mobile { display: inline; }
  .symhead { gap: 12px; padding: 8px 12px; }
  .symhead .price { font-size: 19px; }
  .riskbar { gap: 14px; padding: 5px 12px; }
  .tut { left: 10px; right: 10px; width: auto; transform: none; bottom: 246px; }
}
@media (max-width: 560px) {
  /* 顶栏高度改为自适应：窄屏下品牌独占一行、控件排成一行，避免「结算」被挤出视口 */
  .app { grid-template-rows: auto minmax(0, 1fr) 216px; }
  .topbar { min-height: 46px; padding: 5px 8px; gap: 2px 8px; flex-wrap: wrap; align-content: center; }
  .brand { font-size: 12px; letter-spacing: .02em; flex: 0 0 100%; }
  .brand span { display: inline; font-size: 12px; letter-spacing: .02em; margin-left: 1px; }
  .top-spacer { display: none; }
  .hud { gap: 8px; flex: 1 1 100%; justify-content: flex-end; }
  .hud-item:nth-child(1) { display: none; }
  .sym-date { display: block; margin-top: 2px; color: var(--text-3); font-size: 10px; font-family: var(--mono); }
  .speed button[data-sp="2"] { display: none; }
  .modal { border-radius: 10px; }
  .modal h2 { padding: 14px 16px 4px; }
  .modal .sub { padding: 0 16px 12px; }
  .modal .body { padding: 0 16px 14px; }
  .modal .foot { padding: 0 16px 16px; }
  .eqstats { gap: 14px; }
  .part { grid-template-columns: 62px 1fr 50px; }
  .review { padding: 8px 10px 12px; }
}
