/* WEB3 BET · режим Pro (терминал). Токены терминальной темы: --panel, --line, --accent, --up, --down, --poly. */
body.mode-terminal #terminalSports{display:none!important}
#termView{flex:1;min-height:0}
.tv{display:grid;grid-template-columns:minmax(260px,300px) minmax(0,1fr) minmax(320px,370px);gap:12px;padding:12px 14px;background:var(--bg);height:var(--tv-h,calc(100dvh - 160px));min-height:520px;box-sizing:border-box}
.tv-col{min-height:0;display:flex;flex-direction:column;gap:12px}
.tv-scroll{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.tv-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.tv-h{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line-2,var(--line))}
.tv-h h3{margin:0;font:700 10px var(--mono);letter-spacing:.9px;text-transform:uppercase;color:var(--mute)}
.tv-h .sp{flex:1}
.tv-mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
.tv-up{color:var(--up)}.tv-down{color:var(--down)}.tv-mute{color:var(--mute)}
.tv-seg{display:inline-flex;gap:2px;padding:2px;background:var(--sunken);border-radius:8px}
.tv-seg button{border:0;background:transparent;color:var(--dim);font:700 10.5px var(--sans);padding:6px 9px;border-radius:6px;cursor:pointer;white-space:nowrap}
.tv-seg button[aria-pressed="true"]{background:var(--panel);color:var(--fg);box-shadow:0 1px 3px #0b16301a}
.tv-seg.accent button[aria-pressed="true"]{background:var(--accent);color:#fff}
.tv-ib{display:inline-grid;place-items:center;height:30px;min-width:30px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--dim);font:600 11px var(--sans);cursor:pointer;white-space:nowrap}
.tv-ib:hover{border-color:var(--accent);color:var(--accent)}
.tv-ib[aria-pressed="true"]{color:#c48a00;border-color:#e8c25a}

/* ---- list ---- */
.tv-list{overflow:hidden}
.tv-list .tv-h{flex-wrap:wrap}
.tv-list .tv-top{font:700 11px var(--mono);color:var(--up)}
.tv-search{display:flex;align-items:center;gap:8px;margin:10px 12px 8px;padding:0 10px;height:36px;border:1px solid var(--line);border-radius:9px;background:var(--panel-2)}
.tv-search svg{width:14px;height:14px;color:var(--mute);flex-shrink:0}
.tv-search input{border:0;background:transparent;outline:0;flex:1;min-width:0;font:500 12.5px var(--sans);color:var(--fg)}
.tv-rows{flex:1;min-height:0;overflow-y:auto;padding:0 0 8px;scrollbar-width:thin}
.tv-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:100%;padding:10px 12px;border:0;border-left:3px solid transparent;border-bottom:1px solid var(--line-2,var(--line));background:transparent;text-align:left;cursor:pointer;color:var(--fg);font-family:var(--sans)}
.tv-row:hover{background:var(--panel-2)}
.tv-row[aria-selected="true"]{background:var(--accent-bg);border-left-color:var(--accent)}
.tv-row .l1{display:flex;align-items:center;gap:5px;font-size:9.5px;color:var(--mute);min-width:0;white-space:nowrap;overflow:hidden}
.tv-tag{font:700 9px var(--mono);padding:2px 5px;border-radius:4px;background:var(--sunken);color:var(--dim);letter-spacing:.3px}
.tv-tag.live{background:color-mix(in srgb,var(--down) 14%,transparent);color:var(--down)}
.tv-tag.poly{background:color-mix(in srgb,var(--poly) 14%,transparent);color:var(--poly)}
.tv-row .nm{grid-column:1;font-weight:700;font-size:12.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv-row .roi{grid-column:2;grid-row:1/3;align-self:center;text-align:right;font:700 14px var(--mono)}
.tv-row .roi small{display:block;font:600 9px var(--mono);color:var(--mute);margin-top:3px}
.tv-row .l3{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-size:10.5px;color:var(--dim);min-width:0;overflow:hidden;white-space:nowrap}
.tv-row .l3 span{display:inline-flex;align-items:center;gap:4px}
.tv-row .l3 b{font-family:var(--mono);color:var(--fg)}
.tv-row .venue-logo.small{width:15px!important;height:15px!important;margin:0}
.tv-empty{padding:28px 16px;text-align:center;color:var(--mute);font-size:12px;line-height:1.6}

/* ---- main ---- */
.tv-head{padding:14px 16px 0}
.tv-crumb{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font:600 10px var(--mono);color:var(--mute);letter-spacing:.3px}
.tv-head h1{margin:6px 0 4px;font-size:20px;letter-spacing:-.4px;line-height:1.25}
.tv-head .sub{font-size:11.5px;color:var(--dim)}
.tv-head .acts{margin-left:auto;display:flex;gap:6px}
.tv-warn{margin:10px 0 0;padding:9px 12px;border-radius:9px;background:color-mix(in srgb,#f0a23a 12%,var(--panel));border:1px solid color-mix(in srgb,#f0a23a 40%,var(--line));font-size:11.5px;color:var(--fg);line-height:1.5}
.tv-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:12px;border-top:1px solid var(--line)}
.tv-stats>div{padding:11px 14px;border-right:1px solid var(--line);min-width:0}
.tv-stats>div:last-child{border-right:0}
.tv-stats label{display:block;font:700 9px var(--mono);letter-spacing:.7px;color:var(--mute);text-transform:uppercase}
.tv-stats b{display:block;margin-top:5px;font:700 17px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-stats .tv-big b{font-size:22px}
.tv-stats .lv b{color:var(--down)}

.tv-chart{padding-bottom:6px}
.tv-chart .tv-h{flex-wrap:wrap}
.tv-legend{padding:8px 14px 0;font:600 10.5px var(--mono);color:var(--mute);display:flex;gap:12px;flex-wrap:wrap}
.tv-legend i{display:inline-block;width:14px;height:3px;border-radius:2px;vertical-align:middle;margin-right:5px}
.tv-canvas{position:relative;padding:4px 8px 0}
.tv-canvas canvas{display:block;width:100%;height:200px}
.tv-canvas .tv-nodata{position:absolute;inset:0;display:grid;place-items:center;color:var(--mute);font-size:12px;text-align:center;padding:20px}

.tv-book table{width:100%;border-collapse:collapse;font:500 11.5px var(--mono);font-variant-numeric:tabular-nums}
.tv-book th{font:700 9px var(--mono);letter-spacing:.6px;color:var(--mute);text-transform:uppercase;text-align:right;padding:8px 12px 6px;border-bottom:1px solid var(--line-2,var(--line))}
.tv-book th:first-child,.tv-book td:first-child{text-align:left}
.tv-book td{padding:0 12px;height:27px;text-align:right;position:relative;white-space:nowrap}
.tv-book tr.lv{cursor:pointer}
.tv-book tr.lv:hover td{background:var(--panel-2)}
.tv-book tr.sel td{background:var(--accent-bg)!important}
.tv-book tr.ask td:first-child{color:var(--down);font-weight:700}
.tv-book tr.bid td:first-child{color:var(--up);font-weight:700}
.tv-book .bar{position:absolute;right:0;top:3px;bottom:3px;border-radius:3px;pointer-events:none}
.tv-book tr.ask .bar{background:color-mix(in srgb,var(--down) 12%,transparent)}
.tv-book tr.bid .bar{background:color-mix(in srgb,var(--up) 12%,transparent)}
.tv-book td span{position:relative}
.tv-book tr.mid td{height:32px;text-align:center!important;font:600 10px var(--mono);color:var(--mute);background:var(--sunken)}
.tv-you{display:inline-block;margin-right:6px;padding:1px 5px;border-radius:4px;background:var(--accent);color:#fff;font:700 9px var(--mono)}
.tv-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px;font:500 10px var(--mono);color:var(--mute);border-top:1px solid var(--line-2,var(--line))}
.tv-badge{font:700 9.5px var(--mono);padding:3px 7px;border-radius:5px;background:var(--sunken);color:var(--dim)}
.tv-badge.live{background:color-mix(in srgb,var(--up) 14%,transparent);color:var(--up)}

.tv-legs{padding:6px 12px 12px;display:flex;flex-direction:column;gap:8px}
.tv-leg{display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2)}
.tv-leg b{display:block;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv-leg small{display:block;font:500 10px var(--mono);color:var(--mute);margin-top:2px}
.tv-leg .px{font:700 13px var(--mono)}
.tv-leg a{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:8px;color:var(--accent);text-decoration:none;background:var(--panel)}

/* ---- execution ---- */
.tv-exec{padding:0 0 12px}
.tv-rdy{font:700 9.5px var(--mono);padding:3px 8px;border-radius:5px;background:var(--up);color:#fff;letter-spacing:.4px}
.tv-rdy.no{background:var(--down)}
.tv-x{padding:10px 12px 0;display:flex;flex-direction:column;gap:10px}
.tv-xleg{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;font-size:11.5px;min-width:0}
.tv-xleg .t{font:700 9px var(--mono);padding:2px 6px;border-radius:4px;border:1px solid var(--accent);color:var(--accent);flex-shrink:0}
.tv-xleg .t.mk{border-color:#e0901f;color:#c97a10}
.tv-xleg .n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv-xleg .p{font:700 12px var(--mono)}
.tv-side{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:3px;background:var(--sunken);border-radius:10px}
.tv-side button{height:40px;border:0;border-radius:8px;background:transparent;font:700 12.5px var(--sans);color:var(--dim);cursor:pointer;letter-spacing:.3px}
.tv-side button[aria-pressed="true"][data-tv-side="BUY"]{background:var(--up);color:#fff}
.tv-side button[aria-pressed="true"][data-tv-side="SELL"]{background:var(--down);color:#fff}
.tv-ab{display:flex;justify-content:space-between;font:600 10.5px var(--mono);color:var(--mute)}
.tv-ab b{color:var(--down)}.tv-ab b.bid{color:var(--up)}
.tv-fl{display:flex;flex-direction:column;gap:5px}
.tv-fl>label{font:700 9px var(--mono);letter-spacing:.7px;color:var(--mute);text-transform:uppercase}
.tv-step{display:flex;gap:5px;position:relative}
.tv-step input{flex:1;min-width:0;height:40px;border:1px solid var(--line);border-radius:9px;background:var(--sunken);color:var(--fg);padding:0 30px 0 12px;font:700 15px var(--mono);box-sizing:border-box}
.tv-step input:focus{outline:2px solid color-mix(in srgb,var(--accent) 40%,transparent);border-color:var(--accent)}
.tv-step button{width:40px;flex-shrink:0;border:1px solid var(--line);border-radius:9px;background:var(--panel-2);color:var(--fg);font-size:17px;cursor:pointer}
.tv-step .u{position:absolute;right:56px;top:50%;transform:translateY(-50%);font:600 12px var(--mono);color:var(--mute);pointer-events:none}
.tv-step.nobtn .u{right:12px}
.tv-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.tv-chips button{height:30px;border:1px solid var(--line);border-radius:7px;background:var(--panel-2);color:var(--dim);font:600 10.5px var(--mono);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px}
.tv-chips button:hover{border-color:var(--accent);color:var(--accent)}
.tv-sum{border:1px solid var(--line);border-radius:10px;padding:4px 12px;display:flex;flex-direction:column}
.tv-kv{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:5px 0;font-size:11.5px}
.tv-kv>span{color:var(--dim)}
.tv-kv b{font:700 12px var(--mono);text-align:right}
.tv-kv b.mk{color:#c97a10}.tv-kv b.lm{color:var(--accent)}
.tv-bk{margin:2px -8px;padding:10px;border-radius:9px;background:linear-gradient(110deg,color-mix(in srgb,var(--up) 16%,var(--panel)),var(--panel));border:1px solid color-mix(in srgb,var(--up) 35%,var(--line))}
.tv-bk span{color:var(--fg);font-weight:600}
.tv-bk b{font-size:15px;color:var(--up)}
.tv-kv.total{border-top:1px solid var(--line-2,var(--line));margin-top:4px;padding-top:8px}
.tv-kv.total b{font-size:14px}
.tv-prot{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.tv-prot h4{margin:0 0 2px;font:700 9px var(--mono);letter-spacing:.7px;color:var(--mute);text-transform:uppercase}
.tv-chk{display:flex;align-items:flex-start;gap:9px;font-size:11.5px;color:var(--fg);cursor:pointer;line-height:1.4}
.tv-chk input{width:17px;height:17px;margin:0;accent-color:var(--accent);flex-shrink:0}
.tv-chk small{display:block;color:var(--mute);font-size:10.5px}
.tv-chk select{margin-left:4px;height:26px;border:1px solid var(--line);border-radius:6px;background:var(--sunken);color:var(--fg);font:600 11px var(--mono)}
.tv-go{height:50px;border:0;border-radius:11px;font:800 13px var(--sans);letter-spacing:.4px;color:#fff;background:linear-gradient(110deg,#0aa877,#13c08d);cursor:pointer;box-shadow:0 6px 18px #0bbd8b2e;width:100%;padding:0 12px;line-height:1.25}
.tv-go.sell{background:linear-gradient(110deg,#e2445f,#c1338f);box-shadow:0 6px 18px #e2445f2e}
.tv-go.connect{background:linear-gradient(110deg,#3865ff,#7152ee);box-shadow:0 6px 18px #3865ff26}
.tv-go.confirm{animation:tvpulse 1s 2}
@keyframes tvpulse{50%{filter:brightness(1.15)}}
.tv-go:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.tv-why{font-size:11px;color:var(--down);min-height:0;line-height:1.45}
.tv-why:empty{display:none}
.tv-why.ok{color:var(--dim)}
.tv-avail{display:flex;justify-content:space-between;font-size:11px;color:var(--dim)}
.tv-avail b{font-family:var(--mono);color:var(--fg)}
.tv-nopoly{padding:14px 12px;font-size:12px;color:var(--dim);line-height:1.6}

.tv-rail .tv-tabs{display:flex;gap:2px;padding:6px 8px;border-bottom:1px solid var(--line-2,var(--line))}
.tv-rail .tv-tabs button{flex:1;border:0;background:transparent;font:700 11px var(--sans);color:var(--mute);padding:8px 4px;border-radius:7px;cursor:pointer}
.tv-rail .tv-tabs button[aria-selected="true"]{background:var(--accent-bg);color:var(--accent)}
.tv-rail .tv-tabs i{font-style:normal;font:700 9px var(--mono);margin-left:3px}
.tv-rlist{padding:8px;display:flex;flex-direction:column;gap:8px}
.tv-oc{border:1px solid var(--line);border-radius:10px;padding:9px 10px;display:flex;flex-direction:column;gap:6px;background:var(--panel-2);font-size:11px}
.tv-oc.here{border-color:var(--accent)}
.tv-oc .t1{display:flex;justify-content:space-between;gap:8px;font-weight:700;font-size:12px}
.tv-oc .t1 span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv-oc .ln{display:flex;justify-content:space-between;gap:8px;color:var(--dim)}
.tv-oc .ln b{font-family:var(--mono);color:var(--fg)}
.tv-oc .fb{height:5px;border-radius:3px;background:var(--sunken);overflow:hidden}.tv-oc .fb i{display:block;height:100%;background:var(--up)}
.tv-oc .gd{display:flex;gap:5px;flex-wrap:wrap}
.tv-oc .gd span{font:700 9px var(--mono);padding:2px 6px;border-radius:4px;background:var(--accent-bg);color:var(--accent)}
.tv-oc button.cx{height:32px;border:0;border-radius:8px;background:color-mix(in srgb,var(--down) 12%,transparent);color:var(--down);font:700 11.5px var(--sans);cursor:pointer}
.tv-rbar{display:flex;gap:6px;padding:8px 8px 0}
.tv-rbar button{flex:1;height:30px;border:1px solid var(--line);border-radius:7px;background:var(--panel-2);font:600 11px var(--sans);color:var(--dim);cursor:pointer}
.tv-rbar button.d{color:var(--down);border-color:color-mix(in srgb,var(--down) 40%,var(--line))}
.tv-sheetbar{display:none}

/* ---- tablet: list + main, execution under main ---- */
@media (max-width:1200px){
 .tv{grid-template-columns:minmax(240px,280px) minmax(0,1fr)}
 .tv-detail{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;overflow-y:auto;min-height:0;align-content:start}
 .tv-detail>.tv-col{overflow:visible!important;flex-shrink:0;min-height:auto}
 .tv-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
 .tv-stats>div:nth-child(3){border-right:0}
 .tv-stats>div:nth-child(n+4){border-top:1px solid var(--line)}
}
@media (min-width:1201px){.tv-detail{display:contents}}

/* ---- phones and tablet portrait: list page + detail sheet ---- */
@media (max-width:900px){
 .tv{display:block;height:auto!important;min-height:0;padding:10px}
 .tv-list{max-height:none}
 .tv-rows{overflow:visible}
 .tv-detail{display:none}
 body.tv-open{overflow:hidden}
 body.tv-open .tv-detail{display:flex;flex-direction:column;gap:10px;position:fixed;inset:0;z-index:150;overflow-y:auto;overscroll-behavior:contain;background:var(--bg);padding:calc(60px + env(safe-area-inset-top,0px)) 10px calc(20px + env(safe-area-inset-bottom,0px));animation:tvup .22s cubic-bezier(.2,.8,.2,1)}
 @keyframes tvup{from{transform:translateY(24px);opacity:.5}}
 body.tv-open .tv-sheetbar{display:flex;position:fixed;left:0;right:0;top:0;z-index:151;align-items:center;gap:10px;height:calc(52px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 12px 0;background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
 .tv-sheetbar button{height:38px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);color:var(--fg);font:600 13px var(--sans);flex-shrink:0}
 .tv-sheetbar b{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .tv-sheetbar .r{font:700 13px var(--mono);color:var(--up)}
 .tv-sheetbar .pm{color:var(--accent);font-size:12px}
 .tv-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tv-stats>div{border-top:1px solid var(--line)}
 .tv-stats>div:nth-child(odd){border-right:1px solid var(--line)}.tv-stats>div:nth-child(even){border-right:0}
 .tv-stats .tv-big{grid-column:1/-1;border-right:0!important}
 .tv-canvas canvas{height:180px}
 .tv-book td,.tv-book th{padding-left:8px;padding-right:8px}
 .tv-book .c4{display:none}
 .tv-step input{font-size:16px}
 .tv-chips button{height:34px}
}
@media (min-width:601px) and (max-width:900px){
 body.tv-open .tv-detail{left:auto;width:min(560px,82vw);box-shadow:-20px 0 60px #0b163033;border-left:1px solid var(--line)}
 body.tv-open .tv-sheetbar{left:auto;width:min(560px,82vw)}
 body.tv-open .tv-scrim{display:block}
}
.tv-scrim{display:none;position:fixed;inset:0;z-index:149;background:#07101f80}
@media (prefers-reduced-motion:reduce){body.tv-open .tv-detail{animation:none}}

/* Compact desktop Pro: the calculation and primary actions stay in view. */
@media(min-width:901px){
 body.mode-terminal .tv{grid-template-columns:minmax(220px,260px) minmax(0,1fr) minmax(320px,350px);gap:8px;padding:8px 12px}
 body.mode-terminal .tv-col{gap:8px}
 body.mode-terminal .tv-head{padding:9px 11px 0}
 body.mode-terminal .tv-head h1{font-size:19px;margin:4px 0}
 body.mode-terminal .tv-head .acts{gap:4px}
 body.mode-terminal .tv-head .tv-ib{font-size:10px;padding:0 7px;height:28px}
 body.mode-terminal .tv-stats{margin-top:8px}
 body.mode-terminal .tv-stats>div{padding:8px 9px}
 body.mode-terminal .tv-stats label{font-size:8px;letter-spacing:.25px}
 body.mode-terminal .tv-stats b{font-size:14px;white-space:normal;overflow:visible;overflow-wrap:anywhere}
 body.mode-terminal .tv-stats .tv-big b{font-size:20px}
 body.mode-terminal .tv-chart .tv-h{padding:7px 9px;gap:5px}
 body.mode-terminal .tv-seg button{padding:5px 7px;font-size:10px}
 body.mode-terminal .tv-legend{padding:6px 9px 0;gap:5px 9px;font-size:9px}
 body.mode-terminal .tv-canvas canvas{height:130px}
 body.mode-terminal .tv-open-actions{gap:5px;padding:7px}
 body.mode-terminal .tv-open-venue{min-height:32px;padding:6px 9px;font-size:11px;border-radius:7px}
 body.mode-terminal .tv-open-venue img{width:21px;height:21px}
 body.mode-terminal .tv-exec{padding-bottom:5px}
 body.mode-terminal .tv-exec [data-fork-calc]{margin:0!important;padding:7px!important;border:0;border-radius:0;background:transparent}
 body.mode-terminal .tv-exec [data-fork-calc]>.eh{display:none}
 body.mode-terminal .tv-exec .calc-leg{padding:6px;margin:0 0 5px;grid-template-columns:minmax(0,1fr) minmax(100px,42%)}
 body.mode-terminal .tv-exec .calc-venue b{font-size:12px}
 body.mode-terminal .tv-exec .calc-venue small{margin-top:2px;font-size:10px;white-space:normal}
 body.mode-terminal .tv-exec .calc-entry input{padding:6px;font-size:15px}
 body.mode-terminal .tv-exec .poly-cap-row{min-height:22px;padding:2px 0;font-size:10px}
 body.mode-terminal .tv-exec .hedge-loss-toggle{margin:3px 0;font-size:10px}
 body.mode-terminal .tv-exec .calc-totals{margin:4px 0}
 body.mode-terminal .tv-exec .calc-totals>div{padding:4px 0}
 body.mode-terminal .tv-exec .settlement-scenario{margin:5px 0;padding:6px 8px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px}
 body.mode-terminal .tv-exec .settlement-scenario b{font-size:13px;white-space:nowrap}
 body.mode-terminal .tv-exec [data-calc-reset]{padding:5px 8px;font-size:10px;min-height:0}
 body.mode-terminal .tv-exec>.fork-actions{padding:0 7px 4px;margin:0}
 body.mode-terminal .tv-exec>.fork-actions button{padding:7px;font-size:11px;min-height:0}
 body.mode-terminal .tv-order-panel{margin:3px 7px}
 body.mode-terminal .tv-order-panel>summary{padding:8px;font-size:11px}
}

@media(min-width:901px){body.mode-terminal .tv-detail{display:contents}body.mode-terminal .tv-detail>.tv-col{overflow-y:auto!important;min-height:0;align-content:normal}body.mode-terminal .tv-detail>.tv-col>*{flex-shrink:0}}
@media(min-width:901px) and (max-width:1100px){body.mode-terminal .tv{grid-template-columns:205px minmax(0,1fr) 310px}body.mode-terminal .tv-head .t{flex-wrap:wrap}body.mode-terminal .tv-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

@media(max-width:900px){
 body.tv-open .tv-detail{overflow-x:hidden}
 body.tv-open .tv-detail>.tv-col{max-width:100%;width:100%;box-sizing:border-box;overflow-x:clip!important}
 body.tv-open .tv-detail>.tv-col:last-child{order:-1}
 .tv-head>div:first-child{flex-wrap:wrap}
 .tv-head>div:first-child>div:first-child{flex-basis:100%!important}
 .tv-head .acts{width:100%;justify-content:flex-end}
 .tv-head .tv-crumb{flex-wrap:wrap}
 .tv-head .sub{overflow-wrap:anywhere}
 .tv-exec .eqc{margin:7px!important;padding:8px!important}
 .tv-exec .calc-leg{grid-template-columns:minmax(0,1fr) 120px}
 .tv-exec .settlement-scenario{display:flex;justify-content:space-between;gap:8px;font-size:10px;padding:7px}
 .tv-exec .settlement-scenario b{white-space:nowrap}
 .tv-canvas canvas{height:140px}
 .tv-stats b{white-space:normal;overflow-wrap:anywhere}
}

.tv-guards{padding:3px 8px 6px;font-size:10px;color:var(--dim)}.tv-guards>b{display:block;font-size:9px;color:var(--mute);margin-bottom:3px}.tv-guards label{display:flex;align-items:center;gap:5px;min-height:18px}.tv-guards input{accent-color:var(--accent);margin:0;width:12px;height:12px}.tv-guards select{background:var(--panel-2);color:var(--fg);border:1px solid var(--line);border-radius:4px;font-size:10px;padding:0 3px}
@media(min-width:901px){body.mode-terminal .tv-open-actions{grid-template-columns:1fr 1fr}body.mode-terminal .tv-open-venue{font-size:10px;gap:5px}body.mode-terminal .tv-open-venue span{line-height:1.35}body.mode-terminal .tv-open-venue img{width:18px;height:18px}body.mode-terminal .tv-exec .calc-profit{font-size:14px!important}}
#pPushBody[hidden]{display:none!important}

@media(min-width:901px){
 body.mode-terminal .tv-exec [data-fork-calc]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0}
 body.mode-terminal .tv-exec .calc-leg,body.mode-terminal .tv-exec .poly-cap-row,body.mode-terminal .tv-exec [data-calc-result]{grid-column:1/-1}
 body.mode-terminal .tv-exec .hedge-loss-toggle{grid-column:1;grid-row:4;font-size:9px}
 body.mode-terminal .tv-exec [data-calc-reset]{grid-column:2;grid-row:4;font-size:8px;padding:3px 5px;height:24px;align-self:center}
 body.mode-terminal .tv-exec .calc-totals{margin:0}
 body.mode-terminal .tv-exec .calc-totals>div{padding:3px 0}
 body.mode-terminal .tv-guards{padding:0 8px 3px}.tv-guards>b{margin-bottom:0}
 body.mode-terminal .tv-order-panel{margin:2px 7px}
 body.mode-terminal .tv-order-panel>summary{padding:6px 7px;font-size:10px}
}

@media(max-width:700px){.tv-guards label{min-height:30px;font-size:11px}.tv-guards input{width:16px;height:16px}.calc-entry input,.mdl .pinput{font-size:16px!important}}

.tv-stats:has(>div:nth-child(7)){grid-template-columns:repeat(4,minmax(0,1fr))}

@media(min-width:901px){body.mode-terminal .tv-exec:has(.poly-cap-row+.poly-cap-row) .hedge-loss-toggle,body.mode-terminal .tv-exec:has(.poly-cap-row+.poly-cap-row) [data-calc-reset]{grid-row:5}body.mode-terminal .tv-exec:has(.poly-cap-row+.poly-cap-row) .calc-leg{padding:4px}}
