/* Buscador instantáneo de la lupa (2026-11-27). Panel flotante bajo la cabecera en computador; pantalla completa en celular. */
.bq[hidden] { display: none; }
.bq { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 9vh 1rem 1rem; }
.bq-fondo { position: absolute; inset: 0; background: rgba(16, 34, 30, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: bq-aparece .18s ease; }
.bq-caja { position: relative; width: min(680px, 100%); max-height: min(78vh, 720px); display: flex; flex-direction: column; background: var(--papel); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(10, 30, 26, .55), 0 0 0 1px rgba(44, 91, 79, .12); overflow: hidden; animation: bq-sube .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes bq-aparece { from { opacity: 0; } }
@keyframes bq-sube { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .bq-fondo, .bq-caja { animation: none; } }
html.bq-abierto { overflow: hidden; }

.bq-form { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem .7rem 1rem; border-bottom: 1px solid var(--linea); }
.bq-lupa { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--cipres); stroke-width: 2; stroke-linecap: round; }
.bq-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.15rem; color: var(--tinta); padding: .55rem .2rem; }
.bq-form input::-webkit-search-cancel-button { display: none; }
.bq-form input::placeholder { color: #7b8784; }
.bq-voz, .bq-x { flex: none; border: 1px solid var(--linea); background: var(--granito); color: var(--tinta-suave); border-radius: 9px; height: 36px; min-width: 36px; display: grid; place-items: center; cursor: pointer; font: 600 .75rem/1 var(--sans); padding: 0 .55rem; }
.bq-voz svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bq-voz:hover, .bq-x:hover { border-color: var(--cipres); color: var(--cipres); }
.bq-voz.escuchando { background: #b3261e; border-color: #b3261e; color: #fff; animation: bq-pulso 1.1s ease-in-out infinite; }
@keyframes bq-pulso { 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, .18); } }

.bq-atajos { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .65rem 1rem; border-bottom: 1px solid var(--linea); background: #fafbfa; }
.bq-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border-radius: 99px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); font: 600 .85rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.bq-chip:hover { border-color: var(--cipres); color: var(--cipres); }
.bq-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.bq-chip-cerca { background: var(--cipres); border-color: var(--cipres); color: #fff; }
.bq-chip-cerca:hover { background: var(--cipres-oscuro); color: #fff; }
.bq-cerca-estado:empty { display: none; }
.bq-cerca-estado { flex-basis: 100%; order: 9; font-size: .85rem; color: var(--tinta-suave); }

.bq-res { overflow-y: auto; overscroll-behavior: contain; padding: .35rem 0 .6rem; flex: 1; }
.bq-grupo { margin: 0; padding: .55rem 1rem .25rem; font: 700 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); }
.bq-item { display: flex; align-items: center; gap: .75rem; margin: 0 .45rem; padding: .55rem .6rem; border-radius: 10px; color: var(--tinta); text-decoration: none; cursor: pointer; }
.bq-item[aria-selected="true"], .bq-item:hover { background: var(--cipres-claro); color: var(--tinta); }
.bq-item[aria-selected="true"] .bq-ir { opacity: 1; }
.bq-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--granito); color: var(--cipres); }
.bq-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bq-item[aria-selected="true"] .bq-ico { background: var(--papel); }
.bq-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bq-t { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-s { font-size: .85rem; color: var(--tinta-suave); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-t mark, .bq-s mark { background: transparent; color: var(--cipres); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(44, 91, 79, .35); text-underline-offset: 3px; }
.bq-nota { flex: none; font: 700 .85rem/1 var(--sans); color: var(--ocre); white-space: nowrap; }
.bq-marca { display: inline-block; margin-left: .35rem; padding: .08rem .4rem; border-radius: 5px; font: 700 .68rem/1.3 var(--sans); vertical-align: 1px; background: var(--cipres-claro); color: var(--cipres-oscuro); }
.bq-marca.dest { background: #f6e7bf; color: #6b4d0f; }
.bq-ir { flex: none; opacity: 0; color: var(--cipres); font-size: 1.1rem; }
.bq-vacio { padding: 1.4rem 1.2rem; color: var(--tinta-suave); }
.bq-vacio strong { color: var(--tinta); }
.bq-vacio a { font-weight: 600; }
.bq-borrar { float: right; border: 0; background: none; color: var(--tinta-suave); font: 600 .72rem/1 var(--sans); text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: underline; }
.bq-cargando { padding: 1.2rem; color: var(--tinta-suave); }

.bq-pie { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: .55rem 1rem; border-top: 1px solid var(--linea); background: #fafbfa; font-size: .78rem; color: var(--tinta-suave); }
.bq-pie kbd { display: inline-block; min-width: 1.3em; margin-right: .2rem; padding: .05rem .3rem; border: 1px solid var(--linea); border-bottom-width: 2px; border-radius: 5px; background: var(--papel); font: 600 .72rem/1.3 var(--sans); text-align: center; }
.bq-pie-der { margin-left: auto; }

@media (max-width: 640px) {
  .bq { padding: 0; }
  .bq-caja { width: 100%; max-height: none; height: 100%; border-radius: 0; animation: none; }
  .bq-form { padding: .55rem .6rem .55rem .9rem; }
  .bq-form input { font-size: 1.05rem; }
  .bq-atajos { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .bq-atajos::-webkit-scrollbar { display: none; }
  .bq-chip { flex: none; }
  .bq-cerca-estado { position: absolute; left: 1rem; right: 1rem; top: 112px; background: var(--papel); padding: .3rem 0; }
  .bq-pie { display: none; }
  .bq-item { padding: .65rem .55rem; }
}
