:root {
  --bg: #06070b;
  --surface: #0b0d13;
  --surface-2: #11141c;
  --surface-3: #181c26;
  --surface-4: #20252f;
  --line: #171b24;
  --line-2: #242a36;
  --text: #e1e5ec;
  --muted: #8b92a1;
  --faint: #59606f;
  --buy: var(--acc);
  --sell: #e879f9;
  --up: #2bd49a;
  --down: #9b6bff;
  --gold: #facc15;
  --rose: #fb7185;
  --accent: var(--acc);
  --radius: 8px;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .03) inset;
  /* del tema (web/temas.js): acentos, fondo de lo que flota y barra de arriba */
  --acc: #22d3ee; --acc-rgb: 34, 211, 238; --acc2: #818cf8; --acc2-rgb: 129, 140, 248; --float-rgb: 9, 11, 16;
  --top-bg: linear-gradient(180deg, #0d1017 0%, #0a0c11 100%);
  /* colores por función (web/temas.js los cambia con cada tema). Ningún CSS usa un color fijo:
     --hi = lo más brillante (blanco en oscuros, oscuro en claros), --hi-rgb para transparencias: rgba(var(--hi-rgb), .08);
     --ink = letra sobre un relleno de color; --on-acc = letra sobre var(--acc); --soft / --neutral / --neutral-2 = grises;
     --warn, --info, --bull, --bear, --open; --h-<tono> = paleta del tema (con transparencia: color-mix(in srgb, var(--h-red) 30%, transparent)) */
  --hi: #ffffff; --hi-rgb: 255, 255, 255; --ink: #05060a; --on-acc: #05060a; --soft: #e2e8f0; --neutral: #94a3b8; --neutral-2: #64748b; --neutral-3: #475569;
  --warn: #fbbf24; --info: #38bdf8; --bull: #2bd49a; --bear: #f43f5e; --open: #ff2e2e; --shadow-rgb: 0, 0, 0; --text-rgb: 225, 229, 236; --bg-rgb: 6, 7, 11;
  --h-red: #f43f5e; --h-rose: #fb7185; --h-pink: #f472b6; --h-fuchsia: #e879f9; --h-purple: #c084fc; --h-violet: #a78bfa; --h-indigo: #818cf8; --h-blue: #60a5fa;
  --h-sky: #38bdf8; --h-cyan: #22d3ee; --h-teal: #2dd4bf; --h-emerald: #34d399; --h-green: #4ade80; --h-lime: #a3e635; --h-yellow: #facc15; --h-amber: #fbbf24; --h-orange: #fb923c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 var(--sans); overflow: hidden;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1; }
/* celular: las franjas de arriba y abajo (barra de estado, home y la barra de Safari) toman el color del fondo del gráfico
   (--safe-bg, web/temas.js) y la interfaz no queda debajo de ellas (viewport-fit=cover en index.html) */
html, body { background-color: var(--safe-bg, var(--bg)); }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button { font: inherit; color: var(--text); cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid rgba(var(--acc-rgb), .5); outline-offset: 1px; }
input { font: inherit; }

/* ---------------- barra superior ---------------- */
#top { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 12px; white-space: nowrap;
  background: var(--top-bg); border-bottom: 1px solid var(--line); position: relative; }
#top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--acc-rgb), .25) 30%, color-mix(in srgb, var(--sell) 25%, transparent) 70%, transparent); }
.logo { display: grid; place-items: center; width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(var(--acc-rgb), .25)); }
.vsep { width: 1px; height: 24px; background: var(--line-2); margin: 0 2px; }
.brand { display: flex; align-items: center; gap: 8px; }
.sym { font-weight: 700; letter-spacing: .01em; font-size: 14px; }
.tag { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-3);
  border: 1px solid var(--line-2); padding: 2px 6px; border-radius: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 15%, transparent); }
.dot.ok { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 15%, transparent), 0 0 10px color-mix(in srgb, var(--up) 60%, transparent); }
.price-box { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.px { font: 600 19px var(--mono); letter-spacing: -.02em; transition: color .25s; }
.px.buy { color: var(--buy); text-shadow: 0 0 18px rgba(var(--acc-rgb), .35); }
.px.sell { color: var(--sell); text-shadow: 0 0 18px color-mix(in srgb, var(--sell) 35%, transparent); }
.chg { font: 600 11px var(--mono); color: var(--muted); padding: 3px 7px; border-radius: 6px; background: var(--surface-3); }
.chg:empty { display: none; }
.chg.up { color: var(--up); background: color-mix(in srgb, var(--up) 10%, transparent); }
.chg.dn { color: var(--sell); background: color-mix(in srgb, var(--sell) 10%, transparent); }
.spacer { flex: 1; }

.ctl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: -9px; }
.cap { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); white-space: nowrap; }
.ctl .cap { padding-left: 4px; line-height: 11px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 1px; }
.seg button { background: transparent; border: 0; padding: 3px 9px; white-space: nowrap; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 12px;
  transition: color .12s, background .12s; }
.seg button:hover { color: var(--text); background: rgba(var(--hi-rgb), .03); }
.seg button.on { background: var(--surface-4); color: var(--hi); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .4), 0 1px 0 rgba(var(--hi-rgb), .06) inset; }
.presets button.on { background: linear-gradient(180deg, rgba(var(--acc-rgb), .22), rgba(var(--acc-rgb), .12)); color: color-mix(in srgb, var(--acc) 22%, var(--hi));
  box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35) inset; }

.btn-group { display: inline-flex; gap: 4px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 12px; font-weight: 500;
  transition: color .12s, border-color .12s, background .12s; }
.icon-btn.sq { width: 30px; padding: 0; justify-content: center; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-3); }
.icon-btn.on { color: var(--buy); border-color: rgba(var(--acc-rgb), .35); background: rgba(var(--acc-rgb), .08); }
.live { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: .1em; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live.on { color: var(--hi); border-color: color-mix(in srgb, var(--rose) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 16%, transparent), color-mix(in srgb, var(--rose) 7%, transparent)); }
.live.on i { background: var(--rose); box-shadow: 0 0 8px var(--rose); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------- cuerpo ---------------- */
#body { display: flex; height: calc(100% - 52px); }
#stage { flex: 1; min-width: 0; display: flex; flex-direction: column; container-type: inline-size; }

#layers, #side { background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
#layers { width: 296px; border-right: 1px solid var(--line); }
#side { width: 318px; border-left: 1px solid var(--line); }
#layers.hide, #side.hide { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 10px 0 16px; flex: none;
  border-bottom: 1px solid var(--line); font-weight: 600; font-size: 12.5px; }
.drawer-head em { font-style: normal; color: var(--faint); font-weight: 500; margin-left: 6px; font-size: 11px; }
.x { background: none; border: 0; color: var(--faint); font-size: 12px; width: 26px; height: 26px; border-radius: 6px; }
.x:hover { color: var(--text); background: var(--surface-3); }

/* capas */
#layerList { overflow-y: auto; padding: 4px 8px 18px; }
.lgroup { padding: 14px 8px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; color: var(--faint); font-weight: 700; }
.layer { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; align-items: center; padding: 8px 10px; cursor: pointer;
  border-radius: 8px; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.layer:hover { background: var(--surface-2); }
.layer.on { background: rgba(var(--hi-rgb), .025); border-color: var(--line); }
.layer .nm { font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.layer .sw-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; box-shadow: 0 0 8px currentColor; }
.layer.off .sw-dot { opacity: .45; box-shadow: none; }
.layer .ds { grid-column: 1 / 2; font-size: 11px; color: var(--faint); padding-left: 18px; }
.layer.off .nm { color: var(--muted); }
.switch { width: 30px; height: 17px; border-radius: 9px; background: var(--surface-3); position: relative; grid-row: 1 / 3; grid-column: 2;
  transition: background .15s, border-color .15s; border: 1px solid var(--line-2); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted);
  transition: transform .15s, background .15s; }
.layer.on .switch { background: rgba(var(--acc-rgb), .25); border-color: rgba(var(--acc-rgb), .5); }
.layer.on .switch::after { transform: translateX(13px); background: var(--buy); box-shadow: 0 0 6px rgba(var(--acc-rgb), .8); }
.opts { margin: -2px 0 6px; padding: 6px 10px 8px 28px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.opts .chips button { font-size: 11px; padding: 2px 8px; }
.opts input { width: 54px; }

/* controles de Deep Trades (en la barra de arriba) */
.lbl-dot { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, var(--buy), var(--sell)); }
.chips { display: inline-flex; gap: 3px; }
.chips button { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; color: var(--muted);
  font-size: 11.5px; font-weight: 500; font-family: var(--mono); transition: all .12s; }
.chips button:hover { color: var(--text); border-color: color-mix(in srgb, var(--line-2) 70%, var(--neutral-3)); }
.chips button.on { background: rgba(var(--acc-rgb), .14); border-color: rgba(var(--acc-rgb), .55); color: var(--hi); box-shadow: 0 0 12px rgba(var(--acc-rgb), .12); }
#sizes button[data-min="0"] { font-family: var(--sans); }
.kinds button { width: 28px; height: 24px; padding: 0; border-radius: 7px; font-size: 12px; font-family: var(--sans); }
.kinds button.on { background: var(--surface-3); border-color: color-mix(in srgb, var(--line-2) 55%, var(--neutral-3)); color: var(--hi); box-shadow: none; }
.num { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 11px; }
input[type=number] { width: 58px; height: 24px; background: var(--surface-2); color: var(--hi); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 2px 7px; font-family: var(--mono); font-size: 12px; outline: none; }
input[type=number]:focus { border-color: rgba(var(--acc-rgb), .55); }
.sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 2px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 24px; background: transparent; border: 1px solid var(--line-2);
  border-radius: 7px; padding: 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.chip-btn .ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.chip-btn:hover { color: var(--text); }
.chip-btn.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.key { display: inline-flex; gap: 12px; margin-left: 10px; font-size: 11px; color: var(--faint); }
.key span { display: inline-flex; align-items: center; gap: 5px; }
.key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.key i.o { background: none; border: 2px solid; width: 9px; height: 9px; }
.count { margin-left: auto; font: 500 11px var(--mono); color: var(--muted); user-select: none; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); }
.count:empty { display: none; }

/* gráfico */
#wrap { position: relative; flex: 1; min-height: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* celular: el dedo arrastra el gráfico (web/app.js «touch»), no selecciona texto ni pinta todo de azul */
#wrap { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#wrap .grip { touch-action: none; }
@media (pointer: coarse) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
  input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; }
}
#pulse { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--buy));
  pointer-events: none; display: none; box-shadow: 0 0 10px var(--c, var(--buy)); }
#pulse::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--c, var(--buy));
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
#legend { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 440px); font: 11px/1.6 var(--mono); color: var(--text);
  background: rgba(var(--float-rgb), .72); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(var(--hi-rgb), .06); border-radius: 10px; padding: 6px 11px 7px; pointer-events: none; box-shadow: var(--shadow); }
#legend .l1 { display: flex; align-items: baseline; white-space: nowrap; overflow: hidden; }
#legend .l1 .l1t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* si no entra, se corta esto; «+ más» queda siempre */
#legend .l1 .more { flex: none; }
@media (max-width: 700px) { #legend { max-width: calc(100% - 80px); } #legend .more { padding: 6px 4px; } }
#legend .l1 .tm { font: 600 12px var(--sans); color: var(--hi); margin-right: 4px; }
#legend .l1 .tf { font: 600 9.5px var(--sans); color: var(--muted); background: var(--surface-3); border-radius: 4px; padding: 1px 5px; margin-right: 8px; }
#legend .l1 .op { font: 600 9.5px var(--sans); color: color-mix(in srgb, var(--bear) 50%, var(--hi)); background: color-mix(in srgb, var(--bear) 16%, transparent); border-radius: 4px; padding: 1px 5px; margin-right: 8px; }   /* vela de apertura de sesión */
#legend .l2 { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); margin-top: 5px; }
#legend .l2 > span { background: rgba(var(--hi-rgb), .035); border: 1px solid rgba(var(--hi-rgb), .04); border-radius: 6px; padding: 0 7px; }
#legend b { font-weight: 600; color: var(--hi); }
#legend .k { color: var(--faint); }
#legend .u { color: var(--up); } #legend .d { color: var(--sell); }
#legend .more { pointer-events: auto; cursor: pointer; color: var(--buy); margin-left: 10px; font-family: var(--sans); font-weight: 600; font-size: 10.5px; }
#legend .l3 { color: var(--muted); margin-top: 6px; border-top: 1px solid rgba(var(--hi-rgb), .06); padding-top: 5px; white-space: pre-wrap; }

#tip { position: absolute; display: none; pointer-events: none; z-index: 5; min-width: 250px; max-width: 350px;
  background: rgba(var(--float-rgb), .96); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(var(--shadow-rgb), .6); font-size: 12px; }
#tip .hd { padding: 9px 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
  background: rgba(var(--hi-rgb), .02); }
#tip .hd i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; box-shadow: 0 0 8px currentColor; }
#tip .bd { padding: 9px 12px 10px; }
#tip .qty { font: 600 13px var(--mono); color: var(--hi); margin-bottom: 6px; }
#tip .row { color: var(--muted); line-height: 1.55; }
#tip .res { margin-top: 8px; font-weight: 600; display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(var(--hi-rgb), .05); }

/* lista */
#feedSum:not(:empty) { margin: 10px 12px 4px; padding: 10px 12px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.fs-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 7px; }
.fs-row { display: flex; justify-content: space-between; font: 600 11px var(--mono); }
.fs-row .b { color: var(--buy); } .fs-row .s { color: var(--sell); }
.fs-bar { height: 5px; border-radius: 3px; background: var(--sell); margin: 6px 0 9px; overflow: hidden; box-shadow: 0 0 10px color-mix(in srgb, var(--sell) 20%, transparent); }
.fs-bar i { display: block; height: 100%; background: var(--buy); border-right: 2px solid var(--surface-2); }
.fs-res { display: flex; gap: 5px; flex-wrap: wrap; }
.fs-res .badge { cursor: pointer; font: inherit; font-size: 10.5px; transition: transform .15s, box-shadow .15s, opacity .15s; }
.fs-res .badge:hover { transform: translateY(-1px); }
.fs-res .badge.on { box-shadow: 0 0 0 1.5px currentColor; }
.fs-res:has(.on) .badge:not(.on) { opacity: .5; }
/* los más grandes de hoy */
.ft-h { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.ft-h.off { margin-bottom: 0; }
.ft-h button { border: 1px solid var(--line); background: none; color: var(--muted); width: 20px; height: 18px; border-radius: 6px; cursor: pointer; font: 700 12px/1 var(--mono); }
.ft-h button:hover { color: var(--hi); border-color: var(--muted); }
.ft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ft { position: relative; display: grid; grid-template-columns: 14px 1fr auto; grid-template-rows: auto auto; gap: 1px 6px; align-items: center; text-align: left;
  padding: 7px 8px 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: color-mix(in srgb, currentColor 5%, transparent); cursor: pointer; overflow: hidden;
  font: inherit; transition: transform .18s cubic-bezier(.2, 1.4, .4, 1), background .15s, border-color .15s; }
.ft::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; }
.ft.buy { color: var(--buy); } .ft.sell { color: var(--sell); }
.ft:hover { transform: translateY(-2px); background: color-mix(in srgb, currentColor 11%, transparent); border-color: color-mix(in srgb, currentColor 40%, transparent); }
.ft.spot { border-color: currentColor; box-shadow: 0 0 14px color-mix(in srgb, currentColor 30%, transparent); }
.ft .g { font-size: 11px; text-align: center; }
.ft b { font: 800 14px var(--mono); white-space: nowrap; }
.ft b small { font-size: 9px; font-weight: 700; opacity: .8; }
.ft em { font: 500 9.5px var(--mono); font-style: normal; color: var(--faint); justify-self: end; }
.ft .ft-d { grid-column: 1 / 3; font: 500 10px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft .badge { justify-self: end; font-size: 9px; padding: 1px 6px; font-style: normal; }
/* ordenar y filtrar */
.fs-sort { display: flex; flex-direction: column; gap: 5px; margin: 4px 12px 2px; flex: none; }
.fs-sort > span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
#feedSum:not(:empty) .fs-sort { margin: 10px 0 0; }
.fs-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: color-mix(in srgb, var(--hi) 4%, transparent); border: 1px solid var(--line); }
.fs-seg button { flex: 1 1 auto; border: 0; background: none; color: var(--muted); font: 600 11px var(--sans); padding: 6px 6px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.fs-seg button:hover { color: var(--hi); }
.fs-seg button.on { background: color-mix(in srgb, var(--hi) 10%, transparent); color: var(--hi); }
.fs-seg button.buy.on { color: var(--buy); background: color-mix(in srgb, var(--buy) 16%, transparent); }
.fs-seg button.sell.on { color: var(--sell); background: color-mix(in srgb, var(--sell) 16%, transparent); }
.fs-on { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.fs-on .badge { font-size: 10px; }
.fs-on button { margin-left: auto; border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 6px; padding: 1px 7px; cursor: pointer; font-size: 10px; }
.fs-on button:hover { color: var(--hi); }
.ev .t small { display: block; font-size: 8.5px; color: var(--faint); line-height: 1; }
#feed .empty button { margin-left: 6px; border: 1px solid var(--line); background: none; color: var(--acc); border-radius: 6px; padding: 2px 8px; cursor: pointer; font: inherit; }
#feed { overflow-y: auto; flex: 1; padding: 4px 0; }
.ev { position: relative; display: grid; grid-template-columns: 18px 58px 1fr auto; gap: 8px; padding: 7px 14px; cursor: pointer;
  font: 11px var(--mono); align-items: center; white-space: nowrap; }
.ev::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: var(--w, 0%); border-radius: 0 6px 6px 0; opacity: .1; }
.ev.buy::before { background: linear-gradient(90deg, transparent, var(--buy)); }
.ev.sell::before { background: linear-gradient(90deg, transparent, var(--sell)); }
.ev:hover { background: var(--surface-2); }
.ev > * { position: relative; }
.ev .g { font-size: 13px; text-align: center; }
.ev.buy .g, .ev.buy .sz { color: var(--buy); }
.ev.sell .g, .ev.sell .sz { color: var(--sell); }
.ev .sz { font-weight: 700; }
.ev .at { color: var(--muted); }
.ev .t { color: var(--faint); }
.badge { font: 600 10px var(--sans); padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--faint); }
.badge.absorbed { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent) inset; }
.badge.reversal { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 30%, transparent) inset; }
.badge.continuation { color: var(--soft); background: rgba(var(--hi-rgb), .06); }
.empty { padding: 24px 16px; color: var(--muted); text-align: center; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface-4); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1000px) { #side { display: none; } }

/* bots en papel (opciones de la capa) */
.bot-opts .chips { display: block; line-height: 2; }
.bot-st { font: 500 11px var(--mono, 'JetBrains Mono', monospace); color: var(--muted); margin-left: 6px; }
.bot-since { display: block; width: 100%; font-size: 10.5px; color: var(--faint); margin-top: 2px; }

/* herramientas de dibujo */
#drawbar { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 2px;
  padding: 4px; background: rgba(var(--float-rgb), .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--hi-rgb), .07); border-radius: 11px; box-shadow: var(--shadow); }
#drawbar button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; transition: background .12s, color .12s; }
#drawbar button:hover { background: var(--surface-3); color: var(--text); }
#drawbar button.on { background: rgba(var(--acc-rgb), .14); color: var(--buy); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .35); }
#drawbar .dsep { display: block; height: 1px; margin: 3px 5px; background: var(--line-2); }
#drawColor .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dc, var(--info)); box-shadow: 0 0 0 2px rgba(var(--hi-rgb), .14); }
#drawColors { position: absolute; left: 44px; display: none; gap: 7px; padding: 7px 9px; background: rgba(var(--float-rgb), .92);
  border: 1px solid rgba(var(--hi-rgb), .08); border-radius: 10px; box-shadow: var(--shadow); }
#drawColors.open { display: flex; }
#drawColors button { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(var(--hi-rgb), .1); }
#drawColors button:hover { transform: scale(1.15); background: inherit; }

/* vistas: un poco más compactas para que entre "Impulso" */
.presets button { padding-left: 8px; padding-right: 8px; }

/* selector de día */
.day-sel { position: relative; display: inline-flex; align-items: center; gap: 2px; flex: none; }
.day-sel button { height: 26px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); border-radius: 7px;
  cursor: pointer; font: 600 12px var(--sans); padding: 0 8px; white-space: nowrap; }
.day-sel button:hover { background: var(--surface-3); }
#dayPrev, #dayNext { width: 24px; padding: 0; font-size: 15px; line-height: 1; color: var(--muted); }
#dayNext:disabled, #dayPrev:disabled { opacity: .35; cursor: default; }
#dayLbl { display: inline-flex; align-items: center; gap: 6px; min-width: 128px; justify-content: center; }
#dayLbl svg { color: var(--muted); }
#dayLbl .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
#dayLbl.live .live-dot { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent); }
#dayLbl.past { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.day-sel .today { display: none; margin-left: 4px; color: var(--buy); border-color: rgba(var(--acc-rgb), .35); }
.day-sel.past .today { display: inline-block; }

/* ---------------- efectos ---------------- */
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-wrap { position: relative; display: inline-flex; }
#fxBtn.on { color: color-mix(in srgb, var(--sell) 30%, var(--hi)); border-color: color-mix(in srgb, var(--sell) 40%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sell) 16%, transparent), rgba(var(--acc-rgb), .08)); box-shadow: 0 0 14px color-mix(in srgb, var(--sell) 22%, transparent); }
#fxBtn.half { color: color-mix(in srgb, var(--acc) 50%, var(--hi)); border-color: rgba(var(--acc-rgb), .25); }
#fxMenu { position: absolute; top: 38px; right: 0; width: 280px; z-index: 60; padding: 6px; border-radius: 12px; white-space: normal;
  background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: menuIn .22s cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: top right; }
#fxMenu.hide { display: none; }
#fxMenu .fx-h { font: 600 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 6px 9px 4px; }
#fxMenu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 7px 40px 7px 9px;
  border: 0; background: none; border-radius: 8px; text-align: left; position: relative; }
#fxMenu button:hover { background: var(--surface-3); }
#fxMenu button b { font-weight: 600; font-size: 12.5px; color: var(--text); }
#fxMenu button span { font-size: 11px; color: var(--muted); }
#fxMenu button[data-fx].on b, #fxMenu button[data-q].on b { color: var(--buy); }
#fxMenu button[data-fx].on::after, #fxMenu button[data-q].on::after { content: "✓"; position: absolute; right: 12px; top: 9px; color: var(--buy); font-weight: 700; }
#fxMenu .fx-sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
#fxMenu .sw { position: absolute; right: 10px; top: 12px; width: 26px; height: 15px; border-radius: 8px; background: var(--surface-4); }
#fxMenu .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--faint); transition: transform .2s, background .2s; }
#fxMenu button.on .sw { background: rgba(var(--acc-rgb), .3); }
#fxMenu button.on .sw::after { transform: translateX(11px); background: var(--buy); box-shadow: 0 0 8px var(--buy); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }

/* avisos (abajo a la izquierda del gráfico, donde está lo viejo) */
#toasts { position: absolute; left: 56px; bottom: 140px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 6; }
.toast { pointer-events: auto; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; min-width: 250px; max-width: 360px;
  padding: 9px 13px 11px 11px; border-radius: 12px; position: relative; overflow: hidden;
  background: rgba(var(--float-rgb), .88); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 12px 30px rgba(var(--shadow-rgb), .5), 0 0 26px color-mix(in srgb, var(--c) 20%, transparent);
  animation: toastIn .6s cubic-bezier(.2, 1.35, .35, 1) both; }
.toast.out { animation: toastOut .35s ease-in both; }
/* ✕ de los avisos flotantes (gráfico, alertas, narrador de la IA): con el dedo no hay «sacar el mouse» para cerrarlos */
.tx-x { flex: none; align-self: flex-start; margin: -3px -6px 0 auto; width: 26px; height: 26px; border-radius: 8px; border: 0; padding: 0;
  background: none; color: var(--faint); font-size: 13px; line-height: 26px; text-align: center; cursor: pointer; }
.tx-x:hover { color: var(--hi); background: rgba(var(--hi-rgb), .08); }
@media (pointer: coarse) { .tx-x { width: 34px; height: 34px; line-height: 34px; font-size: 15px; } }
.toast > b { color: var(--c); font-size: 14px; line-height: 1.25; text-shadow: 0 0 10px var(--c); }
.toast .tt { font: 600 12.5px var(--sans); color: var(--hi); }
.toast .ts { font: 500 11px var(--mono); color: var(--muted); margin-top: 2px; }
.toast .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c); opacity: .75;
  transform-origin: left; animation: toastBar var(--life, 9s) linear both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-28px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-18px) scale(.95); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* precio tipo contador: cada dígito rueda */
.px.odo { display: inline-flex; line-height: 1.2em; }
.px .od { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: top; }
.px .os { display: block; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.px .os i, .px .oc { display: block; height: 1.2em; line-height: 1.2em; font-style: normal; }
.px .oc { display: inline-block; }
.px.fu { animation: pxUp .7s ease-out; }
.px.fd { animation: pxDn .7s ease-out; }
@keyframes pxUp { 0% { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--up) 95%, transparent)) brightness(1.5); } 100% { filter: none; } }
@keyframes pxDn { 0% { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rose) 95%, transparent)) brightness(1.5); } 100% { filter: none; } }

/* intro al abrir */
.intro #top > * { animation: introDown .7s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 40ms); }
.intro #cv, .intro #fx { clip-path: inset(0 100% 0 0); }
.intro #cv.go, .intro #fx.go { animation: reveal 1.15s cubic-bezier(.33, 1, .68, 1) both; }
.intro #pulse, .intro #legend, .intro #drawbar { opacity: 0; }
.intro-soft #cv, .intro-soft #fx { opacity: 0; }
.intro-soft #cv.go, .intro-soft #fx.go { animation: introFade .45s both; }
@keyframes introDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes introFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#legend, #drawbar { transition: opacity .5s; }

/* botones con profundidad (efectos sutil / completo): la barra hundida, el botón elegido en relieve y con luz */
.fx-on .seg { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--bg)), color-mix(in srgb, var(--surface-2) 85%, var(--bg))); box-shadow: inset 0 1px 3px rgba(var(--shadow-rgb), .55), 0 1px 0 rgba(var(--hi-rgb), .035); }
.fx-on .seg button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-4) 70%, var(--neutral-3)), color-mix(in srgb, var(--surface-3) 85%, var(--surface-4)));
  box-shadow: 0 1px 0 rgba(var(--hi-rgb), .1) inset, 0 -1px 0 rgba(var(--shadow-rgb), .35) inset, 0 2px 6px rgba(var(--shadow-rgb), .5); }
.fx-on .presets button.on { background: linear-gradient(180deg, rgba(var(--acc-rgb), .3), rgba(var(--acc-rgb), .1));
  box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .45) inset, 0 1px 0 rgba(var(--hi-rgb), .14) inset, 0 0 16px rgba(var(--acc-rgb), .28); }
.fx-on .icon-btn, .fx-on .live, .fx-on .day-sel button { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 90%, var(--bg)), color-mix(in srgb, var(--surface) 90%, var(--surface-2)));
  box-shadow: 0 1px 0 rgba(var(--hi-rgb), .055) inset, 0 2px 6px rgba(var(--shadow-rgb), .4); }
.fx-on .icon-btn:hover, .fx-on .day-sel button:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-4) 85%, var(--surface-3)), color-mix(in srgb, var(--surface-2) 60%, var(--surface-3))); }
.fx-on .icon-btn.on { background: linear-gradient(180deg, rgba(var(--acc-rgb), .17), rgba(var(--acc-rgb), .05));
  box-shadow: 0 1px 0 rgba(var(--hi-rgb), .08) inset, 0 0 14px rgba(var(--acc-rgb), .22); }
.fx-on .live.on { background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 20%, transparent), color-mix(in srgb, var(--rose) 6%, transparent));
  box-shadow: 0 1px 0 rgba(var(--hi-rgb), .08) inset, 0 0 16px color-mix(in srgb, var(--rose) 30%, transparent); }
.fx-on .chips button { background: linear-gradient(180deg, rgba(var(--hi-rgb), .035), rgba(var(--hi-rgb), 0)); }
.fx-on .chips button.on { background: linear-gradient(180deg, rgba(var(--acc-rgb), .26), rgba(var(--acc-rgb), .1));
  box-shadow: 0 1px 0 rgba(var(--hi-rgb), .12) inset, 0 0 14px rgba(var(--acc-rgb), .25); }
.fx-on .chip-btn.on { box-shadow: 0 1px 0 rgba(var(--hi-rgb), .08) inset, 0 0 12px color-mix(in srgb, var(--gold) 20%, transparent); }
.fx-on #drawbar button.on { box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .4), 0 0 12px rgba(var(--acc-rgb), .25); }
/* al apretar se hunde y vuelve con rebote */
.fx-on #top button, .fx-on #drawbar button {
  transition: transform .26s cubic-bezier(.3, 1.8, .5, 1), color .12s, background .12s, border-color .12s, box-shadow .2s; }
.fx-on #top button:active, .fx-on #drawbar button:active { transform: scale(.9); transition-duration: .05s; }
.fx-on #fxMenu button:active { transform: none; }

/* agarre (puntitos) para mover la leyenda y la barra de dibujo */
.grip { display: block; pointer-events: auto; cursor: grab; border-radius: 4px; opacity: .5; transition: opacity .15s, background-color .15s;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--soft) 95%, transparent) .9px, transparent 1.3px); background-size: 4px 4px; background-position: center; }
.grip:hover { opacity: 1; background-color: rgba(var(--hi-rgb), .07); }
.grip:active, .dragging .grip { cursor: grabbing; opacity: 1; }
#legend { padding-left: 19px; max-width: calc(100% - 432px); }   /* el agarre ocupa 8 px: se los devolvemos */
#legend .grip { position: absolute; left: 4px; top: 6px; bottom: 6px; width: 9px; }
#drawbar .grip { width: 20px; height: 10px; margin: 1px auto 3px; }
#legend.dragging, #drawbar.dragging { box-shadow: 0 18px 40px rgba(var(--shadow-rgb), .6), 0 0 0 1px rgba(var(--acc-rgb), .4), 0 0 18px rgba(var(--acc-rgb), .18); }
#drawbar.flip #drawColors { left: auto; right: 44px; }

/* ---------------- una sola barra arriba (antes eran dos) ---------------- */
#top { height: 46px; gap: 6px; padding: 0 10px; }
#body { height: calc(100% - 46px); }
.ctl { margin-top: 0; }
.seg button { padding: 3px 7px; }
.chips button { padding: 3px 7px; }
#dayLbl { min-width: 0; }
.live { padding: 0 10px; }
#top .num input { width: 52px; }
.caret { font-style: normal; font-size: 10px; color: var(--faint); margin-left: 2px; }
.dt-ctl { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.dt-btn { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 2px; background: none; border: 1px solid transparent;
  border-radius: 8px; color: var(--hi); font-weight: 600; font-size: 12.5px; cursor: default; }
.dt-btn .dt-sum, .dt-btn .caret { display: none; }
.dt-pop, .dt-main, .dt-more { display: inline-flex; align-items: center; gap: 6px; }
.dt-more .key { display: none; }
.dt-more-btn { display: none; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2);
  background: transparent; color: var(--muted); font-size: 11.5px; }
.dt-more-btn:hover { color: var(--text); }
.presets-ctl { position: relative; flex: none; }
#presetBtn { display: none; gap: 6px; }
#presetBtn b { color: color-mix(in srgb, var(--acc) 22%, var(--hi)); font-weight: 600; }
.pop-box { position: absolute; top: calc(100% + 8px); z-index: 60; background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: var(--shadow); white-space: normal; animation: menuIn .2s cubic-bezier(.2, 1.2, .4, 1) both; }

/* si no entra, la barra se compacta sola por niveles (app.js: fitTopbar) */
/* 1: sin logo ni textos secundarios */
.tb1 .logo, .tb1 #layersBtn span, .tb1 #mkt, .tb1 .dt-name, .tb1 #outBtn span { display: none; }
.tb1 #outBtn { padding: 0 7px; }
/* 2: las vistas pasan a un menú */
.tb2 #presetBtn { display: inline-flex; }
.tb2 #presets { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; flex-direction: column; align-items: stretch;
  gap: 2px; padding: 5px; min-width: 150px; background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2); border-radius: 11px;
  box-shadow: var(--shadow); animation: menuIn .2s cubic-bezier(.2, 1.2, .4, 1) both; }
.tb2 .presets-ctl.open #presets { display: flex; }
.tb2 #presets button { text-align: left; padding: 6px 10px; }
/* 3: tipo y resultado de Deep Trades a un menú chico; el tamaño sigue a la vista */
.tb3 .dt-more-btn { display: inline-flex; }
.tb3 .dt-more { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; flex-wrap: wrap; width: 250px; gap: 8px;
  padding: 10px; background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  white-space: normal; animation: menuIn .2s cubic-bezier(.2, 1.2, .4, 1) both; }
.tb3 .dt-ctl.more .dt-more { display: flex; }
.tb3 .dt-more .key { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 0; }
.tb3 #outBtn span { display: inline; }
.tb3 #dayLbl svg, .tb3 #chg .hoy { display: none; }   /* la fecha sigue siendo clickeable para elegir día */
/* 4: todo Deep Trades a un menú (el botón dice el tamaño elegido) */
.tb4 .dt-more-btn { display: none; }
.tb4 .dt-btn { cursor: pointer; border-color: var(--line-2); background: var(--surface-2); padding: 0 9px; }
.tb4 .dt-btn .dt-sum, .tb4 .dt-btn .caret { display: inline; }
.tb4 .dt-sum { font: 600 11.5px var(--mono); color: var(--buy); }
.tb4 .dt-pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; flex-direction: column; align-items: flex-start;
  width: 320px; gap: 8px; padding: 10px; background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow); white-space: normal; animation: menuIn .2s cubic-bezier(.2, 1.2, .4, 1) both; }
.tb4 .dt-ctl.open .dt-pop { display: flex; }
.tb4 .dt-more { display: flex; position: static; width: auto; padding: 0; border: 0; background: none; box-shadow: none; animation: none; flex-wrap: wrap; }
/* 5: el día sin flechas · 6: sin Ventana · 7: sin el % del día */
.tb5 #dayPrev, .tb5 #dayNext { display: none; }
.tb5 #dayLbl { min-width: 0; }
.tb6 #spansCtl { display: none; }
.tb7 .price-box .chg { display: none; }
.tb7 .price-box { min-width: 0; }

/* lupa · visión X: la mira del ícono gira mientras está activa (al final: le gana a .fx-on #drawbar button.on) */
#drawbar button[data-tool="lupa"] .lp-rt { transform-box: view-box; transform-origin: 8.5px 8.5px; }
#drawbar button[data-tool="lupa"].on { background: color-mix(in srgb, var(--h-purple) 15%, transparent); color: color-mix(in srgb, var(--h-purple) 55%, var(--hi)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--h-purple) 50%, transparent), 0 0 14px color-mix(in srgb, var(--h-purple) 30%, transparent); }
#drawbar button[data-tool="lupa"].on .lp-rt { animation: lp-spin 2.4s linear infinite; }
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #drawbar button[data-tool="lupa"].on .lp-rt { animation: none; } }
.lupa-open #legend, .lupa-open #taLeg { opacity: .06; pointer-events: none; transition-duration: .2s; }
.lupa-open #taLeg .tl { pointer-events: none; }   /* la leyenda de indicadores (EMA, ST…) tapaba el título de la lupa */

/* micro velas: «micro ▾» dentro de las velas abre 5 / 10 / 15 / 20 / 30 s */
#tfCtl { position: relative; }
.micro-btn { display: inline-flex; align-items: center; gap: 4px; }
.micro-btn .caret { font-style: normal; font-size: 9px; opacity: .6; }
.micro-btn.on { color: var(--accent) !important; }
.micro-pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; gap: 2px; padding: 4px;
  background: rgba(var(--float-rgb), .97); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow);
  animation: menuIn .2s cubic-bezier(.2, 1.2, .4, 1) both; }
#tfCtl.open .micro-pop { display: flex; }
.micro-pop button { background: transparent; border: 0; padding: 4px 10px; border-radius: 7px; color: var(--muted); font: 500 12px var(--sans); cursor: pointer; }
.micro-pop button:hover { color: var(--text); background: rgba(var(--hi-rgb), .04); }
.micro-pop button.on { background: var(--surface-4); color: var(--accent); }

/* sacados de la barra de arriba: las vistas armadas («a tu gusto») y el menú de efectos (✦). Siguen en el código para que nada se rompa */
#presetsCtl, .fx-wrap { display: none !important; }

/* Big Trade en foco (click en la lista): la fila queda marcada mientras rebota en el gráfico */
.ev.spot { background: rgba(var(--acc-rgb), .14); box-shadow: inset 3px 0 0 var(--acc); }
.ev.spot .g { animation: evSpot 1.5s cubic-bezier(.34, 1.9, .5, 1) infinite; }
@keyframes evSpot { 0% { scale: 1; } 12% { scale: 1.7; } 40% { scale: .9; } 60% { scale: 1.1; } 80%, 100% { scale: 1; } }

/* Big Trades: la parte de arriba más compacta (tarjetas de a 3, sin precio, que está en el cartel al pasar el mouse) */
#feedSum:not(:empty) { margin: 8px 10px 2px; padding: 8px 10px 9px; }
.fs-t { margin-bottom: 5px; font-size: 9.5px; }
.fs-row { font-size: 10.5px; }
.fs-bar { height: 4px; margin: 5px 0 7px; }
.fs-res .badge { font-size: 10px; padding: 1px 7px; }
.ft-h { margin: 9px 0 5px; font-size: 9.5px; }
.ft-h button { width: 18px; height: 16px; font-size: 11px; }
.ft-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ft { grid-template-columns: 10px 1fr; grid-template-rows: auto auto; gap: 0 4px; padding: 4px 6px 5px 8px; border-radius: 7px; }
.ft::before { width: 2px; }
.ft .g { font-size: 9px; }
.ft b { font-size: 13px; }
.ft em { grid-row: 2; justify-self: start; font-size: 9px; white-space: nowrap; overflow: visible; }
.ft em { grid-column: 1 / 3; }
.ft .badge { grid-column: 2; grid-row: 2; justify-self: end; font-size: 8.5px; padding: 0 5px; line-height: 14px; }
#feedSum:not(:empty) .fs-sort { margin: 8px 0 0; flex-direction: row; align-items: center; gap: 8px; }
.fs-sort > span { display: none; }
.fs-seg { flex: 1; padding: 2px; border-radius: 8px; }
.fs-seg button { padding: 4px 4px; font-size: 10.5px; border-radius: 6px; }

/* calidad de dibujo liviana / mínima (web/app.js, calidad()): sin desenfoque detrás de barras y menús, que en el celular
   obliga a recalcularlo cada vez que el gráfico se redibuja; los fondos ya son casi opacos */
html.q-lite *, html.q-lite *::before, html.q-lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
