/* BuscaYa v2 · instalar app + aviso sin conexión */
.pwa-bar{position:fixed;left:16px;right:16px;bottom:16px;z-index:900;max-width:460px;margin:0 auto;background:#fff;border:1px solid #eceef2;border-radius:16px;box-shadow:0 18px 40px rgba(16,24,40,.18);padding:14px 14px 14px 16px;display:flex;align-items:center;gap:12px;font-family:Questrial,system-ui,sans-serif;transform:translateY(140%);transition:transform .35s ease}
.pwa-bar.on{transform:none}
.pwa-bar img{width:46px;height:46px;border-radius:12px;flex:none}
.pwa-bar .tx{flex:1;min-width:0}.pwa-bar b{display:block;font-size:1rem;color:#1c1d21}.pwa-bar small{display:block;color:#5f6673;font-size:.82rem;line-height:1.35;margin-top:2px}
.pwa-bar .go{background:#ffde59;color:#1c1d21;border:0;border-radius:10px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer;display:inline-flex;gap:6px;align-items:center;white-space:nowrap}
.pwa-bar .go:hover{background:#ffd400}
.pwa-bar .x{background:transparent;border:0;color:#5f6470;cursor:pointer;padding:6px;border-radius:8px;display:grid;place-items:center}.pwa-bar .x:hover{background:#f2f3f5;color:#1c1d21}
.pwa-bar .ic,.pwa-sheet .ic,.pwa-off .ic{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pwa-sheet{position:fixed;inset:0;z-index:950;background:rgba(16,24,40,.45);display:none;align-items:flex-end;justify-content:center;font-family:Questrial,system-ui,sans-serif}
.pwa-sheet.on{display:flex}
.pwa-sheet .in{background:#fff;width:100%;max-width:480px;border-radius:20px 20px 0 0;padding:22px 22px calc(22px + env(safe-area-inset-bottom))}
.pwa-sheet h3{margin:0 0 4px;font-size:1.15rem}.pwa-sheet p{margin:0 0 14px;color:#5f6673}
.pwa-sheet ol{margin:0 0 18px;padding:0;list-style:none;counter-reset:s}
.pwa-sheet li{counter-increment:s;display:flex;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #f0f1f4}
.pwa-sheet li:before{content:counter(s);width:26px;height:26px;border-radius:50%;background:#ffde59;font-weight:700;display:grid;place-items:center;flex:none}
.pwa-sheet li span.k{display:inline-flex;align-items:center;gap:4px;background:#f2f3f5;border-radius:6px;padding:2px 8px;font-weight:600}
.pwa-sheet .ok{width:100%;background:#1c1d21;color:#fff;border:0;border-radius:12px;padding:13px;font:inherit;font-weight:700;cursor:pointer}
.pwa-off{position:fixed;top:0;left:0;right:0;z-index:800;background:#1c1d21;color:#fff;font-family:Questrial,system-ui,sans-serif;font-size:.9rem;padding:9px 16px;display:none;align-items:center;justify-content:center;gap:8px}
.pwa-off.on{display:flex}.pwa-off .ic{color:#ffde59}
@media (display-mode:standalone){.pwa-bar{display:none}}
.vs-n{display:inline-flex;align-items:center;gap:5px;font-weight:600;color:#1c1d21}.vs-n .ic{width:15px;height:15px;stroke:#8a909b;fill:none;stroke-width:2}
.pwa-isoff{padding-top:38px}@media (max-width:480px){.pwa-bar{left:10px;right:10px;bottom:10px;padding:12px}.pwa-bar img{width:40px;height:40px}.pwa-bar .go{padding:9px 12px}}
/* ---------- Splash al abrir la app ---------- */
.by-splash{display:none}
html.by-spl .by-splash{display:grid;position:fixed;inset:0;z-index:2000;background:#ffde59;place-items:center;transition:opacity .45s ease,visibility .45s}
html.by-spl::before{content:"";position:fixed;inset:0;z-index:1999;background:#ffde59} /* cubre antes de que llegue el body */
html.by-spl-out::before{opacity:0;transition:opacity .45s ease}
html.by-spl-out .by-splash{opacity:0;visibility:hidden}
.by-splash .sp-in{display:grid;justify-items:center;gap:22px}
.by-splash img{width:180px;height:auto;animation:spPop .7s cubic-bezier(.2,1.4,.4,1) both}
.by-splash .sp-bar{width:120px;height:4px;border-radius:2px;background:rgba(28,29,33,.15);overflow:hidden;animation:spFade .4s .35s both}
.by-splash .sp-bar i{display:block;height:100%;width:40%;border-radius:2px;background:#1c1d21;animation:spRun 1s .4s ease-in-out infinite}
@keyframes spPop{0%{opacity:0;transform:scale(.6) rotate(-6deg)}60%{opacity:1}100%{transform:none}}
@keyframes spFade{from{opacity:0}}
@keyframes spRun{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}
/* ---------- Avisos (push) ---------- */
.av-sheet .in{position:relative}
.av-sheet .av-x{position:absolute;top:10px;right:10px;background:transparent;border:0;color:#5f6470;padding:8px;border-radius:10px;cursor:pointer;display:grid}.av-sheet .av-x:hover{background:#f2f3f5;color:#1c1d21}
.av-sheet .av-ico{width:48px;height:48px;border-radius:14px;background:#ffde59;display:grid;place-items:center;margin-bottom:6px}
.av-sheet .av-ico .ic{width:24px;height:24px;stroke:#1c1d21}
.av-opt{display:flex;gap:12px;align-items:flex-start;text-align:left;padding:12px;border:1px solid #eceef2;border-radius:12px;margin:10px 0;cursor:pointer}
.av-opt input{width:20px;height:20px;accent-color:#1c1d21;margin-top:2px;flex:none}
.av-opt b{display:block;color:#1c1d21}.av-opt small{display:block;color:#5f6673;font-size:.84rem;line-height:1.35;margin-top:2px}
.av-info{cursor:default;background:#fafaf7}.av-info>.ic{flex:none;margin-top:2px}
.av-msg{min-height:1.3em;color:#1c1d21;font-weight:600;margin:6px 0}
.av-off{background:transparent;border:0;color:#5f6673;font:inherit;padding:10px;margin-top:4px;cursor:pointer;display:inline-flex;gap:6px;align-items:center;border-radius:10px}.av-off:hover{background:#f2f3f5;color:#1c1d21}
.av-mins{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 4px}
.av-mins button{background:#fff;border:1.5px solid #1c1d21;border-radius:12px;padding:12px 8px;font:inherit;font-weight:700;color:#1c1d21;cursor:pointer}
.av-mins button:hover,.av-mins button:focus-visible{background:#ffde59}
.av-sheet .av-t{color:#5f6673;margin:2px 0 0}
@media (prefers-reduced-motion: reduce){.by-splash img,.by-splash .sp-bar,.by-splash .sp-bar i{animation:none}}
.av-sheet .ok{display:flex;gap:8px;justify-content:center;align-items:center}
.av-off[hidden]{display:none}
.pwa-bar[hidden]{display:none}
.av-priv{display:flex;gap:8px;align-items:flex-start;text-align:left;font-size:.8rem;line-height:1.35;color:#5f6673;margin:4px 2px 0}.av-priv .ic{width:16px;height:16px;flex:none;margin-top:1px;color:#1c1d21}

/* En el inicio (chat): la invitación va en el contenido, arriba, y no tapa la barra de búsqueda ni los resultados */
.pwa-bar.pwa-inl{position:relative;left:auto;right:auto;bottom:auto;z-index:1;margin:12px auto 4px;width:calc(100% - 24px);transform:none;box-shadow:0 4px 14px rgba(16,24,40,.08);opacity:0;transition:opacity .3s ease}.pwa-bar.pwa-inl.on{opacity:1}
/* Tarjeta de bienvenida (bienvenida.js) */
.by-wel{position:relative;margin:12px auto 4px;width:calc(100% - 24px);max-width:720px;box-sizing:border-box;background:#ffde59;color:#1c1d21;border-radius:16px;padding:16px 16px 14px;font-family:Questrial,system-ui,sans-serif;box-shadow:0 4px 14px rgba(16,24,40,.08)}
.by-wel .ic{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.by-wel-i{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#fff;margin-bottom:8px}
.by-wel h2{font-size:1.08rem;margin:0 32px 4px 0;line-height:1.3}
.by-wel p{margin:0 0 8px;font-size:.9rem;line-height:1.4;color:#33363d}
.by-wel ul{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:6px}
.by-wel li{display:flex;gap:8px;align-items:flex-start;font-size:.88rem;line-height:1.35;background:rgba(255,255,255,.55);border-radius:10px;padding:8px 10px}
.by-wel-a{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.by-wel-go{background:#1c1d21;color:#fff;border:0;border-radius:10px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.by-wel-go:disabled{opacity:.6;cursor:default}
.by-wel-no{background:transparent;border:0;font:inherit;color:#1c1d21;text-decoration:underline;cursor:pointer;padding:8px}
.by-wel-x{position:absolute;top:10px;right:10px;background:transparent;border:0;color:#1c1d21;cursor:pointer;padding:6px;border-radius:8px;display:grid;place-items:center}.by-wel-x:hover{background:rgba(0,0,0,.08)}
.by-wel-m:empty{display:none}.by-wel-m{font-weight:700}
