/* SpaceView 2.5 — estilos nuevos (se cargan después de app.css y lo extienden; no lo reemplazan). */

/* ---------- lista: ticker / nombre · precio / variación · fuente y estado ---------- */
.wl .row:not(.sec) { grid-template-columns: 26px minmax(0,1fr) auto 64px; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; padding: 6px 8px 6px 8px; }
.wl .row:not(.sec) > .logo { grid-row: 1 / span 2; }
.wl .row:not(.sec) > .s { grid-row: 1 / span 2; }
.wl .row:not(.sec) > .s small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl .row:not(.sec) > .mk { grid-column: 3 / span 2; grid-row: 2; justify-self: end; }
.mk { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--faint); white-space: nowrap; letter-spacing: .02em; }
.mk i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.mk.on i { background: var(--up); box-shadow: 0 0 0 2px color-mix(in srgb, var(--up) 22%, transparent); }
.mk.off i { background: var(--faint); }
.logo { contain: strict; }
.logo img { pointer-events: none; }
/* búsqueda */
.res .open { flex-direction: row; align-items: center; gap: 10px; }
.res .rtx { display: flex; flex-direction: column; min-width: 0; }
.res .rtx b { font-size: 15px; letter-spacing: .02em; }
.res .rtx small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .p { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* ---------- panel de indicadores: navegación · tarjetas · detalle ---------- */
.modal.indm { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(4,6,14,.46); }
.sheet.indp { width: min(1120px, 96vw); height: min(740px, 90vh); max-height: none; display: grid; grid-template-rows: auto minmax(0,1fr) auto; padding: 0; overflow: hidden;
  background: var(--panel) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.indp-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.indp-head h2 { margin: 0; font-size: 17px; letter-spacing: .01em; white-space: nowrap; }
.indp-q { flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); color: var(--muted); }
.indp-q:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.indp-q input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--fg); font-size: 14.5px; height: 100%; }
.indp-q input::-webkit-search-cancel-button { display: none; }
kbd { font: 600 10.5px/1 var(--mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--raise); color: var(--muted); min-width: 18px; text-align: center; display: inline-block; }
.indp-body { display: grid; grid-template-columns: 196px minmax(0,1fr) 300px; min-height: 0; }
.indp-nav { overflow-y: auto; padding: 10px 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; overscroll-behavior: contain; }
.indp-ng { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 5px; font-weight: 700; }
.indp-ng:first-child { padding-top: 4px; }
.indp-ni { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-align: left; }
.indp-ni span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.indp-ni small { color: var(--faint); font: 500 11.5px var(--mono); }
.indp-ni:hover { background: var(--raise); }
.indp-ni[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.indp-ni[aria-current="true"] span { color: var(--fg); font-weight: 650; }
.indp-main { overflow-y: auto; padding: 14px; overscroll-behavior: contain; min-width: 0; }
.indp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.icard { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 10px 11px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line);
  content-visibility: auto; contain-intrinsic-size: 176px 150px; transition: border-color .12s, background .12s, transform .12s; }
.icard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.icard.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--raise)); box-shadow: 0 0 0 1px var(--accent) inset; }
.icard b { font-size: 13.5px; line-height: 1.25; margin-top: 6px; }
.icard small { font-size: 11.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard .istar { position: absolute; top: 8px; right: 8px; color: var(--faint); opacity: 0; }
.icard.fav .istar { opacity: 1; color: #f5c451; }
.icard.fav .istar svg { fill: currentColor; }
.ipv { display: block; height: 46px; border-radius: 7px; background: color-mix(in srgb, var(--bg) 70%, transparent); overflow: hidden; }
.ipv.big { height: 120px; border-radius: 10px; margin-bottom: 10px; }
.ipv svg { display: block; }
.indp-det { border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.indp-det h3 { margin: 2px 0 2px; font-size: 19px; }
.indp-det p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.indp-ins { margin: 6px 0 0; padding: 0 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.indp-acts { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.indp-acts .btn { justify-content: center; height: 40px; gap: 8px; }
.indp-acts .btn kbd { background: transparent; border-color: currentColor; color: inherit; opacity: .7; }
.indp-foot { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.indp-foot span { display: inline-flex; align-items: center; gap: 4px; }
.indp-cnt { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.indp-extra .plist, .qscripts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
@media (max-width: 1000px) { .indp-body { grid-template-columns: 180px minmax(0,1fr); } .indp-det { display: none; } }
@media (max-width: 860px) {
  .sheet.indp { width: 100vw; height: 100%; max-height: 100dvh; border-radius: 0; }
  .indp-body { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .indp-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; gap: 6px; scrollbar-width: none; }
  .indp-ng { display: none; }
  .indp-ni { flex: none; height: 32px; border: 1px solid var(--line); border-radius: 99px; }
  .indp-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
  .indp-foot { display: none; }
  .indp-head kbd { display: none; }
}
.indp-q { min-width: 0; }
@media (max-width: 860px) {
  .modal.indm { padding: 0; }
  .sheet.indp { width: 100%; }
  .indp-head { padding: 10px 10px 10px 12px; gap: 8px; }
  .indp-head h2 { display: none; }
  .icard::after { content: "+"; position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
}

/* ---------- configuración de dibujos ---------- */
.lv-row { display: grid; grid-template-columns: 18px 64px minmax(60px,1fr) 30px 66px 92px 26px 26px; gap: 5px; align-items: center; }
.lv-row .inp.sm { min-width: 0; }
.ib.flipu svg { transform: rotate(180deg); }
#mDraw .sheet { width: min(520px, 100%); }
#mDraw textarea { width: 100%; resize: vertical; }
.ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- calidad visual: en «Rendimiento» no hay desenfoques ni animaciones ---------- */
body.q-performance *, body.q-performance *::before, body.q-performance *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.q-performance .menu, body.q-performance .sheet, body.q-performance .toast, body.q-performance .chart-news, body.q-performance .lv-panel { background: var(--panel) !important; }
body.q-performance .modal { background: rgba(4,6,14,.62); }
body.q-balanced .modal { backdrop-filter: none; -webkit-backdrop-filter: none; }
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }

/* ---------- configuración del gráfico: navegación con íconos ---------- */
.set-nav button { display: flex; align-items: center; gap: 9px; }
.set-nav button svg { flex: none; opacity: .8; }

/* ---------- leyenda: fondo, plegado, áreas táctiles cómodas ---------- */
.pleg { background: var(--leg-bg, transparent); border-radius: 8px; }
.legends.has-bg .pleg { padding: 4px 8px 5px; margin: -2px 0 0 -4px; }
.lfold { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 2px; border-radius: 5px; color: var(--muted); font-size: 11.5px; margin: 0 0 1px -4px; width: max-content; }
.lfold:hover { background: var(--raise); color: var(--fg); }
.lfold svg { transition: transform .15s; }
.lfold.on svg { transform: rotate(-90deg); }
.pleg.folded .lrow { display: none; }
.lrow .lacts .ib.sm { width: 26px; height: 26px; min-width: 26px; border-radius: 6px; }
.lrow .lacts .ib.sm svg { width: 15px; height: 15px; }
.lrow .lacts .ib.sm:hover { background: var(--hover); }
.lrow .lname { cursor: grab; }
.lrow.dragging { opacity: .6; }
@media (pointer: coarse) { .lrow .lacts .ib.sm { width: 34px; height: 34px; min-width: 34px; } .lrow { min-height: 30px; } }
.pane-drop { position: absolute; z-index: 6; pointer-events: none; border: 2px dashed var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); display: grid; place-items: center; font-size: 12.5px; color: var(--accent); font-weight: 650; }
.pane-drop.bad { border-color: var(--faint); background: transparent; color: var(--muted); }
.pane-drop.new { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.menu.ctx { min-width: 240px; }
.pleg.main .lfold { margin-top: 1px; }

/* ---------- buscador de herramientas y favoritas ---------- */
.tsearch { position: fixed; z-index: 70; width: 290px; max-height: min(560px, calc(100vh - 16px)); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--glass-b); box-shadow: var(--shadow); }
.ts-q { display: flex; align-items: center; gap: 8px; margin: 8px; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--raise); border: 1px solid var(--line); color: var(--muted); }
.ts-q:focus-within { border-color: var(--accent); }
.ts-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); }
.ts-list { overflow-y: auto; padding: 0 6px 6px; overscroll-behavior: contain; flex: 1; }
.ts-h { display: flex; align-items: center; gap: 8px; padding: 10px 6px 4px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.ts-h::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 1; }
.ts-h small { order: 2; font: 600 10.5px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; }
.ts-i { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.ts-i .ts-n { flex: 1; min-width: 0; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.ts-i:hover, .ts-i.sel { background: var(--raise); }
.ts-i.sel { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.ts-i.cur .ts-n { color: var(--accent); }
.ts-k { display: inline-flex; gap: 3px; }
.ts-star { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--faint); opacity: 0; }
.ts-i:hover .ts-star, .ts-star.on { opacity: 1; }
.ts-star.on { color: #f5c451; } .ts-star.on svg { fill: currentColor; }
.ts-foot { padding: 7px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.tfavs { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.tfavs .ib.fav { position: relative; touch-action: none; }
.tfavs .ib.fav::after { content: ""; position: absolute; right: 3px; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #f5c451; }
.tfavs .ib.dragging { opacity: .6; cursor: grabbing; }
#toolsGrid > .search { margin: 4px 0 6px; }

/* ---------- atajos de teclado ---------- */
.keys-top { padding-bottom: 6px; }
.krow { display: flex; align-items: center; gap: 12px; padding: 7px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.krow .kname { flex: 1; min-width: 0; }
.kkeys { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kbtn { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 2px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--raise); }
.kbtn:hover { border-color: var(--accent); }
.kbtn.add { color: var(--faint); min-width: 28px; justify-content: center; }
.kbtn.rec { border-color: var(--accent); color: var(--accent); font-size: 12px; }
.kchips { display: inline-flex; gap: 3px; }

/* ---------- celular y tablet: diseño propio, no la versión de escritorio achicada ---------- */
@media (max-width: 860px) {
  html, body { height: 100%; height: 100dvh; }
  .app { height: 100dvh; }
  .chart-ctl { min-width: 0; flex: 1; gap: 4px; }
  .tfs { overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tfs::-webkit-scrollbar { display: none; }
  .tfs .tf { flex: none; min-width: 38px; height: 34px; }
  .sym-btn { height: 36px; }
  .ib, .ind-btn, .type-btn { min-width: 38px; min-height: 38px; }
  /* barra de estilo del dibujo: tira deslizable sobre la barra inferior */
  .dstyle { left: 6px !important; right: 6px; bottom: 8px; top: auto; max-width: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dstyle::-webkit-scrollbar { display: none; }
  .tool-chip { left: 8px; right: 8px; bottom: 10px; top: auto; max-width: none; transform: none; }
  .legends .lrow { font-size: 12.5px; }
  .phead { font-size: 12px; }
  .phead .lsym { font-size: 14px; }
}
/* celular apaisado (poca altura): barra inferior compacta solo con íconos, barra superior más baja */
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
  :root { --top-h: 42px; }
  .brand, .top-icons, .tools, .rail, .feed span, .views { display: none; }
  .main { grid-template-columns: 1fr !important; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .bnav button { flex-direction: row; justify-content: center; gap: 6px; padding: 4px 0; font-size: 12px; height: 40px; }
  .bnav button span { display: none; }
  .side:not(.open) { display: none !important; }
  .side.open { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 70vw); z-index: 30; display: flex; box-shadow: var(--shadow); padding-bottom: 42px; }
  .lrow { min-height: 22px; }
}
/* tablet: panel lateral más angosto, iconos táctiles */
@media (min-width: 861px) and (max-width: 1200px) {
  :root { --side-w: 280px; }
  .views .view-btn span { display: none; }
}
@media (pointer: coarse) {
  .tools .ib { width: 40px; height: 40px; }
  .tfs .tf { min-height: 34px; }
}

/* ======================================================================
   FASE 2 · Liquid Glass, Inicio, centro de Código, Comunidad, Noticias, Estrategias
   ====================================================================== */

/* ---------- Liquid Glass: material translúcido con brillo especular. Intensidad según la calidad ----------
   Alta: desenfoque y saturación completos + reflejo. Equilibrada: desenfoque corto. Rendimiento: superficies
   sólidas (sin backdrop-filter). Nunca se aplica al lienzo del gráfico. */
:root { --lg-blur: 20px; --lg-sat: 165%; --lg-tint: rgba(18,24,38,.58); --lg-edge: rgba(255,255,255,.10); --lg-spec: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 42%);
  --ease-el: cubic-bezier(.34,1.56,.64,1); --ease-out: cubic-bezier(.22,1,.36,1); }
:root[data-theme="light"] { --lg-tint: rgba(255,255,255,.62); --lg-edge: rgba(10,20,40,.10); --lg-spec: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 45%); }
body.q-balanced { --lg-blur: 10px; --lg-sat: 130%; }
.glass, body:not(.q-performance) .menu, body:not(.q-performance) .bnav {
  background: var(--lg-spec), var(--lg-tint); -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)); backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat));
  border: 1px solid var(--lg-edge); box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.07); }
body.q-performance .glass { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
body.q-high .top { background: var(--lg-spec), color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)); backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)); }
/* transiciones elásticas (se desactivan con «reducir movimiento») */
.btn, .ib, .chip, .view-btn, .hm-sc, .ch-tile, .nw-sec, .cm-area, .ch-tab { transition: transform .28s var(--ease-el), background-color .15s, color .15s, border-color .15s, box-shadow .2s; }
.btn:active, .ib:active, .chip:active, .hm-sc:active, .ch-tile:active, .cm-area:active { transform: scale(.955); }
@keyframes lg-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
body:not(.no-motion) .menu, body:not(.no-motion) .sheet { animation: lg-pop .26s var(--ease-el) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
.brand { cursor: pointer; border-radius: 8px; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Inicio ---------- */
#vHome { overflow-y: auto; position: relative; }
.hm { position: relative; max-width: 980px; margin: 0 auto; padding: 22px 18px 40px; display: flex; flex-direction: column; gap: 14px; isolation: isolate; }
.hm-sky { position: fixed; inset: var(--top-h) 0 0 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent2) 22%, transparent), transparent 60%), radial-gradient(900px 500px at 0% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--bg); }
.hm-sky i { position: absolute; inset: -50%; background-repeat: repeat; opacity: .55; }
.hm-sky .s1 { background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 140px 80px, #cfd8ff, transparent), radial-gradient(1.5px 1.5px at 90px 160px, #fff, transparent); background-size: 220px 220px; animation: hm-drift 140s linear infinite; }
.hm-sky .s2 { background-image: radial-gradient(1px 1px at 60px 110px, #fff, transparent), radial-gradient(1px 1px at 200px 40px, #b9c6ff, transparent); background-size: 300px 300px; opacity: .35; animation: hm-drift 220s linear infinite reverse; }
.hm-sky .s3 { background-image: radial-gradient(2px 2px at 150px 150px, rgba(255,255,255,.9), transparent); background-size: 420px 420px; opacity: .25; animation: hm-twinkle 6s ease-in-out infinite; }
.hm-sky .glow { inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent); opacity: .6; animation: hm-breathe 12s ease-in-out infinite; }
:root[data-theme="light"] .hm-sky .s1, :root[data-theme="light"] .hm-sky .s2, :root[data-theme="light"] .hm-sky .s3 { display: none; }
@keyframes hm-drift { to { transform: translate3d(220px, 110px, 0); } }
@keyframes hm-twinkle { 50% { opacity: .05; } }
@keyframes hm-breathe { 50% { transform: scale(1.08); opacity: .4; } }
body.no-motion .hm-sky i, body.q-performance .hm-sky i { animation: none !important; }
body.q-performance .hm-sky .s2, body.q-performance .hm-sky .s3 { display: none; }
.hm-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; }
.hm-logo { border-radius: 14px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
body:not(.no-motion) .hm-logo { animation: lg-pop .6s var(--ease-el) both; }
.hm-hero h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-hero p { margin: 2px 0 0; text-transform: none; }
.hm-hero p::first-letter { text-transform: uppercase; }
.hm-cont { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px 16px; border-radius: 16px; width: 100%; cursor: pointer; }
.hm-cont:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--lg-edge)); }
.hm-ci { display: flex; align-items: center; gap: 12px; }
.hm-ci > div { display: flex; flex-direction: column; }
.hm-ci b { font-size: 16px; }
.hm-px { font-size: 18px; font-weight: 650; }
.hm-spark { height: 60px; color: var(--accent); }
.hm-spark.up { color: var(--up); } .hm-spark.down { color: var(--down); }
.hm-spark svg { width: 100%; height: 100%; display: block; }
.hm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-sc { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 14px; text-align: left; min-height: 96px; cursor: pointer; }
body:not(.no-motion) .hm-sc { animation: lg-pop .45s var(--ease-el) both; animation-delay: calc(var(--i) * 35ms); }
.hm-sc:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--lg-edge)); transform: translateY(-2px); }
.hm-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.hm-sc small { font-size: 11.5px; }
.hm-sec { border-radius: 16px; padding: 12px 14px; }
.hm-sh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.hm-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; }
.hm-q { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px; border-radius: 8px; text-align: left; min-width: 0; }
.hm-q:hover { background: var(--hover); }
.hm-q b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-l { font-weight: 600; } .hm-c { min-width: 62px; text-align: right; font-size: 12.5px; }
.hm-c.up { color: var(--up); } .hm-c.down { color: var(--down); }
.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-st { display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer; }
.hm-st b { font-size: 22px; }
.hm-foot { text-align: center; margin-top: 6px; }
@media (max-width: 860px) {
  .hm { padding: 14px 12px 90px; }
  .hm-grid, .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-strip { grid-template-columns: 1fr; }
  .hm-hero h1 { font-size: 24px; }
  .hm-q { height: 44px; }
}

/* ---------- centro de Código ---------- */
#vCode.code-view { display: flex; flex-direction: column; }
#vCode:not([hidden]) { display: flex; }
.ch { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 40px; }
.ch[hidden], .ch-ed[hidden] { display: none !important; }
.ch-head, .ch-body { max-width: 980px; margin: 0 auto; }
.ch-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ch-head h2 { margin: 0; font-size: 22px; font-weight: 650; }
.ch-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 3px; border-radius: 11px; background: var(--raise); border: 1px solid var(--line); }
.ch-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.ch-tab:hover { color: var(--fg); }
.ch-tab[aria-selected="true"] { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ch-tab[aria-selected="true"] svg { color: var(--accent); }
.ch-desc { margin: 0 0 12px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ch-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: left; cursor: pointer; min-height: 112px; }
.ch-tile:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); }
.ch-tile.done .ch-tic { color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
.ch-tic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.ch-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ch-bar .inp[type="search"] { flex: 1; min-width: 180px; }
.ch-list { display: flex; flex-direction: column; gap: 6px; }
.ch-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: 64px; }
.ch-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.ch-row.col p { margin: 0; }
.ch-ri { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.ch-rt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ch-rt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.chip.on { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.ch-rt .chip.sm { padding: 0 8px; font-family: var(--font); }
.ch-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ch-acts .ib { width: 36px; height: 36px; }
.ch-acts .ib.danger:hover { color: var(--down); }
.ch-acts .ib:disabled { opacity: .35; cursor: not-allowed; }
.ch-pv { max-height: 300px; overflow: auto; margin: 0; font-size: 12px; }
.ch-step { display: flex; gap: 12px; margin: 12px 0; }
.ch-sn { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.ch-step > div { flex: 1; min-width: 0; }
.ch-step p { margin: 3px 0 8px; }
.ch-step pre { margin: 0 0 8px; }
.ch-note { padding: 12px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent2) 50%, var(--line)); background: color-mix(in srgb, var(--accent2) 7%, transparent); margin-bottom: 12px; }
.ch-note p { margin: 4px 0 0; }
.ch-store { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ch-prod { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.ch-prod p { margin: 0; }
.ch-ed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ch-edbar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; }
.ch-edbar .link svg { transform: rotate(90deg); }
.ch-ed > :last-child { flex: 1; min-height: 0; }
@media (max-width: 860px) { .ch { padding: 12px 10px 90px; } .ch-tab span { display: none; } .ch-tab { padding: 0 14px; height: 38px; } .ch-acts .ib { width: 42px; height: 42px; } }

/* ---------- Comunidad: WOLFS · GALAXIES · STARASK ---------- */
.cm-areas { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-area { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.cm-area:hover { color: var(--fg); }
.cm-area[aria-pressed="true"] { color: var(--fg); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.cm-area[aria-pressed="true"] .cm-aic { color: var(--accent); }
.cm-aic { display: inline-flex; gap: 1px; }
.cm-desc { margin: -4px 0 10px; }
.cm-newt { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.terms p { margin: 0 0 10px; line-height: 1.5; }
.terms b { color: var(--fg); }
.terms-ok { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.terms-ok input { margin-top: 3px; }
@media (max-width: 860px) { .cm-head { flex-wrap: wrap; } .cm-area { height: 40px; } }

/* ---------- Noticias: secciones e imágenes ---------- */
.nw-secs { display: flex; gap: 2px; max-width: 980px; margin: 12px auto 0; padding: 3px; border-radius: 11px; background: var(--raise); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.nw-sec { height: 32px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.nw-sec:hover { color: var(--fg); }
.nw-sec[aria-selected="true"] { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.nw-list { content-visibility: auto; }
.nw-item.img { flex-direction: row; gap: 14px; align-items: flex-start; }
.nw-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.nw-img { flex: none; width: 148px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.nw-item.lead { flex-direction: column; }
.nw-item.lead .nw-img { width: 100%; aspect-ratio: 21/9; border-radius: 14px; }
.nw-item.lead .nw-t { font-size: 19px; }
.nw-hot { font-size: 11px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) { .nw-img { width: 104px; } .nw-item.lead .nw-img { aspect-ratio: 16/9; } }

/* ---------- Estrategias: ficha del resultado, reglas contextuales ---------- */
.sv-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; }
.sv-card > div { display: flex; flex-direction: column; min-width: 0; }
.sv-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sv-disc { margin: 0 0 8px; }
.rule-t .seg { margin-left: auto; }
.rule-t .seg button { padding: 3px 8px; font-size: 12px; }
#vCode .ch-ed .ide { height: auto; flex: 1; }
@media (max-width: 860px) { .hm-sc { min-height: 0; padding: 12px; } .hm-ic { width: 34px; height: 34px; } .hm-hero { padding: 14px; } .hm-logo { width: 44px; height: 44px; } }
@media (max-width: 860px) { .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ch-tile { min-height: 0; padding: 12px; } .ch-tile .muted { font-size: 12px; } }
