/* TDL mobile v1 — inicio y elementos globales en celular */
@media (max-width: 767px) {
  /* Botones flotantes: círculos chicos abajo a la derecha, sin tapar el contenido */
  html body:not(#x):not(#y):not(#z) .tools-fab,
  html body:not(#x):not(#y):not(#z) .community-fab,
  html body:not(#x):not(#y):not(#z) .friends-fab {
    width: 52px !important; height: 52px !important; min-width: 0 !important; max-width: 52px !important;
    padding: 0 !important; border-radius: 999px !important;
    left: auto !important; right: 14px !important; top: auto !important;
    justify-content: center !important; align-items: center !important; gap: 0 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.55), 0 0 12px rgba(232,185,92,.25) !important;
    overflow: hidden !important; transform: none !important; translate: none !important; margin: 0 !important;
  }
  html body:not(#x):not(#y):not(#z) .friends-fab { bottom: calc(16px + env(safe-area-inset-bottom)) !important; }
  html body:not(#x):not(#y):not(#z) .community-fab { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
  html body:not(#x):not(#y):not(#z) .tools-fab { bottom: calc(140px + env(safe-area-inset-bottom)) !important; }
  html body:not(#x):not(#y):not(#z) .tools-fab > :not(i):not(svg):not([class*=icon]),
  html body:not(#x):not(#y):not(#z) .community-fab > :not(i):not(svg):not([class*=icon]),
  html body:not(#x):not(#y):not(#z) .friends-fab > :not(i):not(svg):not([class*=icon]) { display: none !important; }
  html body:not(#x):not(#y):not(#z) .community-fab-icon, html body:not(#x):not(#y):not(#z) .friends-fab-icon { width: 30px !important; height: 30px !important; margin: 0 !important; }
  html body:not(#x):not(#y):not(#z) .tools-fab i, html body:not(#x):not(#y):not(#z) .community-fab i, html body:not(#x):not(#y):not(#z) .friends-fab i { font-size: 18px !important; margin: 0 !important; }

  /* Barra superior: saldo legible */
  html body:not(#x):not(#y):not(#z) .wallet-pill span { font-size: 13px !important; font-weight: 700 !important; }

  /* Textos chicos del inicio */
  html body:not(#x):not(#y):not(#z) .hp-kicker, html body:not(#x):not(#y):not(#z) .tdl-banner-kicker { font-size: 12px !important; letter-spacing: .12em !important; }
  html body:not(#x):not(#y):not(#z) .hp-progress-label span, html body:not(#x):not(#y):not(#z) .hp-progress-label strong { font-size: 13px !important; }
  html body:not(#x):not(#y):not(#z) .hp-account span { font-size: 13px !important; }
  html body:not(#x):not(#y):not(#z) .hp-campaign-bottom span { font-size: 14px !important; }

  /* Encabezados de sección: título y botón alineados a la izquierda */
  html body:not(#x):not(#y):not(#z) .hp-section-heading { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; text-align: left !important; }
  html body:not(#x):not(#y):not(#z) .hp-section-heading .hp-text-link { align-self: flex-start !important; margin: 0 !important; }

  /* Misiones: menos espacio negro alrededor del dino */
  html body:not(#x):not(#y):not(#z) .hp-campaign-art { height: 150px !important; max-height: 150px !important; flex: 0 0 150px !important; min-height: 0 !important; }
  html body:not(#x):not(#y):not(#z) .hp-campaign-art img { height: 100% !important; width: 100% !important; object-fit: contain !important; transform: scale(1.35); }
  html body:not(#x):not(#y):not(#z) .hp-campaign-ordinal { font-size: 56px !important; line-height: 1 !important; top: 14px !important; left: 16px !important; }
  html body:not(#x):not(#y):not(#z) .hp-campaign-copy { padding: 18px 20px 20px !important; }

  /* Tu dino: imagen más compacta */
  html body:not(#x):not(#y):not(#z) .hp-dino-stage { height: 165px !important; max-height: 165px !important; flex: 0 0 165px !important; min-height: 0 !important; }
  html body:not(#x):not(#y):not(#z) .hp-dino-stage img { height: 100% !important; max-height: 165px !important; object-fit: contain !important; }

  /* Novedades: carrusel horizontal en vez de una pila larga */
  html body:not(#x):not(#y):not(#z) .hp-news .hp-media-grid {
    display: flex !important; grid-template-columns: none !important; gap: 12px !important;
    overflow-x: auto !important; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-right: -22px !important; padding: 2px 22px 10px 2px !important; scrollbar-width: none;
  }
  html body:not(#x):not(#y):not(#z) .hp-news .hp-media-grid::-webkit-scrollbar { display: none; }
  html body:not(#x):not(#y):not(#z) .hp-news .hp-media { flex: 0 0 82% !important; max-width: 82% !important; scroll-snap-align: start; border: 1px solid rgba(232,185,92,.45) !important; }
  html body:not(#x):not(#y):not(#z) .hp-news .hp-news-image { height: 140px !important; max-height: 140px !important; flex: 0 0 140px !important; object-fit: cover !important; }
  html body:not(#x):not(#y):not(#z) .hp-news .hp-media h3 { font-size: 20px !important; }

  /* Footer: centrado y legible */
  html body:not(#x):not(#y):not(#z) footer .site-footer-socials { justify-content: center !important; }
  html body:not(#x):not(#y):not(#z) footer .space-y-8 { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
  html body:not(#x):not(#y):not(#z) footer .space-y-8 > img { margin: 0 auto !important; height: 56px !important; }
  html body:not(#x):not(#y):not(#z) footer .site-footer-description { font-size: 15px !important; text-align: center !important; }
  html body:not(#x):not(#y):not(#z) footer .site-footer-legal { font-size: 11px !important; letter-spacing: .12em !important; text-align: center !important; line-height: 1.6 !important; }
  html body:not(#x):not(#y):not(#z) footer .site-footer-bottom { align-items: center !important; text-align: center !important; gap: 14px !important; }
  html body:not(#x):not(#y):not(#z) footer .site-footer-legal-links { justify-content: center !important; font-size: 12px !important; }
  html body:not(#x):not(#y):not(#z) footer .site-footer-legal-links a { padding: 10px 6px !important; }

  /* Botones flotantes: siempre visibles al scrolear (solo se ocultan con el teclado abierto o el mapa de La Cacería) */
  html body.mobile-content-scrolling:not(.mobile-dock-input-active):not(.hunt-map-visible):not(#x):not(#y) :is(.tools-fab, .community-fab, .friends-fab),
  html body.mobile-dock-hidden:not(.mobile-dock-input-active):not(.hunt-map-visible):not(#x):not(#y) :is(.tools-fab, .community-fab, .friends-fab) {
    visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; transform: none !important;
  }

  /* Header mobile: más aire, fondo sólido y botones parejos */
  html body:not(#x):not(#y):not(#z) .app-topbar { background: rgba(5,5,5,.94) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(232,185,92,.28) !important; box-shadow: 0 6px 20px rgba(0,0,0,.45) !important; }
  html body:not(#x):not(#y):not(#z) .app-topbar-inner { padding: 8px 14px !important; column-gap: 8px !important; row-gap: 4px !important; grid-template-rows: 32px 22px !important; align-items: center !important; }
  html body:not(#x):not(#y):not(#z) .app-brand img { height: 32px !important; width: auto !important; }
  html body:not(#x):not(#y):not(#z) .app-topbar .wallet-pill { width: fit-content !important; align-self: start !important; padding: 2px 9px 2px 6px !important; gap: 5px !important; border: 1px solid rgba(232,185,92,.4) !important; border-radius: 999px !important; background: rgba(232,185,92,.08) !important; }
  html body:not(#x):not(#y):not(#z) .app-topbar .wallet-pill img { width: 15px !important; height: 15px !important; }
  html body:not(#x):not(#y):not(#z) .app-topbar :is(.notification-top-button, .gift-top-button, .app-user-chip, .app-icon-button) { width: 42px !important; height: 42px !important; min-width: 42px !important; border-radius: 12px !important; }
  html body:not(#x):not(#y):not(#z) .app-topbar .tdl-calendar-button { display: none !important; }
}
