/* ═══ REDESIGN-MOBILE — Task 95, pase responsive móvil + accesibilidad del
   rediseño (nav persistente, dashboards glass, tabs de dos niveles,
   DataTable CBI, command palette). Capa aditiva ÚNICA compartida por las 4
   superficies (terminal, ops/desk, hub, landing) — @media(max-width:768px)
   exclusivamente, cero efecto en desktop (>=769px).

   No sustituye css/mobile-responsive.css, css/hub-mobile.css,
   css/landing-mobile.css ni css/desk-mobile.css (rangos 768-899px ya
   cubiertos por esos ficheros, ver sus propias cabeceras) — este fichero se
   enfoca específicamente en los componentes del rediseño (Task 86/90/93) que
   son posteriores a esos ficheros y en refuerzos de accesibilidad.

   ORDEN DE CARGA: <link> a este fichero debe ser el ÚLTIMO <link
   rel="stylesheet"> de cada <head> (después de glass-system.css y del
   *-mobile.css propio de la superficie) para ganar los empates de
   especificidad por orden de cascada sin depender de !important. Excepción
   documentada inline: los selectores `.stock-entity-*` se definen en <style>
   inline DENTRO de <body> en apps/terminal/index.html — más abajo que cualquier
   <link> de <head>, así que el orden de carga no basta para ganar esa pelea. Ver
   el bloque correspondiente para el detalle de por qué usa !important en vez de
   solo especificidad. (Prompt 21: `.module-tabs-l1/l2` y `.stock-shortcuts-bar`
   se retiraron de este fichero — ningún marcado ni JS los genera ya.) */

@media (max-width: 768px) {

  /* ─────────────────────────────────────────────────────────────────
     TERMINAL · Pills de entidad (.stock-entity-tabs de las fichas de Crypto,
     Fixed Income y Private Banking; ticker-entity-page Task 90) → scroll
     horizontal con snap en vez de wrap.
     Nunca corta el último botón: scroll-snap-align:start en cada botón +
     un spacer ::after (no un padding, que algunos motores no respetan al
     final de un contenedor con overflow-x:auto).
     !important en flex-wrap/overflow-x/scroll-snap-type: `.stock-entity-tabs`
     se define en un <style> inline de <body> (apps/terminal/index.html), más
     abajo que este <link> de <head> — así una futura cualificación con ID no
     rompe este bloque en silencio. */
  .stock-entity-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity !important;
    scrollbar-width: thin;
  }
  .stock-entity-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 40px;
  }
  .stock-entity-tabs::after {
    content: "";
    flex: 0 0 1px;
    margin-right: 10px;
  }

  /* ─────────────────────────────────────────────────────────────────
     TERMINAL · Command palette — inalcanzable hoy en móvil: css/mobile-
     responsive.css (bloque M) oculta el wrapper Search/Help del toolbar
     asumiendo acceso por teclado (⌘K), que no existe en touch. Botón
     flotante dedicado (creado por buildCmdkButton() en js/mobile-nav.js),
     espejo del hamburger (.cbm-mnav-toggle) en la esquina opuesta. ───── */
  .cbm-cmdk-toggle {
    position: fixed;
    top: 8px; right: 8px;
    z-index: 650;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg1, #0d1117);
    border: 1px solid var(--border2, #273547);
    border-radius: 6px;
    color: var(--text0, #e8eef5);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
  }
  /* Reserva de espacio simétrica a la del hamburger (mobile-responsive.css,
     bloques L/mobile-header-unstick con padding-left:52px) para que el
     nuevo botón no tape el último símbolo del ticker ni el texto del
     header/live-bar. Añade solo la propiedad derecha — no reescribe el
     shorthand `padding` ya fijado por esos bloques. */
  .ticker-tape { padding-right: 52px; }
  .live-bar { padding-right: 52px; }
  .header { padding-right: 52px; }

  /* Ancho completo real del modal (antes min(580px,92vw) — casi completo
     pero no del todo) y menos padding-top para que quepa con el teclado
     on-screen abierto. !important obligatorio: ambos valores están fijados
     en un style="" inline sobre el propio nodo en apps/terminal/index.html
     — un inline style="" gana siempre a cualquier regla externa salvo
     !important (mismo patrón ya documentado en css/mobile-responsive.css
     para #ai-platform-notice/.header-stats). */
  #cmd-k-modal > div.glass-elev-3 { width: calc(100vw - 16px) !important; }
  #cmd-k-modal { padding-top: 8vh !important; }

  /* ─────────────────────────────────────────────────────────────────
     GLASS · Reducir blur en móvil por rendimiento — backdrop-filter con
     blur pesado (18-28px) recalculado en cada scroll/paint es el coste más
     alto de toda la superficie glass en gama media/baja. La reducción no
     es perceptible (superficies más pequeñas, se ve menos de golpe).
     Convive con los fallbacks de css/glass-system.css: @supports not
     backdrop-filter y prefers-reduced-transparency ya caen a fondo sólido
     y estas variables no aplican en ese caso. ─────────────────────────── */
  :root {
    --glass-blur: 8px;
    --glass-blur-sm: 5px;
    --glass-blur-lg: 12px;
  }
  /* El sheen especular (.glass-liquid, animación infinita de 9s) es puro
     coste de repintado sin valor funcional en pantallas pequeñas — se
     desactiva en móvil igual que ya hace css/glass-system.css al pedir
     reducir movimiento. */
  .glass-liquid::after { display: none; }

  /* ─────────────────────────────────────────────────────────────────
     DataTable CBI (.glass-datatable) — mismo tratamiento de scroll
     horizontal táctil + sombra-cue que .cbm-table-scroll (css/mobile-
     responsive.css) para las tablas que usan el componente nuevo en vez de
     un <table> suelto. .glass-datatable__scroll ya es overflow-x:auto por
     defecto (css/glass-system.css) — aquí solo se añade la inercia táctil y
     la sombra-cue. ─────────────────────────────────────────────────────── */
  .glass-datatable__scroll {
    -webkit-overflow-scrolling: touch;
    box-shadow: inset -14px 0 10px -12px rgba(0, 0, 0, .55);
  }

  /* ─────────────────────────────────────────────────────────────────
     HUB — css/hub-mobile.css ya cubre topbar/cards/KPI-strip (768/900/480).
     Aquí solo el refuerzo de accesibilidad del rediseño (foco visible) que
     ese fichero no trataba. ────────────────────────────────────────────── */
  .mc-toggle:focus-visible,
  .mc-open-btn:focus-visible {
    outline: 2px solid var(--purple, #6366f1);
    outline-offset: 2px;
  }

  /* ─────────────────────────────────────────────────────────────────
     DESK (ops) — hardening de la vista reducida #dmob-root SIN cambiar su
     arquitectura (decisión explícita del ticket 95: se mantiene solo-
     lectura, no se migra al reflow completo de escritorio). Solo touch
     targets >=40px y foco visible que css/desk-mobile.css no cubría — los
     botones de nav/subnav no fijaban min-height, solo padding. ─────────── */
  .dmob-nav-btn,
  .dmob-subnav-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .dmob-nav-btn:focus-visible,
  .dmob-subnav-btn:focus-visible {
    outline: 2px solid var(--purple, #b88aff);
    outline-offset: 2px;
  }
}

/* Reducir movimiento: ya no se repite aquí. La regla única vive en css/motion.css (Prompt 24) y
   css/glass-system.css conserva su `.glass-liquid::after { display: none }`, que sí hace algo que aquella no cubre. */
/* ═══ /REDESIGN-MOBILE ═══ */

/* ═══ NUEVO: terminal-mobile-bars ═══════════════════════════════════════════════
   Terminal móvil (<900 px): recupera pantalla quitando cromo apilado. A 390×844 había ≈330 px de barras antes
   del contenido (barra de acciones de 3 filas, .header sticky de 118 px, L1, L2) y, abajo, el aviso de IA (76 px),
   el banner de cookies (204 px) y dos botones flotantes. Resultado buscado: lo fijo/sticky ≤ 25 % del viewport y
   el contenido con ≥ 70 % del alto visible.

   ALCANCE: solo el Terminal. Todo va dentro de @media (max-width:899px) y acotado a body:has(#module-topbar):
   Desk carga este mismo fichero y no tiene esa barra. Escritorio (≥900 px) no cambia: nav2.css, el bloque
   density-pass (P56) y el boot-gate no se tocan. Va aquí porque este fichero es el ÚLTIMO <link> y gana por
   orden de cascada; el !important solo aparece donde el valor a vencer es un style="" en línea o ya lleva !important
   en css/mobile-responsive.css (mismo patrón documentado en ese fichero).

   FILAS: cada fila de cromo mide --cbm-m-row (45 px = 44 px de zona táctil + 1 px de borde). El área táctil de
   44 px de las pastillas se consigue con un ::after transparente; el aspecto visual sigue siendo de 32 px.
   GUTTERS: los botones flotantes (☰ a la izquierda, ⌕ a la derecha, js/mobile-nav.js) miden 44 px y flotan en
   los 52 px laterales de las filas que pueden pasar bajo ellos (cinta, barra de acciones, KPIs, L1). Se ocultan
   a la vez que L1 (js/mobile-nav.js, initL1Autohide), así que nunca flotan sobre el contenido. */
.cbm-m-more, .cbm-m-kpi-toggle, .cbm-ai-i { display: none; }
.cbm-m-l1-sentinel { height: 0; margin: 0; padding: 0; border: 0; flex: 0 0 0; }

@media (max-width: 899px) {

  /* ── Variables de la pila fija ──────────────────────────────────────────── */
  body:has(#module-topbar) {
    --cbm-m-row: 45px;
    --cbm-m-inset-t: env(safe-area-inset-top, 0px);
    --cbm-m-l1-h: calc(var(--cbm-m-row) + var(--cbm-m-inset-t));
    --cbm-m-l2-h: 0px;
    --cbm-m-stick: var(--cbm-m-l1-h);   /* alto del cromo pegado por encima de L2: L1 visible */
    --cbm-m-pad-b: 0px;                 /* hueco inferior para que el aviso fijo no tape el final del contenido */
  }
  body:has(#module-topbar):has(#module-topbar-l2:not(:empty)) { --cbm-m-l2-h: var(--cbm-m-row); }
  body.cbm-m-l1-off:has(#module-topbar) { --cbm-m-stick: var(--cbm-m-inset-t); }
  body:has(#module-topbar):has(#ai-platform-notice) { --cbm-m-pad-b: 30px; }
  body:has(#module-topbar):has(#cbm-consent-banner.cbm-visible) { --cbm-m-pad-b: 100px; }

  /* 100dvh, no 100vh: en iOS/Android la barra de URL cambia el alto visible y 100vh deja la página más alta que la pantalla. */
  body:has(#module-topbar) #app-shell {
    min-height: 100dvh;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--cbm-m-pad-b));
  }
  body:has(#module-topbar) .modal { max-height: calc(88dvh - env(safe-area-inset-bottom, 0px)); }
  body:has(#module-topbar) #cmd-k-modal { padding-top: 8dvh !important; }
  body:has(#module-topbar) .cbm-modal-box { max-height: 90dvh; }

  /* ── 1 · Barra de acciones (#liveBar): UNA fila = estado + ↺ Refresh + «⋯» ─────────────────────────────────
     .live-bar-right pasa a display:contents: sus hijos (los botones ORIGINALES, con sus onclick/data-cbm-action)
     se convierten en elementos flex de la propia barra. Cerrado se ocultan todos salvo Refresh; con el menú
     abierto (.cbm-m-open) se muestran como celdas de dos columnas bajo la fila de estado. No se mueve ni se
     clona ningún nodo. */
  body:has(#module-topbar) .live-bar {
    box-sizing: border-box; min-height: var(--cbm-m-row);
    flex-wrap: nowrap; align-items: center; gap: 8px; padding: 0 8px;
  }
  body:has(#module-topbar) .live-dot { margin-left: 44px; }   /* 8 + 44 = 52 px: deja libre el botón ☰ */
  body:has(#module-topbar) #liveStatusText { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body:has(#module-topbar) .live-bar-right { display: contents; }
  body:has(#module-topbar) .live-bar:not(.cbm-m-open) :is(#mktBadge, #liveUpdated, .live-countdown),
  body:has(#module-topbar) .live-bar:not(.cbm-m-open) .live-bar-right > :not(#tbRefreshBtn):not(#jobs-spinner) { display: none !important; }
  body:has(#module-topbar) #tbRefreshBtn { order: 1; flex: 0 0 auto; min-height: 44px; }
  body:has(#module-topbar) #jobs-spinner { order: 1; }
  body:has(#module-topbar) .cbm-m-more {
    display: inline-flex; align-items: center; justify-content: center; order: 2;
    flex: 0 0 44px; width: 44px; min-height: 44px; margin-right: 44px; padding: 0;   /* 8 + 44 = 52 px: deja libre ⌕ */
    font-size: 20px; line-height: 1;
  }
  body:has(#module-topbar) .cbm-m-more[aria-expanded="true"] { background: var(--bg3); border-color: var(--border2); }
  body:has(#module-topbar) .cbm-m-more:focus-visible,
  body:has(#module-topbar) .cbm-m-kpi-toggle:focus-visible,
  body:has(#module-topbar) .cbm-ai-i:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

  /* menú abierto: una segunda zona dentro de la misma barra, a todo el ancho (los botones ya no están bajo ☰/⌕) */
  body:has(#module-topbar) .live-bar.cbm-m-open { flex-wrap: wrap; row-gap: 6px; padding-bottom: 8px; }
  body:has(#module-topbar) .live-bar.cbm-m-open::after { content: ""; flex: 0 0 100%; order: 2; height: 0; }   /* salto de línea tras la fila de estado */
  body:has(#module-topbar) .live-bar.cbm-m-open :is(#mktBadge, #liveUpdated, .live-countdown) { order: 3; }
  body:has(#module-topbar) .live-bar.cbm-m-open .tb-quick-connect { display: contents; }
  body:has(#module-topbar) .live-bar.cbm-m-open .live-bar-right > :is(button, .tb-auto-compact):not(#tbRefreshBtn),
  body:has(#module-topbar) .live-bar.cbm-m-open .tb-quick-connect > button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    order: 4; flex: 1 1 calc(50% - 4px); min-width: 0; min-height: 44px; margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body:has(#module-topbar) .live-bar.cbm-m-open [data-m-label]::after { content: attr(data-m-label); }

  /* ── 2 · KPIs (.header): deja de ser sticky; una línea con valor + variación del día, resto tras «▾» ───────── */
  body:has(#module-topbar) .header {
    position: static; box-sizing: border-box; min-height: var(--cbm-m-row);
    flex-wrap: wrap; align-items: center; justify-content: flex-start;
    gap: 0 8px; row-gap: 0; padding: 0 8px 0 52px;   /* solo el gutter izquierdo (☰): «▾» queda al borde derecho y el texto gana 44 px; ⌕ lo tapa solo mientras la fila pasa bajo él */
  }
  body:has(#module-topbar) .header .logo,
  body:has(#module-topbar) .header #planBadge { display: none; }
  body:has(#module-topbar) #headerStats {
    order: 1; flex: 1 1 0 !important; min-width: 0; display: flex; flex-wrap: wrap; align-items: center;
    gap: 0 8px !important; justify-content: flex-start !important;
  }
  body:has(#module-topbar) #headerStats .hstat { flex: 0 0 auto; min-width: 0; text-align: left; }
  body:has(#module-topbar) #headerStats .hstat:nth-child(n+3) { display: none; }
  /* etiqueta en una línea; «Day Change · últ. sesión 17 nov» se recorta con «…» en vez de ensanchar la fila */
  body:has(#module-topbar) #headerStats .hstat-label { display: block; max-width: 13em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; letter-spacing: 0; line-height: 1.3; }
  body:has(#module-topbar) #headerStats .hstat-value { font-size: 11px; line-height: 1.3; white-space: nowrap; }   /* 11 px: a 360 px caben «$123,456.78» + «+$1,234.56 (+1.23%)» en una línea */
  body:has(#module-topbar) .cbm-m-kpi-toggle {
    display: inline-flex; align-items: center; justify-content: center; order: 2; position: relative;
    flex: 0 0 32px; width: 32px; height: 32px; padding: 0;
    background: transparent; border: 1px solid var(--border2); border-radius: 6px; color: var(--text1); font-size: 14px; line-height: 1; cursor: pointer;
  }
  body:has(#module-topbar) .cbm-m-kpi-toggle::after { content: ""; position: absolute; inset: -7px; }   /* 44×44 de zona táctil (el ::after se mide desde el padding box: 32 − 2 de borde + 14) */
  /* desplegado: logo + plan y el resto de KPIs en rejilla */
  body:has(#module-topbar) .header.cbm-m-kpi-open { padding-bottom: 8px; align-items: flex-start; }
  body:has(#module-topbar) .header.cbm-m-kpi-open .logo,
  body:has(#module-topbar) .header.cbm-m-kpi-open #planBadge { display: inline-flex; order: 3; margin: 6px 12px 0 0 !important; }
  body:has(#module-topbar) .header.cbm-m-kpi-open .logo { display: block; }
  body:has(#module-topbar) .header.cbm-m-kpi-open #headerStats { flex-basis: calc(100% - 44px) !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px !important; padding-top: 6px; }
  body:has(#module-topbar) .header.cbm-m-kpi-open #headerStats .hstat:nth-child(n+3) { display: block; }
  body:has(#module-topbar) .header.cbm-m-kpi-open #headerStats .hstat-label { width: auto; min-width: 0; white-space: normal; font-size: 9px; }
  body:has(#module-topbar) .header.cbm-m-kpi-open #headerStats .hstat-value { font-size: 13px; }

  /* ── 3 · L1 / L2: una fila cada una con scroll horizontal; L1 se oculta al bajar (initL1Autohide) ──────────── */
  body:has(#module-topbar) #module-topbar {
    position: sticky; top: 0; z-index: 12;
    box-sizing: border-box; height: var(--cbm-m-l1-h); padding: var(--cbm-m-inset-t) 52px 0;
    align-items: center; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    transition: transform .2s ease, visibility 0s;
  }
  body:has(#module-topbar) #module-topbar::-webkit-scrollbar,
  body:has(#module-topbar) #module-topbar-l2::-webkit-scrollbar { display: none; }
  body.cbm-m-l1-off:has(#module-topbar) #module-topbar { transform: translateY(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  body:has(#module-topbar) #module-topbar-l2 {
    position: sticky; top: var(--cbm-m-stick); z-index: 11;
    box-sizing: border-box; min-height: var(--cbm-m-row); padding: 0 8px;
    align-items: center; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    transition: top .2s ease;
  }
  body:has(#module-topbar) :is(.module-topbar-btn, .module-topbar-l2-btn) { position: relative; flex: 0 0 auto; min-height: 32px; }
  body:has(#module-topbar) :is(.module-topbar-btn, .module-topbar-l2-btn)::after { content: ""; position: absolute; inset: -7px -3px; }   /* 44 px de zona táctil (32 − 2 de borde + 14) */
  /* barra de subtabs del modo foco (Stock Analysis): pegada justo debajo de L1/L2, ya sin los 52 px laterales */
  body.stock-focus-mode:has(#module-topbar) #stock-focus-bar {
    top: calc(var(--cbm-m-stick) + var(--cbm-m-l2-h)); padding-left: 8px; padding-right: 8px; transition: top .2s ease;
  }

  /* ── 4 · Aviso de IA: una línea de ~28 px; «i» (o tocar el texto) despliega el aviso legal ─────────────────── */
  body:has(#module-topbar) #ai-platform-notice {
    flex-wrap: nowrap !important; align-items: center !important; gap: 8px !important;
    box-sizing: border-box; min-height: calc(28px + env(safe-area-inset-bottom, 0px));
    padding: 0 8px env(safe-area-inset-bottom, 0px) !important; line-height: 1.2;
  }
  body:has(#module-topbar) #ai-platform-notice > span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
  body:has(#module-topbar) #ai-platform-notice > a { display: none; }
  body:has(#module-topbar) #ai-platform-notice > button:not(.cbm-ai-i) { position: relative; flex: 0 0 auto; margin-left: 0 !important; padding: 0 8px !important; line-height: 1.7 !important; }
  body:has(#module-topbar) #ai-platform-notice > button:not(.cbm-ai-i)::after { content: ""; position: absolute; inset: -22px -4px -4px; }   /* zona táctil de 44 px apoyada en el borde de la pantalla */
  body:has(#module-topbar) .cbm-ai-i {
    display: inline-flex; align-items: center; justify-content: center; position: relative; flex: 0 0 18px; width: 18px; height: 18px; padding: 0;
    background: transparent; border: 1px solid rgba(184, 138, 255, .55); border-radius: 50%; color: #b88aff;
    font: italic 700 11px/1 var(--font-body, serif); cursor: pointer;
  }
  body:has(#module-topbar) .cbm-ai-i::after { content: ""; position: absolute; inset: -23px -19px -5px -9px; }   /* 44×44 de zona táctil (padding box de 16 px), apoyada en los bordes izquierdo e inferior de la pantalla; invade el arranque del texto, que también pliega/despliega */
  body:has(#module-topbar) #ai-platform-notice.cbm-ai-open { flex-wrap: wrap !important; align-items: flex-start !important; padding-top: 6px !important; max-height: 45dvh; overflow-y: auto; }
  body:has(#module-topbar) #ai-platform-notice.cbm-ai-open > span { white-space: normal; overflow: visible; line-height: 1.45; }
  body:has(#module-topbar) #ai-platform-notice.cbm-ai-open > button:not(.cbm-ai-i) { order: 2; }
  body:has(#module-topbar) #ai-platform-notice.cbm-ai-open > a { display: inline-block; order: 3; flex: 0 0 100%; padding: 2px 0 6px 26px; }
  /* Con el banner de cookies a la vista el aviso queda físicamente debajo de él (z-index 99990 frente a 9990): no se apilan dos franjas fijas; reaparece en cuanto se decide. */
  body:has(#module-topbar):has(#cbm-consent-banner.cbm-visible) #ai-platform-notice { display: none !important; }
  body.theme-light:has(#module-topbar) .cbm-ai-i { color: var(--text0); border-color: var(--text1); }
  /* tema blanco: body.theme-light * { color: var(--text0) !important } deja el texto de los botones primarios sobre el verde en 4,3:1; mismo arreglo que css/terminal.css aplica dentro de los paneles */
  body.theme-light:has(#module-topbar) :is(#tbRefreshBtn, #liveConnectBtn) { color: #000 !important; }
  /* «Compartir» y «Guardar» llevan su color de acento (azul / verde) en un style="" en línea: sobre fondo claro dan 4,2:1 y 2,9:1. Dentro del menú pasan a --text0. */
  body.theme-light:has(#module-topbar) .live-bar.cbm-m-open :is(#share-btn, button[onclick^="saveToStorage"]) { color: var(--text0) !important; }

  /* ── 5 · Banner de cookies: ≈96 px; los tres botones con el MISMO peso visual (requisito legal) ───────────── */
  body:has(#module-topbar) #cbm-consent-banner { padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  body:has(#module-topbar) #cbm-consent-banner .cbm-inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
  body:has(#module-topbar) #cbm-consent-banner .cbm-text {
    flex: 0 0 auto; min-width: 0; font-size: 11px; line-height: 1.3; cursor: pointer;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;   /* tocar el texto lo despliega (js/mobile-nav.js) */
  }
  body:has(#module-topbar) #cbm-consent-banner.cbm-expanded .cbm-text { display: block; overflow: visible; }
  body:has(#module-topbar) #cbm-consent-banner .cbm-text strong { font-size: 11px; }
  body:has(#module-topbar) #cbm-consent-banner .cbm-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; flex-wrap: nowrap; }
  body:has(#module-topbar) #cbm-consent-banner :is(.cbm-btn-reject, .cbm-btn-custom, .cbm-btn-accept) {
    box-sizing: border-box; min-height: 44px; padding: 0 4px; border-radius: 7px;
    background: #374151; color: #f1f5f9; border: 1px solid rgba(255, 255, 255, .22);
    font-size: 11px; font-weight: 700; white-space: normal; line-height: 1.15;
  }
  body:has(#module-topbar) #cbm-consent-banner :is(.cbm-btn-reject, .cbm-btn-custom, .cbm-btn-accept):hover { background: #4b5563; color: #f1f5f9; opacity: 1; }
  /* tema blanco: el banner conserva su fondo oscuro fijo (lib/consent-banner.js), pero body.theme-light * { color: var(--text0) !important } le pintaba texto oscuro encima (1,2:1).
     Se restituyen sus colores propios solo aquí; el banner de escritorio queda como estaba. */
  body.theme-light:has(#module-topbar) #cbm-consent-banner .cbm-text { color: #c9d4e8 !important; }
  body.theme-light:has(#module-topbar) #cbm-consent-banner .cbm-text strong { color: #fff !important; }
  body.theme-light:has(#module-topbar) #cbm-consent-banner .cbm-text a { color: #4da6ff !important; }
  body.theme-light:has(#module-topbar) #cbm-consent-banner :is(.cbm-btn-reject, .cbm-btn-custom, .cbm-btn-accept) { color: #f1f5f9 !important; }

  /* ── 6 · Botones flotantes: 44×44, dentro de los gutters de L1, con safe-area y ocultos junto a L1 ─────────── */
  body:has(#module-topbar) :is(.cbm-mnav-toggle, .cbm-cmdk-toggle) {
    position: fixed; z-index: 650; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; top: var(--cbm-m-inset-t);
    border-radius: 6px; transition: transform .2s ease, visibility 0s;
  }
  body:has(#module-topbar) .cbm-mnav-toggle { left: max(4px, env(safe-area-inset-left, 0px)); }
  body:has(#module-topbar) .cbm-cmdk-toggle { right: max(4px, env(safe-area-inset-right, 0px)); }
  body.cbm-m-l1-off:not(.cbm-mnav-open):has(#module-topbar) :is(.cbm-mnav-toggle, .cbm-cmdk-toggle) {
    transform: translateY(calc(-100% - var(--cbm-m-inset-t))); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
  }

  /* ── 7 · Zonas táctiles de 44 px en las tiras de subtabs que quedan a la vista ─────────────────────────────── */
  body:has(#module-topbar) .cbm-merged-strip .perf-sub-tab,
  body:has(#module-topbar) .stock-focus-tab,
  body:has(#module-topbar) .stock-focus-back,
  body:has(#module-topbar) .stock-entity-tab { min-height: 44px; }
}
/* ═══ /NUEVO: terminal-mobile-bars ═══ */
