/* =====================================================================
   Stereu 1.44 — capa móvil «tipo app» (≤ 900 px). No toca el escritorio.
   Barra de pestañas inferior, mini reproductor, hoja «Más» (con el menú
   lateral dentro), buscador desplegable, listas y rejillas táctiles.
   ===================================================================== */
.tabbar, .m-sheet, .m-search, .mini-prog { display: none; }

@media (max-width: 900px) {
  :root { --tabbar-h: 58px; --mini-h: 60px; }
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: 0; }

  /* --- cabecera compacta --- */
  .topbar { padding: 8px 12px; gap: 10px; position: sticky; top: 0; z-index: 45; background: #050505; }
  html.pwa .topbar { padding-top: calc(env(safe-area-inset-top) + 8px); }
  .topbar .brand { flex: none; }
  .topbar .search { display: none; }
  .topnav { margin-left: auto; }
  .topnav .btn { display: none; }               /* Salir vive en «Más» */
  .topnav .nav-avatar { display: inline-flex; }

  /* --- el menú lateral desaparece: se muestra dentro de la hoja «Más» --- */
  .sidebar { display: none !important; }
  .layout { grid-template-columns: 1fr; min-height: auto; }
  .content { border-radius: 0; margin: 0; border: 0; padding: 14px 14px calc(var(--tabbar-h) + var(--mini-h) + env(safe-area-inset-bottom) + 18px); }
  .album-hero { margin: -14px -14px 18px; padding: 20px 14px 8px; }
  .ar-page { margin: -14px -14px 0; }
  .ar-page > section, .ar-page > .hero-acciones { padding-left: 14px; padding-right: 14px; }

  /* --- barra de pestañas --- */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #0a0a0a; border-top: 1px solid rgba(255,255,255,.08); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: rgba(255,255,255,.55); text-decoration: none; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on { color: #fff; }
  .tabbar .on svg { stroke: #92bd5e; }
  .tabbar .tab-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

  /* --- mini reproductor (encima de las pestañas) --- */
  .player { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 43; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 8px 10px 8px 8px; height: var(--mini-h); margin: 0 8px 6px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: #1a1a1a; left: 0; right: 0; }
  .player.vacio { display: none; }
  .p-track { gap: 10px; cursor: pointer; }
  .p-cover { width: 42px; height: 42px; border-radius: 8px; overflow: hidden; flex: none; }
  .p-cover img { width: 100%; height: 100%; object-fit: cover; }
  .p-meta strong { font-size: 13.5px; }
  .p-meta span { font-size: 12px; }
  #p-like { display: none; }
  .p-center { flex-direction: row; align-items: center; gap: 0; }
  .p-progress { display: none; }
  .p-controls { gap: 2px; }
  #p-shuffle, #p-repeat, #p-prev { display: none; }
  .p-controls .playbtn { width: 38px; height: 38px; }
  .p-vol { display: none; }
  .mini-prog { display: block; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
  .mini-prog i { display: block; height: 100%; width: 0; background: #92bd5e; }

  /* --- buscador desplegable --- */
  .m-search { position: fixed; left: 0; right: 0; top: 0; z-index: 46; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; background: #0a0a0a; border-bottom: 1px solid rgba(255,255,255,.08); }
  .m-search.on { display: flex; gap: 8px; align-items: center; }
  .m-search input { flex: 1; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: #1a1a1a; color: #fff; padding: 0 14px; font: inherit; font-size: 15px; }
  .m-search button { height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: #92bd5e; color: #111; font: inherit; font-weight: 700; }
  .m-search .m-search-x { background: transparent; color: #ccc; padding: 0 8px; }

  /* --- hoja «Más» --- */
  .m-sheet { position: fixed; inset: 0; z-index: 47; background: rgba(0,0,0,.55); }
  .m-sheet.on { display: block; }
  .m-sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82dvh; overflow: auto; background: #151515; border-radius: 20px 20px 0 0; padding: 8px 10px calc(env(safe-area-inset-bottom) + 14px); animation: mSheetUp .25s ease-out; }
  .m-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 4px auto 12px; }
  .m-sheet .sidebar { display: block !important; border: 0; background: transparent; padding: 0 4px; }
  .m-sheet .sidebar h3 { margin: 14px 10px 6px; }
  .m-sheet .genres { flex-direction: column; }
  .m-sheet .genres a, .m-sheet .studio-link { font-size: 15px; padding: 11px 12px; border-radius: 10px; }
  .m-sheet .m-salir { display: block; margin: 14px 4px 0; text-align: center; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); color: #eee; text-decoration: none; font-weight: 600; }
  @keyframes mSheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* --- cola: pantalla completa --- */
  .queue { width: 100vw; border-left: 0; }
  html.pwa .queue { padding-top: env(safe-area-inset-top); }

  /* --- listas y rejillas táctiles --- */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid > .card { padding-bottom: 8px; }
  .grid .card .t { font-size: 14px; margin: 10px 6px 2px; }
  .grid .card .a { font-size: 12.5px; margin: 0 6px; }
  .fila-scroll, .carrusel { grid-auto-columns: 42vw; }
  .pop-grid { grid-template-columns: 1fr; }
  .song-columns, .song-album, .song-plays, .wave-row, .wave-hueco { display: none !important; }
  .card.trow.song-row { padding: 9px 6px; gap: 10px; }
  .song-art { width: 44px; height: 44px; }
  .trow-meta strong { font-size: 14.5px; }
  .song-toolbar { gap: 8px; }
  .song-toolbar .vista { display: none; }
  .hero-acciones { flex-wrap: wrap; gap: 8px; }
  .ar-head-in { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ar-page .ar-head .ar-avatar, .ar-page .ar-head.con-portada .ar-avatar { width: 92px; height: 92px; }
  .ar-name { font-size: clamp(28px, 9vw, 40px) !important; }
  .sec-h h2, .sec-title { font-size: 19px; }
  .cardplay { opacity: 1; transform: none; width: 36px; height: 36px; right: 8px; bottom: 8px; }
  .ah-menu, .mas-menu, .ac-menu, .ctxmenu { max-width: calc(100vw - 16px); }
  .ctxmenu button { padding: 12px 12px; font-size: 15px; }
  input, select, textarea { font-size: 16px; }   /* evita el zoom automático de iOS */
  .fs-overlay { padding-top: env(safe-area-inset-top); }
  .pwa-pill { bottom: calc(var(--tabbar-h) + var(--mini-h) + env(safe-area-inset-bottom) + 12px); }
  .pwa-ios { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  #stereu-toast { bottom: calc(var(--tabbar-h) + var(--mini-h) + env(safe-area-inset-bottom) + 14px) !important; }
}
