/* ============================================================
   V9.9.65 · ESCRITORIO SOLO
   - Móvil intacto
   - Sin barra lateral azul en escritorio
   - Inicio centrado y mejor aprovechado
   - 12 iconos exactos estilo móvil, más grandes y sin recortes
   - Botón volver al menú en el resto de pantallas
   ============================================================ */

@media (min-width:1024px){
  :root{--desktop-home-max:1240px}

  .layout{grid-template-columns:1fr !important;}
  .layout > .sidebar,
  .sidebar{display:none !important;width:0 !important;min-width:0 !important;max-width:0 !important;padding:0 !important;margin:0 !important;overflow:hidden !important;visibility:hidden !important;}

  .main{width:100% !important;max-width:none !important;min-width:0 !important;padding:18px 22px 24px !important;}
  .view{width:min(100%,1400px) !important;margin:0 auto !important;}

  body:not(.home-screen) .main{background:linear-gradient(180deg,#f6f9fd 0%,#eef4fa 100%) !important;}

  .mobile-head,.mobile-nav{display:none !important;}

  .desktop-menu-btn{
    display:inline-flex !important;align-items:center !important;gap:10px !important;
    padding:11px 16px !important;margin:0 0 14px !important;border-radius:16px !important;
    border:1px solid #d5e1f0 !important;background:#fff !important;color:#17365d !important;
    font-weight:800 !important;box-shadow:0 10px 24px rgba(17,38,74,.08) !important;
    position:sticky !important;top:14px !important;z-index:25 !important;
  }
  body.home-screen .desktop-menu-btn{display:none !important;}

  /* HOME desktop */
  body.home-screen .main{
    padding:18px 20px 22px !important;
    background:#eef4fb !important;
    min-height:100vh !important;
    overflow:auto !important;
  }
  body.home-screen .launcher-view{
    min-height:calc(100vh - 40px) !important;
    background:#eef4fb !important;
  }
  body.home-screen .home-premium-stage{
    min-height:calc(100vh - 54px) !important;
    padding:22px !important;
    border-radius:30px !important;
    background:linear-gradient(180deg,#f8fbff 0%,#eef4fb 100%) !important;
    box-shadow:0 20px 48px rgba(23,54,93,.08) !important;
    border:1px solid rgba(201,218,236,.9) !important;
    overflow:hidden !important;
  }
  body.home-screen .home-premium-art,
  body.home-screen .home-hotspots{display:none !important;}

  body.home-screen .home-desktop-canvas{
    display:grid !important;
    grid-template-rows:auto 1fr !important;
    gap:22px !important;
    max-width:var(--desktop-home-max) !important;
    margin:0 auto !important;
    min-height:0 !important;
  }
  body.home-screen .home-desktop-header{padding:2px 4px 0 !important;}
  body.home-screen .home-desktop-badge{
    display:inline-flex !important;padding:8px 14px !important;font-size:12px !important;
    font-weight:900 !important;letter-spacing:.12em !important;text-transform:uppercase !important;
    color:#2e5faa !important;background:#eaf2ff !important;border:1px solid #d8e4f7 !important;
    border-radius:999px !important;margin-bottom:10px !important;
  }
  body.home-screen .home-desktop-header h2{
    margin:0 0 8px !important;font-size:clamp(44px,3.8vw,58px) !important;
    line-height:1.02 !important;color:#17284d !important;
  }
  body.home-screen .home-desktop-header p{
    margin:0 !important;max-width:none !important;font-size:20px !important;
    line-height:1.45 !important;color:#536684 !important;
  }
  body.home-screen .home-desktop-grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(220px,1fr)) !important;
    gap:22px 22px !important;
    justify-content:center !important;
    align-items:start !important;
  }
  body.home-screen .home-desktop-tile{
    position:relative !important;
    width:100% !important;
    max-width:255px !important;
    aspect-ratio:246 / 330 !important;
    justify-self:center !important;
    padding:0 !important;
    border:none !important;
    border-radius:30px !important;
    background-color:transparent !important;
    background-repeat:no-repeat !important;
    background-position:center center !important;
    background-size:contain !important;
    box-shadow:none !important;
    overflow:visible !important;
    transform:translateY(0) scale(1) !important;
    transition:transform .18s ease, filter .18s ease !important;
    filter:drop-shadow(0 14px 24px rgba(18,42,76,.14));
  }
  body.home-screen .home-desktop-tile:hover{
    transform:translateY(-4px) scale(1.015) !important;
    filter:drop-shadow(0 18px 30px rgba(18,42,76,.18));
  }
  body.home-screen .home-desktop-tile:focus-visible{
    outline:3px solid #6fb6ff !important;outline-offset:4px !important;
  }
  body.home-screen .home-desktop-tile .tile-icon,
  body.home-screen .home-desktop-tile .tile-label,
  body.home-screen .home-desktop-tile .tile-sub{
    position:absolute !important;width:1px !important;height:1px !important;overflow:hidden !important;
    clip:rect(0 0 0 0) !important;white-space:nowrap !important;clip-path:inset(50%) !important;
  }

  body.home-screen .tile-modulos{background-image:url('images/desktop-home-icons/modulos_tile.png') !important;}
  body.home-screen .tile-apuntes{background-image:url('images/desktop-home-icons/apuntes_tile.png') !important;}
  body.home-screen .tile-tests{background-image:url('images/desktop-home-icons/tests_tile.png') !important;}
  body.home-screen .tile-profesor{background-image:url('images/desktop-home-icons/profesor_tile.png') !important;}
  body.home-screen .tile-oficina{background-image:url('images/desktop-home-icons/oficina_tile.png') !important;}
  body.home-screen .tile-examen{background-image:url('images/desktop-home-icons/examen_tile.png') !important;}
  body.home-screen .tile-progreso{background-image:url('images/desktop-home-icons/progreso_tile.png') !important;}
  body.home-screen .tile-buscar{background-image:url('images/desktop-home-icons/buscar_tile.png') !important;}
  body.home-screen .tile-documentos{background-image:url('images/desktop-home-icons/documentos_tile.png') !important;}
  body.home-screen .tile-esquemas{background-image:url('images/desktop-home-icons/esquemas_tile.png') !important;}
  body.home-screen .tile-videos{background-image:url('images/desktop-home-icons/videos_tile.png') !important;}
  body.home-screen .tile-fuentes{background-image:url('images/desktop-home-icons/fuentes_tile.png') !important;}
}

@media (min-width:1024px) and (max-width:1380px){
  body.home-screen .main{padding:16px 16px 20px !important;}
  body.home-screen .home-premium-stage{padding:18px !important;}
  body.home-screen .home-desktop-canvas{gap:18px !important;max-width:1160px !important;}
  body.home-screen .home-desktop-grid{gap:18px !important;}
  body.home-screen .home-desktop-header h2{font-size:clamp(38px,3.6vw,50px) !important;}
  body.home-screen .home-desktop-header p{font-size:18px !important;}
  body.home-screen .home-desktop-tile{max-width:235px !important;}
}

@media (min-width:1024px) and (max-height:820px){
  body.home-screen .main{padding:14px 16px 18px !important;}
  body.home-screen .launcher-view{min-height:calc(100vh - 26px) !important;}
  body.home-screen .home-premium-stage{min-height:calc(100vh - 36px) !important;padding:16px !important;}
  body.home-screen .home-desktop-canvas{gap:14px !important;max-width:1080px !important;}
  body.home-screen .home-desktop-header h2{font-size:clamp(34px,3.2vw,44px) !important;}
  body.home-screen .home-desktop-header p{font-size:16px !important;}
  body.home-screen .home-desktop-grid{gap:14px !important;}
  body.home-screen .home-desktop-tile{max-width:205px !important;}
}
